#243 Feature without geometry
* fixes GDALException in case of provided feature (import) without geometry content * modifies 500.html template to inform the user about the admins being informed automatically
This commit is contained in:
@@ -82,7 +82,12 @@ class SimpleGeomForm(BaseForm):
|
||||
"MultiPolygon25D",
|
||||
]
|
||||
for feature in features_json:
|
||||
feature_geom = json.dumps(feature.get("geometry", feature))
|
||||
feature_geom = feature.get("geometry", feature)
|
||||
if feature_geom is None:
|
||||
# Fallback for rare cases where a feature does not contain any geometry
|
||||
continue
|
||||
|
||||
feature_geom = json.dumps(feature_geom)
|
||||
g = gdal.OGRGeometry(feature_geom, srs=DEFAULT_SRID_RLP)
|
||||
|
||||
flatten_geometry = g.coord_dim > 2
|
||||
|
||||
Reference in New Issue
Block a user