changeset 7004:bb5bd48b80f6 double-precision

DGM-importer: enforce a < b for ranges.
author Tom Gottfried <tom.gottfried@intevation.de>
date Thu, 12 Sep 2013 19:15:07 +0200
parents 3d83a4cf33ba
children dddf633fec05
files backend/contrib/shpimporter/dgm.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/backend/contrib/shpimporter/dgm.py	Thu Sep 12 18:58:19 2013 +0200
+++ b/backend/contrib/shpimporter/dgm.py	Thu Sep 12 19:15:07 2013 +0200
@@ -122,8 +122,10 @@
                     else:
                         values.append(unicode.encode(
                             fields[namedict[val]], "UTF-8"))
-                km_von = fields[namedict["km_von"]]
-                km_bis = fields[namedict["km_bis"]]
+                km_von = min(float(fields[namedict["km_von"]]), 
+                    float(fields[namedict["km_bis"]]))
+                km_bis = max(float(fields[namedict["km_von"]]), 
+                    float(fields[namedict["km_bis"]]))
                 year_from = None
                 year_to = None
                 try:

http://dive4elements.wald.intevation.org