changeset 5116:94ce92e73603 dami

removed obsolete importer code for catchments
author Tom Gottfried <tom@intevation.de>
date Wed, 27 Feb 2013 15:49:15 +0100
parents c4b28de753de
children d49b3baa30d0
files flys-backend/contrib/shpimporter/catchments.py flys-backend/contrib/shpimporter/run.sh
diffstat 2 files changed, 0 insertions(+), 58 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/catchments.py	Wed Feb 27 15:26:47 2013 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-try:
-    from osgeo import ogr
-except ImportError:
-    import ogr
-
-from importer import Importer
-
-TABLE_NAME="catchment"
-PATH="Hydrologie/Einzugsgebiet"
-NAME="Catchments"
-
-
-class Catchment(Importer):
-
-    def getPath(self, base):
-        return "%s/%s" % (base, PATH)
-
-
-    def getTablename(self):
-        return TABLE_NAME
-
-
-    def getName(self):
-        return NAME
-
-
-    def isGeometryValid(self, geomType):
-        return geomType == 3 or geomType == 6
-
-
-    def isShapeRelevant(self, name, path):
-        return True
-
-
-    def createNewFeature(self, featureDef, feat, **args):
-        newFeat  = ogr.Feature(featureDef)
-        geometry = feat.GetGeometryRef()
-        geometry.SetCoordinateDimension(2)
-
-        newFeat.SetGeometry(geometry)
-
-        if self.IsFieldSet(feat, "river_id"):
-            newFeat.SetField("river_id", feat.GetField("river_id"))
-        else:
-            newFeat.SetField("river_id", self.river_id)
-
-        if self.IsFieldSet(feat, "Name"):
-            newFeat.SetField("name", feat.GetField("name"))
-        else:
-            newFeat.SetField("name", args['name'])
-
-        if self.IsFieldSet(feat, "AREA"):
-            newFeat.SetField("area", feat.GetField("area"))
-
-        return newFeat
-
--- a/flys-backend/contrib/shpimporter/run.sh	Wed Feb 27 15:26:47 2013 +0100
+++ b/flys-backend/contrib/shpimporter/run.sh	Wed Feb 27 15:49:15 2013 +0100
@@ -20,7 +20,6 @@
 SKIP_HYDR_BOUNDARIES=0
 SKIP_HWS=0
 SKIP_GAUGE_LOCATION=0
-SKIP_CATCHMENTS=0
 SKIP_UESG=0
 
 exec python shpimporter.py \
@@ -41,6 +40,5 @@
     --skip_hydr_boundaries $SKIP_HYDR_BOUNDARIES \
     --skip_hws $SKIP_HWS \
     --skip_gauge_locations $SKIP_GAUGE_LOCATION \
-    --skip_catchments $SKIP_CATCHMENTS \
     --skip_uesgs $SKIP_UESG
 

http://dive4elements.wald.intevation.org