changeset 5546:5b50247d4d99

Use latin1 as encoding in the dgm importer to make it easier matching latin1 csv values
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 04 Apr 2013 10:23:17 +0200
parents ed149d5d7fb7
children 38713f32a785
files flys-backend/contrib/shpimporter/dgm.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/dgm.py	Wed Apr 03 16:33:28 2013 +0200
+++ b/flys-backend/contrib/shpimporter/dgm.py	Thu Apr 04 10:23:17 2013 +0200
@@ -1,4 +1,4 @@
-# -*- coding: utf-8 -*-
+# -*- coding: latin-1 -*-
 
 import codecs
 import utils
@@ -14,11 +14,11 @@
 # <dbfield> : (<csvfield>, conversion function)
 DGM_MAP = {
     "projection"      : "Projektion",
-    "elevation_state" : latin("Höhenstatus"),
+    "elevation_state" : latin("Höhenstatus"),
     "format"          : "Format",
     "border_break"    : ("Bruchkanten",
         lambda x: True if x.lower() == "Ja" else False),
-    "resolution"      : (latin("Auflösung"), lambda x: x),
+    "resolution"      : (latin("Auflösung"), lambda x: x),
 #   "description"     : 
     "srid"            : "SRID",
     "path"            : ("Pfad_Bestand", lambda x: x),
@@ -111,7 +111,7 @@
         for line in csvfile:
             fields = line.split(";")
             if not fields: continue
-            if fields[namedict[latin("Gewässer")]] != \
+            if fields[namedict[latin("Gewässer")]] != \
                     unicode(utils.getUTF8(river_name),'UTF-8'):
                 continue
             else:

http://dive4elements.wald.intevation.org