comparison flys-backend/contrib/shpimporter/boundaries.py @ 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 2cd8fcec3f00
comparison
equal deleted inserted replaced
5511:4e166c514940 5512:b91ffd97edc8
57 newFeat.SetGeometry(geometry) 57 newFeat.SetGeometry(geometry)
58 newFeat.SetField("name", args['name']) 58 newFeat.SetField("name", args['name'])
59 newFeat.SetField("kind", kind) 59 newFeat.SetField("kind", kind)
60 if self.IsFieldSet(feat, "SECTIE"): 60 if self.IsFieldSet(feat, "SECTIE"):
61 newFeat.SetField("sectie", feat.GetField("SECTIE")) 61 newFeat.SetField("sectie", feat.GetField("SECTIE"))
62 else:
63 newFeat.SetField("sectie", 0)
62 64
63 if self.IsFieldSet(feat, "SOBEK"): 65 if self.IsFieldSet(feat, "SOBEK"):
64 newFeat.SetField("sobek", feat.GetField("SOBEK")) 66 newFeat.SetField("sobek", feat.GetField("SOBEK"))
67 else:
68 newFeat.SetField("sobek", 0)
65 69
66 if self.IsFieldSet(feat, "river_id"): 70 if self.IsFieldSet(feat, "river_id"):
67 newFeat.SetField("river_id", feat.GetField("river_id")) 71 newFeat.SetField("river_id", feat.GetField("river_id"))
68 else: 72 else:
69 newFeat.SetField("river_id", self.river_id) 73 newFeat.SetField("river_id", self.river_id)
100 newFeat.SetField("name", args['name']) 104 newFeat.SetField("name", args['name'])
101 newFeat.SetField("kind", kind) 105 newFeat.SetField("kind", kind)
102 106
103 if self.IsFieldSet(feat, "SECTIE"): 107 if self.IsFieldSet(feat, "SECTIE"):
104 newFeat.SetField("sectie", feat.GetField("SECTIE")) 108 newFeat.SetField("sectie", feat.GetField("SECTIE"))
109 else:
110 newFeat.SetField("sectie", 0)
105 111
106 if self.IsFieldSet(feat, "SOBEK"): 112 if self.IsFieldSet(feat, "SOBEK"):
107 newFeat.SetField("sobek", feat.GetField("SOBEK")) 113 newFeat.SetField("sobek", feat.GetField("SOBEK"))
108 114 else:
115 newFeat.SetField("sobek", 0)
109 116
110 if self.IsFieldSet(feat, "river_id"): 117 if self.IsFieldSet(feat, "river_id"):
111 newFeat.SetField("river_id", feat.GetField("river_id")) 118 newFeat.SetField("river_id", feat.GetField("river_id"))
112 else: 119 else:
113 newFeat.SetField("river_id", self.river_id) 120 newFeat.SetField("river_id", self.river_id)

http://dive4elements.wald.intevation.org