neatnet.fix_topology#
- neatnet.fix_topology(roads, eps=0.0001, **kwargs)[source]#
Fix road network topology. This ensures correct topology of the network by:
- Adding potentially missing nodes…
on intersections of individual LineString endpoints with the remaining network. The idea behind is that if a line ends on an intersection with another, there should be a node on both of them.
- Removing nodes of degree 2…
that have no meaning in the network used within our framework.
Removing duplicated geometries (irrespective of orientation).
- Parameters:
- roads
geopandas.GeoDataFrame
Input LineString geometries.
- eps
float
= 1e-4 Tolerance epsilon for point snapping passed into
nodes.split()
.- **kwargs
dict
Key word arguments passed into
remove_false_nodes()
.
- roads
- Returns:
gpd.GeoDataFrame
The input roads that now have fixed topology and are ready to proceed through the simplification algorithm.