cartagen.typify_buildings_matching#
- typify_buildings_matching(buildings, initial_scale=25000, final_scale=50000, ratio=None, road_network=None, attributes=None, distance=20.0)#
Typify buildings using the matching-based algorithm for web mapping.
This algorithm was proposed by Li et al. [1] and replace tight groups of buildings with a single representative building.
The algorithm follows three main steps: First, it finds the number of buildings using improved radical law. Second, it calculates the position and representation through iterative merging. Finally, building sizes are harmonized.
- Parameters:
buildings (
GeoDataFrameofPolygonorMultiPolygon) – The buildings to typifyinitial_scale (
int, optional) – Source map scale denominator (default: 25000)final_scale (
int, optional) – Target map scale denominator (default: 50000)ratio (
float, optional) – Ratio between source and target number of buildings (e.g., 0.5 to reduce by half) If None, will be computed from initial_scale and final_scaleroad_network (
GeoDataFrameofLineString, optional) – Road network for spatial partitioning. If None, simple grid partitioning is usedattributes (
List[str], optional) – List of attribute names to transfer from largest building in each clusterdistance (
float, optional) – Minimum separate distance for building harmonization (in map units)
- Returns:
GeoDataFrameofPolygonorMultiPolygon– Typified buildings with transferred attributes
See also
typify_buildings_burghardt_cecconiTypify buildings using the Burghardt-Cecconi algorithm.
References