neatnet.simplify_loop

Contents

neatnet.simplify_loop#

neatnet.simplify_loop(roads, artifacts, max_segment_length=1, min_dangle_length=20, clip_limit=2, simplification_factor=2, consolidation_tolerance=10, eps=0.0001)[source]#
Perform an iteration of the simplification procedure which includes:
  1. Removal of false nodes

  2. Artifact classification

  3. Simplifying artifacts:
    • Single artifacts

    • Pairs of artifacts

    • Clusters of artifacts

Parameters:
roadsgeopandas.GeoDataFrame

Raw road network data.

artifactsgeopandas.GeoDataFrame

Face artifact polygons.

max_segment_lengthfloat | int = 1

Additional vertices will be added so that all line segments are no longer than this value. Must be greater than 0. Used in multiple internal geometric operations.

min_dangle_lengthfloat | int = 20

The threshold for determining if linestrings are dangling slivers to be removed or not.

clip_limitfloat | int = 2

Following generation of the Voronoi linework, we clip to fit inside the polygon. To ensure we get a space to make proper topological connections from the linework to the actual points on the edge of the polygon, we clip using a polygon with a negative buffer of clip_limit or the radius of maximum inscribed circle, whichever is smaller.

simplification_factorfloat | int = 2

The factor by which singles, pairs, and clusters are simplified. The max_segment_length is multiplied by this factor to get the simplification epsilon.

consolidation_tolerancefloat | int = 10

Tolerance passed to node consolidation when generating Voronoi skeletons.

epsfloat = 1e-4

Tolerance epsilon used in multiple internal geometric operations.

Returns:
geopandas.GeoDataFrame

The road network line data following 1 iteration of simplification.