changeset 5139:76db0e48dbc0

Importer: When a hws linestring was two dimensional import it with z=9999
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 28 Feb 2013 13:15:42 +0100
parents fc0cdcae8f07
children 18ef819a7c92
files flys-backend/contrib/shpimporter/hws.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/hws.py	Thu Feb 28 13:09:26 2013 +0100
+++ b/flys-backend/contrib/shpimporter/hws.py	Thu Feb 28 13:15:42 2013 +0100
@@ -194,6 +194,10 @@
         geometry = feat.GetGeometryRef()
         if geometry.GetCoordinateDimension() == 2:
             geometry.SetCoordinateDimension(3)
+            for i in range(0, geometry.GetPointCount()):
+                x,y,z = geometry.GetPoint(i)
+                z = 9999
+                geometry.SetPoint(i, x, y, z)
         newFeat.SetGeometry(geometry)
 
         return utils.convertToMultiLine(newFeat)

http://dive4elements.wald.intevation.org