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:
- artifacts
geopandas.GeoDataFrame
Face artifact polygons.
- roads
geopandas.GeoDataFrame
Preprocessed road network data.
- max_segment_length
float
|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.
- eps
float
= 1e-4 Tolerance epsilon used in multiple internal geometric operations.
- simplification_factor
float
|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_length
float
|int
= 20 The threshold for determining if linestrings are dangling slivers to be removed or not.
- consolidation_tolerance
float
|int
= 10 Tolerance passed to node consolidation when generating Voronoi skeletons.
- artifacts
- Returns:
geopandas.GeoDataFrame
The road network line data following the clusters procedure.