comparison flys-backend/contrib/shpimporter/crosssectiontracks.py @ 5242:88e3473a3846 2.9.12

Add kind handling for floodplains and crossectiontracks getFloodplain / getCrossection now return only the "current" one 1 is current 0 is misc
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 12 Mar 2013 11:29:10 +0100
parents c5187ab9f571
children
comparison
equal deleted inserted replaced
5241:31b464f17392 5242:88e3473a3846
35 def createNewFeature(self, featureDef, feat, **args): 35 def createNewFeature(self, featureDef, feat, **args):
36 newFeat = ogr.Feature(featureDef) 36 newFeat = ogr.Feature(featureDef)
37 newFeat.SetGeometry(feat.GetGeometryRef()) 37 newFeat.SetGeometry(feat.GetGeometryRef())
38 newFeat.SetField("name", args['name']) 38 newFeat.SetField("name", args['name'])
39 39
40 if args['path'].lower().endswith("/qps.shp") and \
41 not "sonstige" in args['path'].lower():
42 newFeat.SetField("kind_id", 1) # offical
43 else:
44 newFeat.SetField("kind_id", 0) # misc
45
40 if self.IsFieldSet(feat, "river_id"): 46 if self.IsFieldSet(feat, "river_id"):
41 newFeat.SetField("river_id", feat.GetField("river_id")) 47 newFeat.SetField("river_id", feat.GetField("river_id"))
42 else: 48 else:
43 newFeat.SetField("river_id", self.river_id) 49 newFeat.SetField("river_id", self.river_id)
44 50

http://dive4elements.wald.intevation.org