pub fn parse_network_geojson(
path: &str,
) -> Result<(Vec<Netelement>, Vec<NetRelation>), ProjectionError>Expand description
Parse railway network from GeoJSON file
Loads both netelements and netrelations from a single GeoJSON FeatureCollection. Netelements are features with LineString/MultiLineString geometry (without type=“netrelation”). Netrelations are features with type=“netrelation” property.
§Arguments
path- Path to GeoJSON file containing both network elements and relations
§Returns
A tuple containing (Vec<Netelement>, Vec<NetRelation>)
§Example
use tp_lib_core::io::parse_network_geojson;
let (netelements, netrelations) = parse_network_geojson("network.geojson")?;