changeset 2867:6442b30d80ec

The python crosssectiontrack importer now also searches for 'STATION' field to extract the current km. flys-backend/trunk@4373 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 10 May 2012 06:01:17 +0000
parents 77e849c0d248
children b6f94c5db89e
files flys-backend/ChangeLog flys-backend/contrib/shpimporter/crosssectiontracks.py
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/ChangeLog	Tue May 08 13:55:25 2012 +0000
+++ b/flys-backend/ChangeLog	Thu May 10 06:01:17 2012 +0000
@@ -1,3 +1,8 @@
+2012-05-10  Ingo Weinzierl <ingo@intevation.de>
+
+	* contrib/shpimporter/crosssectiontracks.py: Search for 'STATION' field in
+	  shapefile to extract the current km.
+
 2012-05-08  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/model/Hws.java: The getHws() function
--- a/flys-backend/contrib/shpimporter/crosssectiontracks.py	Tue May 08 13:55:25 2012 +0000
+++ b/flys-backend/contrib/shpimporter/crosssectiontracks.py	Thu May 10 06:01:17 2012 +0000
@@ -38,6 +38,8 @@
             newFeat.SetField("km", feat.GetFieldAsDouble("KILOMETER"))
         elif self.IsFieldSet(feat, "KM"):
             newFeat.SetField("km", feat.GetFieldAsDouble("KM"))
+        elif self.IsFieldSet(feat, "STATION"):
+            newFeat.SetField("km", feat.GetFieldAsDouble("STATION"))
         else:
             return None
 

http://dive4elements.wald.intevation.org