diff flys-backend/contrib/shpimporter/km.py @ 5356:a5291a126e24

Enforce two dimensional point geometries
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 20 Mar 2013 19:02:42 +0100
parents f0c47b4beded
children
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/km.py	Wed Mar 20 19:02:10 2013 +0100
+++ b/flys-backend/contrib/shpimporter/km.py	Wed Mar 20 19:02:42 2013 +0100
@@ -34,7 +34,11 @@
 
     def createNewFeature(self, featureDef, feat, **args):
         newFeat = ogr.Feature(featureDef)
-        newFeat.SetGeometry(feat.GetGeometryRef())
+
+        geometry = feat.GetGeometryRef()
+        geometry.SetCoordinateDimension(2)
+        newFeat.SetGeometry(geometry)
+
         newFeat.SetField("name", args['name'])
 
         if self.IsFieldSet(feat, "river_id"):

http://dive4elements.wald.intevation.org