Mercurial > dive4elements > river
changeset 5028:a5f438895a38 dami
SCHEMA CHANGE: removed catchements from schema and geo-importer (obsolete)
author | Tom Gottfried <tom.gottfried@intevation.de> |
---|---|
date | Tue, 19 Feb 2013 19:24:36 +0100 |
parents | bdef4c74d675 |
children | 96d330bc40d0 |
files | flys-backend/contrib/shpimporter/shpimporter.py flys-backend/doc/schema/oracle-spatial.sql flys-backend/doc/schema/oracle-spatial_idx.sql flys-backend/doc/schema/postgresql-spatial.sql |
diffstat | 4 files changed, 0 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/shpimporter.py Tue Feb 19 14:59:44 2013 +0100 +++ b/flys-backend/contrib/shpimporter/shpimporter.py Tue Feb 19 19:24:36 2013 +0100 @@ -18,7 +18,6 @@ from boundaries import HydrBoundary, HydrBoundaryPoly from hws import HWSLines, HWSPoints from gauges import GaugeLocation -from catchments import Catchment from dgm import insertRiverDgm logger = logging.getLogger("shpimporter") @@ -45,7 +44,6 @@ HWSLines(river_id, dbconn, dry_run), HWSPoints(river_id, dbconn, dry_run), GaugeLocation(river_id, dbconn, dry_run), - Catchment(river_id, dbconn, dry_run), UESG(river_id, dbconn, dry_run) ] @@ -70,7 +68,6 @@ parser.add_option("--skip_hws_lines", type="int") parser.add_option("--skip_hws_points", type="int") parser.add_option("--skip_gauge_locations", type="int") - parser.add_option("--skip_catchments", type="int") parser.add_option("--skip_kms", type="int") parser.add_option("--skip_uesgs", type="int") parser.add_option("--skip_dgm", type="int") @@ -122,8 +119,6 @@ return True elif config.skip_gauge_locations == 1 and isinstance(importer, GaugeLocation): return True - elif config.skip_catchments == 1 and isinstance(importer, Catchment): - return True elif config.skip_kms == 1 and isinstance(importer, KM): return True elif config.skip_uesgs == 1 and isinstance(importer, UESG):
--- a/flys-backend/doc/schema/oracle-spatial.sql Tue Feb 19 14:59:44 2013 +0100 +++ b/flys-backend/doc/schema/oracle-spatial.sql Tue Feb 19 19:24:36 2013 +0100 @@ -149,27 +149,6 @@ END; / - --- Hydrologie/Einzugsgebiete/EZG.shp -CREATE SEQUENCE CATCHMENT_ID_SEQ; -CREATE TABLE catchment( - OGR_FID NUMBER(38), - GEOM MDSYS.SDO_GEOMETRY, - river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, - area NUMBER(19,5), - name VARCHAR2(255), - path VARCHAR(256), - ID NUMBER PRIMARY KEY NOT NULL -); -INSERT INTO USER_SDO_GEOM_METADATA VALUES ('CATCHMENT', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',3282450,3912240,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5248260,6100130,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31467); - -CREATE TRIGGER catchment_trigger BEFORE INSERT ON catchment FOR each ROW - BEGIN - SELECT CATCHMENT_ID_SEQ.nextval INTO :new.id FROM dual; - END; -/ ---CREATE INDEX catchment_spatial_idx ON catchment(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=polygon'); - --Static lookup tables for Hochwasserschutzanlagen CREATE TABLE hws_kinds ( id NUMBER PRIMARY KEY NOT NULL,
--- a/flys-backend/doc/schema/oracle-spatial_idx.sql Tue Feb 19 14:59:44 2013 +0100 +++ b/flys-backend/doc/schema/oracle-spatial_idx.sql Tue Feb 19 19:24:36 2013 +0100 @@ -1,4 +1,3 @@ -CREATE INDEX catchment_spatial_idx ON catchment(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=multipolygon'); CREATE INDEX river_axes_km_spatial_idx ON river_axes_km(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=point'); CREATE INDEX buildings_spatial_idx ON buildings(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); CREATE INDEX fixpoints_spatial_idx ON fixpoints(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=POINT');
--- a/flys-backend/doc/schema/postgresql-spatial.sql Tue Feb 19 14:59:44 2013 +0100 +++ b/flys-backend/doc/schema/postgresql-spatial.sql Tue Feb 19 19:24:36 2013 +0100 @@ -104,18 +104,6 @@ ALTER TABLE dem ALTER COLUMN id SET DEFAULT NEXTVAL('DEM_ID_SEQ'); --- Hydrologie/Einzugsgebiete/EZG.shp -CREATE SEQUENCE CATCHMENT_ID_SEQ; -CREATE TABLE catchment ( - id int PRIMARY KEY NOT NULL, - river_id int REFERENCES rivers(id) ON DELETE CASCADE, - area FLOAT8, - name VARCHAR(256), - path VARCHAR(256) -); -SELECT AddGeometryColumn('catchment','geom',31467,'POLYGON',2); -ALTER TABLE catchment ALTER COLUMN id SET DEFAULT NEXTVAL('CATCHMENT_ID_SEQ'); - -- Static lookup tables for Hochwasserschutzanlagen CREATE TABLE hws_kinds ( id int PRIMARY KEY NOT NULL,