comparison flys-backend/contrib/shpimporter/importer.py @ 5407:db5def5456ce

Only match strings vor field values
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 25 Mar 2013 17:00:37 +0100
parents ff11b178f152
children
comparison
equal deleted inserted replaced
5406:e88d55d01cf5 5407:db5def5456ce
51 fields of a feature. 51 fields of a feature.
52 52
53 @returns the name of the field where a match was found or None 53 @returns the name of the field where a match was found or None
54 """ 54 """
55 for val in feat.items(): 55 for val in feat.items():
56 if not isinstance(feat.items()[val], basestring):
57 continue
56 match = re.match(regex, feat.items()[val], re.IGNORECASE) 58 match = re.match(regex, feat.items()[val], re.IGNORECASE)
57 if match: 59 if match:
58 return val 60 return val
59 61
60 def searchField(self, regex): 62 def searchField(self, regex):

http://dive4elements.wald.intevation.org