Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/buildings.py Mon Mar 25 15:41:16 2013 +0100 +++ b/flys-backend/contrib/shpimporter/buildings.py Mon Mar 25 12:19:40 2013 +0100 @@ -62,9 +62,13 @@ return BUILDING_KINDS["pegel"] # Now it gets ugly when we search all attributes - if self.searchValue(feat, "^br[ueü]{0,2}cke[n]{0,1}$"): + ret = self.searchValue(feat, "^br[ueü]{0,2}cke[n]{0,1}$") + if ret: + self.handled(ret) return BUILDING_KINDS["brücken"] - if self.searchValue(feat, "^wehr[e]{0,1}$"): + ret = self.searchValue(feat, "^wehr[e]{0,1}$") + if ret: + self.handled(ret) return BUILDING_KINDS["wehre"] return BUILDING_KINDS["sonstige"]