comparison flys-backend/contrib/shpimporter/dgm.py @ 4993:71e1b96f4794 dami

Add srid field
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 14 Feb 2013 17:45:13 +0100
parents 9eea3cd22ee7
children d6860fca89e4
comparison
equal deleted inserted replaced
4992:ecc6fd57b630 4993:71e1b96f4794
18 "format" : "Format", 18 "format" : "Format",
19 "border_break" : ("Bruchkanten", 19 "border_break" : ("Bruchkanten",
20 lambda x: True if x.lower() == "Ja" else False), 20 lambda x: True if x.lower() == "Ja" else False),
21 "resolution" : (latin("Auflösung"), lambda x: x), 21 "resolution" : (latin("Auflösung"), lambda x: x),
22 # "description" : 22 # "description" :
23 # : "SRID", 23 "srid" : "SRID",
24 "path" : ("Pfad_Bestand", lambda x: x), 24 "path" : ("Pfad_Bestand", lambda x: x),
25 } 25 }
26 26
27 SQL_INSERT_DGT = "INSERT INTO dem (river_id, " + ", ".join(DGM_MAP.keys()) + \ 27 SQL_INSERT_DGT = "INSERT INTO dem (river_id, " + ", ".join(DGM_MAP.keys()) + \
28 ") VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)" 28 ") VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)"
29 29
30 def insertRiverDgm(dbconn, dgmfile, river_name, dry_run): 30 def insertRiverDgm(dbconn, dgmfile, river_name, dry_run):
31 with codecs.open(dgmfile, "r", "latin1") as csvfile: 31 with codecs.open(dgmfile, "r", "latin1") as csvfile:
32 firstline = csvfile.readline() 32 firstline = csvfile.readline()
33 names = firstline.split(";") 33 names = firstline.split(";")

http://dive4elements.wald.intevation.org