Mercurial > dive4elements > river
diff flys-backend/contrib/shpimporter/hws.py @ 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 | 04eb62eae722 |
children | 74ae3bba1ccc |
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)