[Dive4elements-commits] [PATCH] Schema change: new column 'waterbody' for floodmaps and importer

Wald Commits scm-commit at wald.intevation.org
Fri Apr 26 16:50:17 CEST 2013


# HG changeset patch
# User Tom Gottfried <tom.gottfried at intevation.de>
# Date 1366987814 -7200
# Node ID 249b8766a17827e43cc209fb3edbf9bf46dbfc5c
# Parent  774d25915eb1488682fcdeea3a590bfcd44ef88d
Schema change: new column 'waterbody' for floodmaps and importer

diff -r 774d25915eb1 -r 249b8766a178 backend/contrib/shpimporter/uesg.py
--- a/backend/contrib/shpimporter/uesg.py	Fri Apr 26 15:04:22 2013 +0200
+++ b/backend/contrib/shpimporter/uesg.py	Fri Apr 26 16:50:14 2013 +0200
@@ -80,6 +80,9 @@
         else:
             perimeter = 0
 
+        if self.IsFieldSet(feat, "GEWAESSER"):
+            newFeat.SetField("waterbody", feat.GetField("GEWAESSER"))
+
         if kind >= 200:
             newFeat.SetField("source",
                     os.path.basename(os.path.dirname(args['path'])))
diff -r 774d25915eb1 -r 249b8766a178 backend/doc/schema/oracle-spatial.sql
--- a/backend/doc/schema/oracle-spatial.sql	Fri Apr 26 15:04:22 2013 +0200
+++ b/backend/doc/schema/oracle-spatial.sql	Fri Apr 26 16:50:14 2013 +0200
@@ -319,6 +319,7 @@
     count NUMBER(38),
     area NUMBER(19,5),
     perimeter NUMBER(19,5),
+    waterbody  VARCHAR(64),
     path     VARCHAR(256),
     source   varchar(64),
     id NUMBER PRIMARY KEY NOT NULL
diff -r 774d25915eb1 -r 249b8766a178 backend/doc/schema/postgresql-spatial.sql
--- a/backend/doc/schema/postgresql-spatial.sql	Fri Apr 26 15:04:22 2013 +0200
+++ b/backend/doc/schema/postgresql-spatial.sql	Fri Apr 26 16:50:14 2013 +0200
@@ -238,6 +238,7 @@
     count      int,
     area       FLOAT8,
     perimeter  FLOAT8,
+    waterbody  varchar(64),
     path     VARCHAR(256),
     source   varchar(64)
 );


More information about the Dive4elements-commits mailing list