Compare commits
2
Commits
1.23
..
2aa625a6ac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2aa625a6ac | ||
|
|
d39e758df4 |
No files matched your search
@@ -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