comparison flys-backend/contrib/shpimporter/buildings.py @ 5401:ff11b178f152

Fix searchValue and mark a field where a string is found as handled
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 25 Mar 2013 12:19:40 +0100
parents 974f0e3dcc28
children b91cc44312b7
comparison
equal deleted inserted replaced
5400:acc34bf0d5b2 5401:ff11b178f152
60 for fname in ["pegel.shp"]: 60 for fname in ["pegel.shp"]:
61 if path.lower().endswith(fname): 61 if path.lower().endswith(fname):
62 return BUILDING_KINDS["pegel"] 62 return BUILDING_KINDS["pegel"]
63 63
64 # Now it gets ugly when we search all attributes 64 # Now it gets ugly when we search all attributes
65 if self.searchValue(feat, "^br[ueü]{0,2}cke[n]{0,1}$"): 65 ret = self.searchValue(feat, "^br[ueü]{0,2}cke[n]{0,1}$")
66 if ret:
67 self.handled(ret)
66 return BUILDING_KINDS["brücken"] 68 return BUILDING_KINDS["brücken"]
67 if self.searchValue(feat, "^wehr[e]{0,1}$"): 69 ret = self.searchValue(feat, "^wehr[e]{0,1}$")
70 if ret:
71 self.handled(ret)
68 return BUILDING_KINDS["wehre"] 72 return BUILDING_KINDS["wehre"]
69 73
70 return BUILDING_KINDS["sonstige"] 74 return BUILDING_KINDS["sonstige"]
71 75
72 76

http://dive4elements.wald.intevation.org