Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/crosssectiontracks.py Tue Mar 12 10:58:35 2013 +0100 +++ b/flys-backend/contrib/shpimporter/crosssectiontracks.py Tue Mar 12 11:29:10 2013 +0100 @@ -37,6 +37,12 @@ newFeat.SetGeometry(feat.GetGeometryRef()) newFeat.SetField("name", args['name']) + if args['path'].lower().endswith("/qps.shp") and \ + not "sonstige" in args['path'].lower(): + newFeat.SetField("kind_id", 1) # offical + else: + newFeat.SetField("kind_id", 0) # misc + if self.IsFieldSet(feat, "river_id"): newFeat.SetField("river_id", feat.GetField("river_id")) else: