neatnet.fix_topology

Contents

neatnet.fix_topology#

neatnet.fix_topology(streets, *, eps=0.0001, **kwargs)[source]#

Fix street network topology. This ensures correct topology of the network by:

  1. 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.

  2. Removing nodes of degree 2…

    that have no meaning in the network used within our framework.

  3. Removing duplicated geometries (irrespective of orientation).

Parameters:
streetsgeopandas.GeoDataFrame

Input LineString geometries.

epsfloat = 1e-4

Tolerance epsilon for point snapping passed into nodes.split().

**kwargsdict

Key word arguments passed into remove_interstitial_nodes().

Returns:
gpd.GeoDataFrame

The input streets that now have fixed topology and are ready to proceed through the simplification algorithm.