comparison flys-backend/contrib/shpimporter/utils.py @ 5137:04eb62eae722

River Axes and HWS_lines are now multiline
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 28 Feb 2013 12:58:25 +0100
parents c5187ab9f571
children 40dc001594e4
comparison
equal deleted inserted replaced
5136:ec3430d12d2e 5137:04eb62eae722
95 } 95 }
96 96
97 def getWkbString(type): 97 def getWkbString(type):
98 return WKB_MAP.get(type) or "Unknown" 98 return WKB_MAP.get(type) or "Unknown"
99 99
100 def convertToMultiLine(feature):
101 """
102 Converts a feature to a multiline feature.
103 """
104 geometry = feature.GetGeometryRef()
105 # SRS information is lost while forcing to multiline
106 srs = geometry.GetSpatialReference()
107 geometry = ogr.ForceToMultiLineString(geometry)
108 geometry.AssignSpatialReference(srs)
109 feature.SetGeometry(geometry)
110 return feature

http://dive4elements.wald.intevation.org