neatnet.simplify_pairs

Contents

neatnet.simplify_pairs#

neatnet.simplify_pairs(artifacts, roads, max_segment_length=1, min_dangle_length=20, clip_limit=2, simplification_factor=2, consolidation_tolerance=10)[source]#

Simplification of pairs of face artifacts – the second simplification step in the procedure detailed in simplify.simplify_loop().

This process extracts nodes from network edges before identifying non-planarity and cluster information.

If paired artifacts are present we further classify them as grouped by first vs. last instance of duplicated component label, and whether or not to be simplified with the clustered process.

Finally, simplification is performed based on the following order of typologies:
  1. Singletons – merged pairs & first instance (w/o COINS)

  2. Singletons – Second instance – w/ COINS

  3. Clusters

Parameters:
artifactsgeopandas.GeoDataFrame

Face artifact polygons.

roadsgeopandas.GeoDataFrame

Preprocessed road network data.

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.

Returns:
geopandas.GeoDataFrame

The road network line data following the pairs procedure.