dtcc.City.merge_buildings(max_distance=0.15, min_area=10, simplify=True, properties_merge_strategy='list', height_merge_strategy='mean') City

Merge buildings that are close together.

Parameters:
max_distance : float, optional

The maximum distance in meters between buildings to consider them close enough to merge (default 0.15).

min_area : float, optional

The minimum area in square meters for a building to be kept (default 10).

simplify : bool, optional

Whether to simplify the merged buildings (default True).

properties_merge_strategy : str, optional

The strategy for merging properties. Options are ‘list’ and ‘sample’. ‘list’ will create a list of all properties for the merged building. ‘sample’ will pick a property value from a random building (default “list”).

height_merge_strategy : str, optional

The strategy for merging heights. Options are ‘mean’, ‘area_weighted’ and ‘max’ . ‘mean’ will take the mean height of the merged buildings. ‘area_weighted’ will take the area weighted mean height of the merged buildings. ‘max’ will take the maximum height of the merged buildings (default “mean”).

Returns:

A new City object with the merged buildings.

Return type:

City