comparison flys-backend/contrib/shpimporter/importer.py @ 5365:90f1c5f67698

Importer: Do not return true for IsDoubleField set if the field does not exist. This prohibits the import of km's without a km attribute.
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 21 Mar 2013 18:24:47 +0100
parents b3a15fa3d88e
children 6c2751c17869
comparison
equal deleted inserted replaced
5364:51db7fbc2e77 5365:90f1c5f67698
71 else: 71 else:
72 result = match.group(0) 72 result = match.group(0)
73 return result 73 return result
74 74
75 def IsDoubleFieldSet(self, feat, name): 75 def IsDoubleFieldSet(self, feat, name):
76 if not self.IsFieldSet(feat, name):
77 return False
76 try: 78 try:
77 isset = feat.GetFieldAsDouble(name) 79 isset = feat.GetFieldAsDouble(name)
78 return isset is not None 80 return isset is not None
79 except: 81 except:
80 return False 82 return False

http://dive4elements.wald.intevation.org