fix: polygons уже содержит polygon.coordinates — MultiPolygon.coordinates = polygons
This commit is contained in:
@@ -177,10 +177,10 @@ def _water_geoms(elements: list[dict]) -> list[dict]:
|
||||
if len(polygons) == 1:
|
||||
geom = polygons[0] # {'type': 'Polygon', 'coordinates': [ring]}
|
||||
else:
|
||||
# GeoJSON MultiPolygon: собираем полигоны в один Multi.
|
||||
# GeoJSON MultiPolygon: coordinates = список polygon.coordinates.
|
||||
geom = {
|
||||
'type': 'MultiPolygon',
|
||||
'coordinates': [p['coordinates'] for p in polygons],
|
||||
'coordinates': polygons,
|
||||
}
|
||||
out.append({'layer': layer, 'name': name, 'geom': geom,
|
||||
'area_m2': sum(areas),
|
||||
|
||||
Reference in New Issue
Block a user