Topology Builder#
This class provides static methods for constructing topological network structures from raw network data.
- class util.topology.Topology[source]#
Bases:
objectMethods:
create_topology(input_file, srid, output_file)Create a base topological network.
create_geoms_topology(collection[, tbp, verbose])Create a base topological network from a TrackCollection.
- static create_topology(input_file, srid, output_file, tbp=1e-06, verbose=False)[source]#
Create a base topological network.
Parameters#
- input_filestr
Path to a text file containing a list of line or multiline geometries in WKT format.
- sridstr
Coordinate reference system of the geometry vertices.
- output_filestr
Path to the output file where the topology will be stored.
Returns#
None
- static create_geoms_topology(collection, tbp=1e-06, verbose=False)[source]#
Create a base topological network from a TrackCollection.
Parameters#
- collectionTrackCollection
Collection representing the geometry of the edges used to build the topology.
- tbpfloat, optional
Tolerance used for geometric matching (default is 1e-6).
- verbosebool, optional
If True, enables detailed logging during topology construction.
Returns#
- list of tuple
Each tuple contains: (edge_id, source_node_id, target_node_id, line_wkt)