[Dive4elements-commits] [PATCH] Add updated type mapping for jetties

Wald Commits scm-commit at wald.intevation.org
Thu Mar 21 09:22:07 CET 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1363854118 -3600
# Node ID 776427b5aa766c1403d77329b1d00cd0bfdee4be
# Parent  a5291a126e2401f50f0ed38e48aec82f5a357aae
Add updated type mapping for jetties

diff -r a5291a126e24 -r 776427b5aa76 flys-backend/contrib/shpimporter/jetties.py
--- a/flys-backend/contrib/shpimporter/jetties.py	Wed Mar 20 19:02:42 2013 +0100
+++ b/flys-backend/contrib/shpimporter/jetties.py	Thu Mar 21 09:21:58 2013 +0100
@@ -16,10 +16,16 @@
 NAME="Jetties"
 
 # strings need to be lowercase
+# buhnenkopf 0
+# buhnenfuß 1
+# buhnenwurzel 2
 JETTY_KIND = {
-        "buhnenkopf" : 0,
-        "buhnenfuß" : 1,
-        "buhnenwurzel" : 2,
+        "bkl" : 0,
+        "bkr" : 0,
+        "bfl" : 1,
+        "bfr" : 1,
+        "bwl" : 2,
+        "bwr" : 2,
     }
 
 class Jetties(Importer):
@@ -59,7 +65,7 @@
         if self.IsFieldSet(feat, artname):
             self.handled(artname)
             kind_id = JETTY_KIND.get(feat.GetField(artname).lower())
-            if not kind_id:
+            if kind_id == None:
                 logger.warn("Unknown Type: %s" % \
                         feat.GetField(artname))
             else:


More information about the Dive4elements-commits mailing list