Mercurial > dive4elements > river
comparison flys-backend/contrib/shpimporter/dgm.py @ 5156:f459911fdbfb
Fixed upper and lower conversions in DGM
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 01 Mar 2013 13:28:04 +0100 |
parents | 4f46679e13d0 |
children | 908848b74d7e |
comparison
equal
deleted
inserted
replaced
5155:6b19902baf31 | 5156:f459911fdbfb |
---|---|
6 def latin(string): | 6 def latin(string): |
7 return unicode(string, "latin1") | 7 return unicode(string, "latin1") |
8 | 8 |
9 # <dbfield> : (<csvfield>, conversion function) | 9 # <dbfield> : (<csvfield>, conversion function) |
10 DGM_MAP = { | 10 DGM_MAP = { |
11 "lower" : ("km_von", lambda x: int(x)), | 11 "lower" : ("km_von", lambda x: float(x)), |
12 "upper" : ("km_bis", lambda x: int(x)), | 12 "upper" : ("km_bis", lambda x: float(x)), |
13 "year_from" : "Jahr_von", | 13 "year_from" : "Jahr_von", |
14 "year_to" : "Jahr_bis", | 14 "year_to" : "Jahr_bis", |
15 "projection" : "Projektion", | 15 "projection" : "Projektion", |
16 "elevation_state" : latin("Höhenstatus"), | 16 "elevation_state" : latin("Höhenstatus"), |
17 "format" : "Format", | 17 "format" : "Format", |