comparison flys-backend/contrib/shpimporter/crosssectiontracks.py @ 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 b0132e1b9719
children 59ca5dab2782
comparison
equal deleted inserted replaced
2866:77e849c0d248 2867:6442b30d80ec
36 36
37 if self.IsFieldSet(feat, "KILOMETER"): 37 if self.IsFieldSet(feat, "KILOMETER"):
38 newFeat.SetField("km", feat.GetFieldAsDouble("KILOMETER")) 38 newFeat.SetField("km", feat.GetFieldAsDouble("KILOMETER"))
39 elif self.IsFieldSet(feat, "KM"): 39 elif self.IsFieldSet(feat, "KM"):
40 newFeat.SetField("km", feat.GetFieldAsDouble("KM")) 40 newFeat.SetField("km", feat.GetFieldAsDouble("KM"))
41 elif self.IsFieldSet(feat, "STATION"):
42 newFeat.SetField("km", feat.GetFieldAsDouble("STATION"))
41 else: 43 else:
42 return None 44 return None
43 45
44 if self.IsFieldSet(feat, "ELEVATION"): 46 if self.IsFieldSet(feat, "ELEVATION"):
45 newFeat.SetField("z", feat.GetFieldAsDouble("ELEVATION")) 47 newFeat.SetField("z", feat.GetFieldAsDouble("ELEVATION"))

http://dive4elements.wald.intevation.org