aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xwebmap-import4
1 files changed, 3 insertions, 1 deletions
diff --git a/webmap-import b/webmap-import
index fccdc84..56d907c 100755
--- a/webmap-import
+++ b/webmap-import
@@ -994,7 +994,9 @@ def importSource2(lyr_dst, path, args={}, basedir=None, extent=None):
f'to {ogr.GeometryTypeToName(eGType_dst)} not implemented')
feature2.SetGeometryDirectly(geom)
- lyr_dst.CreateFeature(feature2)
+ if lyr_dst.CreateFeature(feature2) != ogr.OGRERR_NONE:
+ raise Exception(f'Could not transfer source feature #{feature.GetFID()}')
+
n += 1
feature = lyr.GetNextFeature()