cartagen.boffet_areas#
- boffet_areas(buildings, buffer, erosion, simplification_distance=2.0)#
Calculate urban areas from buildings.
This algorithm proposed by Boffet [1] uses buffer around the buildings, then simplify and erode the unioned result to characterize urban areas.
- Parameters:
polygons (
listofPolygon) – Buildings to generate the urban area from.buffer (
float) – The buffer size used to merge buildings that are close from each other.erosion (
float) – The erosion size to avoid the urban area to expand too far from the buildings located on the edge.simplification_distance (
float, optional) – The distance threshold used by the Douglas-Peucker simplification on the edge.
- Returns:
See also
amalgamate_buildings_morphologicalAmalgamate buildings using dilation and erosion. Useful for larger scale maps.
References
Examples
>>> buildings = [Polygon([(1, 0), (9, 0), (9, 6), (1, 6), (1, 0)]), Polygon([(10, 0), (17, 0), (17, 6), (10, 6), (10, 0)])] >>> boffet_areas(buildings, 2.0, 1.0) <[<POLYGON ((-0.909 5.627, 17.078 7.784, 18.66 -0.02, 0.874 -1.782, -0.909 5.6...>]>