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:
2026-09-09 14:32:31 +03:00
parent 5464ce370a
commit c368482d1c
+1 -1
View File
@@ -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 = {