Mercurial > dive4elements > river
changeset 3950:82e931f88137
Adapted postgresql spatial schema and fixed a bug in the geo importer.
flys-backend/trunk@5587 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 24 Sep 2012 10:02:36 +0000 |
parents | 145b87bcb10a |
children | 89ada0b9083f |
files | flys-backend/ChangeLog flys-backend/contrib/shpimporter/importer.py flys-backend/doc/schema/postgresql-spatial.sql |
diffstat | 3 files changed, 22 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-backend/ChangeLog Mon Sep 24 09:14:48 2012 +0000 +++ b/flys-backend/ChangeLog Mon Sep 24 10:02:36 2012 +0000 @@ -1,3 +1,11 @@ +2012-09-24 Ingo Weinzierl <ingo@intevation.de> + + * contrib/shpimporter/importer.py: Fixed method name for ERROR log + messages. + + * doc/schema/postgresql-spatial.sql: Set geometry dim to '3' instead of + '4'. + 2012-09-24 Ingo Weinzierl <ingo@intevation.de> * src/main/java/de/intevation/flys/importer/ImportBedHeightEpoch.java,
--- a/flys-backend/contrib/shpimporter/importer.py Mon Sep 24 09:14:48 2012 +0000 +++ b/flys-backend/contrib/shpimporter/importer.py Mon Sep 24 10:02:36 2012 +0000 @@ -124,7 +124,7 @@ newFeat = self.transform(newFeat) res = destLayer.CreateFeature(newFeat) if res is None or res > 0: - shpimporter.Error("Unable to insert feature: %r" % res) + shpimporter.ERROR("Unable to insert feature: %r" % res) else: success = success + 1 else:
--- a/flys-backend/doc/schema/postgresql-spatial.sql Mon Sep 24 09:14:48 2012 +0000 +++ b/flys-backend/doc/schema/postgresql-spatial.sql Mon Sep 24 10:02:36 2012 +0000 @@ -9,7 +9,7 @@ name VARCHAR(64), path VARCHAR(256) ); -SELECT AddGeometryColumn('river_axes', 'geom', 31466, 'LINESTRING', 2); +SELECT AddGeometryColumn('river_axes', 'geom', 31467, 'LINESTRING', 2); ALTER TABLE river_axes ALTER COLUMN id SET DEFAULT NEXTVAL('RIVER_AXES_ID_SEQ'); @@ -23,7 +23,7 @@ name VARCHAR(64), path VARCHAR(256) ); -SELECT AddGeometryColumn('river_axes_km', 'geom', 31466, 'POINT', 2); +SELECT AddGeometryColumn('river_axes_km', 'geom', 31467, 'POINT', 2); ALTER TABLE river_axes_km ALTER COLUMN id SET DEFAULT NEXTVAL('RIVER_AXES_KM_ID_SEQ'); @@ -37,7 +37,7 @@ name VARCHAR(64), path VARCHAR(256) ); -SELECT AddGeometryColumn('cross_section_tracks', 'geom', 31466, 'LINESTRING', 2); +SELECT AddGeometryColumn('cross_section_tracks', 'geom', 31467, 'LINESTRING', 2); ALTER TABLE cross_section_tracks ALTER COLUMN id SET DEFAULT NEXTVAL('CROSS_SECTION_TRACKS_ID_SEQ'); @@ -51,7 +51,7 @@ name VARCHAR(64), path VARCHAR(256) ); -SELECT AddGeometryColumn('lines', 'geom', 31466, 'LINESTRING', 4); +SELECT AddGeometryColumn('lines', 'geom', 31467, 'LINESTRING', 3); ALTER TABLE lines ALTER COLUMN id SET DEFAULT NEXTVAL('LINES_ID_SEQ'); -- 'kind': -- 0: ROHR1 @@ -66,7 +66,7 @@ name VARCHAR(256), path VARCHAR(256) ); -SELECT AddGeometryColumn('buildings', 'geom', 31466, 'LINESTRING', 2); +SELECT AddGeometryColumn('buildings', 'geom', 31467, 'LINESTRING', 2); ALTER TABLE buildings ALTER COLUMN id SET DEFAULT NEXTVAL('BUILDINGS_ID_SEQ'); @@ -82,7 +82,7 @@ name VARCHAR(64), path VARCHAR(256) ); -SELECT AddGeometryColumn('fixpoints', 'geom', 31466, 'POINT', 2); +SELECT AddGeometryColumn('fixpoints', 'geom', 31467, 'POINT', 2); ALTER TABLE fixpoints ALTER COLUMN id SET DEFAULT NEXTVAL('FIXPOINTS_ID_SEQ'); @@ -94,7 +94,7 @@ name VARCHAR(64), path VARCHAR(256) ); -SELECT AddGeometryColumn('floodplain', 'geom', 31466, 'POLYGON', 2); +SELECT AddGeometryColumn('floodplain', 'geom', 31467, 'POLYGON', 2); ALTER TABLE floodplain ALTER COLUMN id SET DEFAULT NEXTVAL('FLOODPLAIN_ID_SEQ'); @@ -121,7 +121,7 @@ name VARCHAR(256), path VARCHAR(256) ); -SELECT AddGeometryColumn('catchment','geom',31466,'POLYGON',2); +SELECT AddGeometryColumn('catchment','geom',31467,'POLYGON',2); ALTER TABLE catchment ALTER COLUMN id SET DEFAULT NEXTVAL('CATCHMENT_ID_SEQ'); @@ -135,7 +135,7 @@ name VARCHAR(64), path VARCHAR(256) ); -SELECT AddGeometryColumn('hws','geom',31466,'LINESTRING',2); +SELECT AddGeometryColumn('hws','geom',31467,'LINESTRING',2); ALTER TABLE hws ALTER COLUMN id SET DEFAULT NEXTVAL('HWS_ID_SEQ'); @@ -161,7 +161,7 @@ perimeter real, path VARCHAR(256) ); -SELECT AddGeometryColumn('floodmaps', 'geom', 31466, 'MULTIPOLYGON', 2); +SELECT AddGeometryColumn('floodmaps', 'geom', 31467, 'MULTIPOLYGON', 2); ALTER TABLE floodmaps DROP CONSTRAINT enforce_geotype_geom; ALTER TABLE floodmaps ADD CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'POLYGON'::text OR geometrytype(geom) = 'MULTIPOLYGON'::text); ALTER TABLE floodmaps ALTER COLUMN id SET DEFAULT NEXTVAL('FLOODMAPS_ID_SEQ'); @@ -175,7 +175,7 @@ kind int, path VARCHAR(256) ); -SELECT AddGeometryColumn('hydr_boundaries','geom',31466,'LINESTRING',4); +SELECT AddGeometryColumn('hydr_boundaries','geom',31467,'LINESTRING',3); ALTER TABLE hydr_boundaries ALTER COLUMN id SET DEFAULT NEXTVAL('HYDR_BOUNDARIES_ID_SEQ'); @@ -187,7 +187,7 @@ kind int, path VARCHAR(256) ); -SELECT AddGeometryColumn('hydr_boundaries_poly','geom',31466,'POLYGON',4); +SELECT AddGeometryColumn('hydr_boundaries_poly','geom',31467,'POLYGON',3); ALTER TABLE hydr_boundaries_poly ALTER COLUMN id SET DEFAULT NEXTVAL('HYDR_BOUNDARIES_POLY_ID_SEQ'); @@ -198,7 +198,7 @@ name VARCHAR(255), path VARCHAR(256) ); -SELECT AddGeometryColumn('gauge_location','geom',31466,'POINT',2); +SELECT AddGeometryColumn('gauge_location','geom',31467,'POINT',2); ALTER TABLE gauge_location ALTER COLUMN id SET DEFAULT NEXTVAL('GAUGE_LOCATION_ID_SEQ'); COMMIT;