diff flys-backend/contrib/shpimporter/axis.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 d4fdd98a04f7
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/axis.py	Thu Feb 28 12:48:27 2013 +0100
+++ b/flys-backend/contrib/shpimporter/axis.py	Thu Feb 28 12:58:25 2013 +0100
@@ -4,6 +4,7 @@
     import ogr
 
 from importer import Importer
+import utils
 
 NAME="Axis"
 TABLE_NAME="river_axes"
@@ -25,8 +26,10 @@
 
 
     def isGeometryValid(self, geomType):
-        return geomType == 2
-
+        return geomType in [ogr.wkbLineString,
+                            ogr.wkbLineString25D,
+                            ogr.wkbMultiLineString25D,
+                            ogr.wkbMultiLineString]
 
     def isShapeRelevant(self, name, path):
         return "achse" in name.lower()
@@ -50,5 +53,4 @@
         newFeat.SetField("river_id", riverId)
         newFeat.SetField("kind", kind)
 
-        return newFeat
-
+        return utils.convertToMultiLine(newFeat)

http://dive4elements.wald.intevation.org