From 7e00e3c42f496e5a51d3b8fa093f58ad85b2a669 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 27 Feb 2026 17:09:47 +0100 Subject: 🐛 fix GIS library transition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/models_imports.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ishtar_common/models_imports.py b/ishtar_common/models_imports.py index 510a9ff7d..0e9f3f6fd 100644 --- a/ishtar_common/models_imports.py +++ b/ishtar_common/models_imports.py @@ -1351,6 +1351,8 @@ def convert_geom(feature, srid): if not feature: return feature srid = int(srid) + if isinstance(feature, fiona.model.Geometry): + feature = fiona.model.to_dict(feature) geo_type = feature["type"] if geo_type in ("LineString", "Polygon"): feature["type"] = "Multi" + geo_type @@ -2506,6 +2508,8 @@ class Import(BaseImport): # https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6 elif crs.startswith("+init=epsg:"): srid = crs[len("+init=epsg:"):] + elif crs.lower().startswith("epsg:"): + srid = int(crs[len("epsg:"):]) else: srid = CRS.from_proj4(crs).to_epsg() data = [] -- cgit v1.2.3