diff options
Diffstat (limited to 'ishtar_common/models_imports.py')
-rw-r--r-- | ishtar_common/models_imports.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ishtar_common/models_imports.py b/ishtar_common/models_imports.py index aab404b63..6f6d7109e 100644 --- a/ishtar_common/models_imports.py +++ b/ishtar_common/models_imports.py @@ -1091,7 +1091,6 @@ RE_COORDS = r"(" + RE_NUMBER + r") (" + RE_NUMBER + r")" def _reverse_coordinates(wkt): - # TODO: à effacer return re.sub(RE_COORDS, r"\2 \1", wkt) @@ -1110,7 +1109,9 @@ def convert_geom(feature, srid): if profile.srs and profile.srs.srid: srs = profile.srs.srid if srs != srid: - feature = GEOSGeometry(feature).transform(srs, clone=True).ewkt + # Coordinates are reversed - should be fixed on Django 3.2 + feature = _reverse_coordinates( + GEOSGeometry(feature).transform(srs, clone=True).ewkt) return feature |