cartagen.mesh_density_selection#
- mesh_density_selection(gdf_roads, seuil_densite, col_importance=None)#
Select the important road segments based on mesh density.
Select the important road segments based on mesh density, following the algorithm by Chen et al. [1] The algorithm iteratively removes the least important road segments that are located on the boundary of the densest mesh, until all meshes have a density below the specified threshold.
Parameters:#
- gdf_roadsgpd.GeoDataFrame
The GeoDataFrame containing the LineString of the road network.
- seuil_densitefloat
The density threshold above which a segment must be eliminated.
- col_importancestr, optional
The name of the column indicating the importance (e.g., road class). If None, the length of the segment is used (the shortest is eliminated).
Returns:#
- gpd.GeoDataFrame
A geodataframe containing the road network after selection and generalization.
See also
street_selectionSelect urban road segments based on block aggregation.
strokes_roadCalculate strokes inside a road network.
rural_trafficDetect central roads inside a network using traffic simulation.
References