[Dive4elements-commits] [PATCH 1 of 2] Always set axis geometry dimension to be 3d

Wald Commits scm-commit at wald.intevation.org
Mon Mar 4 17:46:37 CET 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1362415563 -3600
# Node ID f52bb7178eda28385a8de55d89dffc91718ca2d8
# Parent  c1b60f8c3390a20c90a2e8a1115e51ab71c8d06a
Always set axis geometry dimension to be 3d

diff -r c1b60f8c3390 -r f52bb7178eda flys-backend/contrib/shpimporter/axis.py
--- a/flys-backend/contrib/shpimporter/axis.py	Mon Mar 04 17:11:31 2013 +0100
+++ b/flys-backend/contrib/shpimporter/axis.py	Mon Mar 04 17:46:03 2013 +0100
@@ -37,7 +37,9 @@
 
     def createNewFeature(self, featureDef, feat, **args):
         newFeat = ogr.Feature(featureDef)
-        newFeat.SetGeometry(feat.GetGeometryRef())
+        geometry = feat.GetGeometryRef()
+        geometry.SetCoordinateDimension(3)
+        newFeat.SetGeometry(geometry)
         newFeat.SetField("name", args['name'])
 
         if self.IsFieldSet(feat, "river_id"):


More information about the Dive4elements-commits mailing list