neatnet.simplify_clusters

neatnet.simplify_clusters#

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

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

This process extracts nodes from network edges before iterating over each cluster artifact and performing simplification.

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.

epsfloat = 1e-4

Tolerance epsilon used in multiple internal geometric operations.

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.

min_dangle_lengthfloat | int = 20

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

consolidation_tolerancefloat | int = 10

Tolerance passed to node consolidation when generating Voronoi skeletons.

Returns:
geopandas.GeoDataFrame

The road network line data following the clusters procedure.