comparison 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
comparison
equal deleted inserted replaced
5138:fc0cdcae8f07 5139:76db0e48dbc0
192 def createNewFeature(self, featureDef, feat, **args): 192 def createNewFeature(self, featureDef, feat, **args):
193 newFeat = HWSPoints.createNewFeature(self, featureDef, feat, **args) 193 newFeat = HWSPoints.createNewFeature(self, featureDef, feat, **args)
194 geometry = feat.GetGeometryRef() 194 geometry = feat.GetGeometryRef()
195 if geometry.GetCoordinateDimension() == 2: 195 if geometry.GetCoordinateDimension() == 2:
196 geometry.SetCoordinateDimension(3) 196 geometry.SetCoordinateDimension(3)
197 for i in range(0, geometry.GetPointCount()):
198 x,y,z = geometry.GetPoint(i)
199 z = 9999
200 geometry.SetPoint(i, x, y, z)
197 newFeat.SetGeometry(geometry) 201 newFeat.SetGeometry(geometry)
198 202
199 return utils.convertToMultiLine(newFeat) 203 return utils.convertToMultiLine(newFeat)
200 204
201 205

http://dive4elements.wald.intevation.org