fix: relation с одним кольцом — geom как dict, не coordinates-список
polygons.append(poly['coordinates']) хранит [ring]; при 1 кольце geom=polygons[0] отдавал голый список (не dict) → pydantic dict_type валидация GeoFeature падала 500. Теперь ветки собирают dict явно.
This commit is contained in:
@@ -175,7 +175,7 @@ def _water_geoms(elements: list[dict]) -> list[dict]:
|
||||
if not polygons:
|
||||
continue
|
||||
if len(polygons) == 1:
|
||||
geom = polygons[0] # {'type': 'Polygon', 'coordinates': [ring]}
|
||||
geom = {'type': 'Polygon', 'coordinates': polygons[0]}
|
||||
else:
|
||||
# GeoJSON MultiPolygon: coordinates = список polygon.coordinates.
|
||||
geom = {
|
||||
|
||||
Reference in New Issue
Block a user