comparison flys-backend/contrib/shpimporter/hws.py @ 5392:95050a944d81

Importer default official = False for hws
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 25 Mar 2013 10:22:48 +0100
parents f66a6c1a73e7
children
comparison
equal deleted inserted replaced
5391:e65fee5ea98a 5392:95050a944d81
166 if self.IsFieldSet(feat, fname): 166 if self.IsFieldSet(feat, fname):
167 self.handled(fname) 167 self.handled(fname)
168 offiziell = feat.GetField(fname) 168 offiziell = feat.GetField(fname)
169 if offiziell == "1" or offiziell == 1: 169 if offiziell == "1" or offiziell == 1:
170 newFeat.SetField("official", True) 170 newFeat.SetField("official", True)
171 else:
172 newFeat.SetField("official", False)
173 # Set the official value based on the file name as a fallback 171 # Set the official value based on the file name as a fallback
174 elif args.get("name", "").lower() == "rohre_und_sperren" or \ 172 elif args.get("name", "").lower() == "rohre_und_sperren" or \
175 args.get("name", "").lower() == "rohre-und-sperren": 173 args.get("name", "").lower() == "rohre-und-sperren":
176 newFeat.SetField("official", True) 174 newFeat.SetField("official", True)
175 else:
176 newFeat.SetField("official", False)
177 177
178 if self.IsFieldSet(newFeat, "z") and \ 178 if self.IsFieldSet(newFeat, "z") and \
179 self.IsFieldSet(newFeat, "rated_level"): 179 self.IsFieldSet(newFeat, "rated_level"):
180 fname = self.searchField("freibord(_m){0,1}$") 180 fname = self.searchField("freibord(_m){0,1}$")
181 self.handled(fname) 181 self.handled(fname)

http://dive4elements.wald.intevation.org