changeset 5512:b91ffd97edc8

Explicitly set sectie und sobek to 0 by default
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 28 Mar 2013 15:29:09 +0100
parents 4e166c514940
children ef3517905e6e
files flys-backend/contrib/shpimporter/boundaries.py
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/boundaries.py	Thu Mar 28 15:28:05 2013 +0100
+++ b/flys-backend/contrib/shpimporter/boundaries.py	Thu Mar 28 15:29:09 2013 +0100
@@ -59,9 +59,13 @@
         newFeat.SetField("kind", kind)
         if self.IsFieldSet(feat, "SECTIE"):
             newFeat.SetField("sectie", feat.GetField("SECTIE"))
+        else:
+            newFeat.SetField("sectie", 0)
 
         if self.IsFieldSet(feat, "SOBEK"):
             newFeat.SetField("sobek", feat.GetField("SOBEK"))
+        else:
+            newFeat.SetField("sobek", 0)
 
         if self.IsFieldSet(feat, "river_id"):
             newFeat.SetField("river_id", feat.GetField("river_id"))
@@ -102,10 +106,13 @@
 
         if self.IsFieldSet(feat, "SECTIE"):
             newFeat.SetField("sectie", feat.GetField("SECTIE"))
+        else:
+            newFeat.SetField("sectie", 0)
 
         if self.IsFieldSet(feat, "SOBEK"):
             newFeat.SetField("sobek", feat.GetField("SOBEK"))
-
+        else:
+            newFeat.SetField("sobek", 0)
 
         if self.IsFieldSet(feat, "river_id"):
             newFeat.SetField("river_id", feat.GetField("river_id"))

http://dive4elements.wald.intevation.org