aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2023-10-01 17:33:36 +0200
committerGuilhem Moulin <guilhem@fripost.org>2023-10-01 17:33:36 +0200
commit2e9aa8388c3275a72239502d763ec5a96335a906 (patch)
tree80f0bdab4b6c2e510321b163e74f0970651fb6ef
parentd5e1dccb6864ed691022dd9ed55eae9c116c0185 (diff)
Ensure --geometry values are valid.
-rwxr-xr-xgis-observation-map2
1 files changed, 2 insertions, 0 deletions
diff --git a/gis-observation-map b/gis-observation-map
index ea057e0..8fc48de 100755
--- a/gis-observation-map
+++ b/gis-observation-map
@@ -312,6 +312,8 @@ for geom in args.geometry:
feature = layer.GetNextFeature()
while feature is not None:
geometry = feature.GetGeometryRef()
+ if not geometry.IsValid():
+ raise Exception('Invalid geometry')
geometry.Transform(transform_srs)
if args.margin is None: