# Quickfix #566
@@ -156,6 +156,8 @@ class AbstractModelAPISerializer:
|
||||
if isinstance(geojson, dict):
|
||||
geojson = json.dumps(geojson)
|
||||
geometry = geos.fromstr(geojson)
|
||||
if not geometry.valid:
|
||||
raise ValueError(f"Invalid geometry: {geometry.valid_reason}")
|
||||
is_4326 = Geometry.is_valid_4326(geometry)
|
||||
if not is_4326:
|
||||
raise ValueError("Geometry not in EPSG:4326 (WGS84). Unknown spatial reference system.")
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
"""
|
||||
Author: Michel Peltriaux
|
||||
Created on: 16.07.26
|
||||
|
||||
"""
|
||||
@@ -0,0 +1,5 @@
|
||||
"""
|
||||
Author: Michel Peltriaux
|
||||
Created on: 16.07.26
|
||||
|
||||
"""
|
||||
Reference in New Issue
Block a user