comparison flys-backend/contrib/shpimporter/dgm.py @ 5222:3b86bf214d53

Fix check for river_name in dgm to handle unicode names
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 11 Mar 2013 16:52:02 +0100
parents 76818dc2c937
children 8f71fe38977c
comparison
equal deleted inserted replaced
5221:aa043641d9c8 5222:3b86bf214d53
114 114
115 river_id = utils.getRiverId(dbconn, river_name, oracle) 115 river_id = utils.getRiverId(dbconn, river_name, oracle)
116 for line in csvfile: 116 for line in csvfile:
117 fields = line.split(";") 117 fields = line.split(";")
118 if not fields: continue 118 if not fields: continue
119 if fields[namedict[latin("Gewässer")]] != river_name: 119 if fields[namedict[latin("Gewässer")]] != \
120 unicode(utils.getUTF8(river_name),'UTF-8'):
120 continue 121 continue
121 else: 122 else:
122 values=[] 123 values=[]
123 for key, val in DGM_MAP.items(): 124 for key, val in DGM_MAP.items():
124 if isinstance(val, tuple): 125 if isinstance(val, tuple):

http://dive4elements.wald.intevation.org