Skip to main content

Module geo

Module geo 

Source
Expand description

Geographic layer glue for the multiconductor model.

powerio_dist cannot depend on powerio, so the [GeoLayer] extract and apply for [MulticonductorNetwork] live here, where both model crates are visible. The apply pass itself (apply_geo_features) is shared with the balanced network; this module supplies the string keyed row lookups and the mirrored type conversions. The parity test in this crate keeps the mirrored geo types’ JSON shapes identical, so the conversions are direct field maps with a serde fallback for variants added on one side first.

Functions§

apply_dist_geo_layer
Apply a [GeoLayer] onto a multiconductor network: matched bus points land in DistBus.location, matched line routes in DistLine.route, and the layer’s space becomes the network’s geo when anything matched. Matching follows [ElementKey], with the string ids matched case insensitively (OpenDSS names are case insensitive).
dist_geo_layer
Extract a multiconductor network’s coordinates as a standalone [GeoLayer]: one point per located bus, one route per routed line, keyed by the string bus and line names plus the payload row uids.