cartagen.mesh_density_selection

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_selection

Select urban road segments based on block aggregation.

strokes_road

Calculate strokes inside a road network.

rural_traffic

Detect central roads inside a network using traffic simulation.

References

(Source code)

../_images/mesh_density_selection.png