Mercurial > dive4elements > river
comparison flys-backend/doc/schema/oracle-spatial.sql @ 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 | 9ef49f3b0304 |
children | 57a845da72bd |
comparison
equal
deleted
inserted
replaced
5026:bdef4c74d675 | 5028:a5f438895a38 |
---|---|
146 CREATE OR REPLACE TRIGGER dem_trigger BEFORE INSERT ON dem FOR each ROW | 146 CREATE OR REPLACE TRIGGER dem_trigger BEFORE INSERT ON dem FOR each ROW |
147 BEGIN | 147 BEGIN |
148 SELECT DEM_ID_SEQ.nextval INTO :new.id FROM dual; | 148 SELECT DEM_ID_SEQ.nextval INTO :new.id FROM dual; |
149 END; | 149 END; |
150 / | 150 / |
151 | |
152 | |
153 -- Hydrologie/Einzugsgebiete/EZG.shp | |
154 CREATE SEQUENCE CATCHMENT_ID_SEQ; | |
155 CREATE TABLE catchment( | |
156 OGR_FID NUMBER(38), | |
157 GEOM MDSYS.SDO_GEOMETRY, | |
158 river_id NUMBER(38) REFERENCES rivers(id) ON DELETE CASCADE, | |
159 area NUMBER(19,5), | |
160 name VARCHAR2(255), | |
161 path VARCHAR(256), | |
162 ID NUMBER PRIMARY KEY NOT NULL | |
163 ); | |
164 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); | |
165 | |
166 CREATE TRIGGER catchment_trigger BEFORE INSERT ON catchment FOR each ROW | |
167 BEGIN | |
168 SELECT CATCHMENT_ID_SEQ.nextval INTO :new.id FROM dual; | |
169 END; | |
170 / | |
171 --CREATE INDEX catchment_spatial_idx ON catchment(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=polygon'); | |
172 | 151 |
173 --Static lookup tables for Hochwasserschutzanlagen | 152 --Static lookup tables for Hochwasserschutzanlagen |
174 CREATE TABLE hws_kinds ( | 153 CREATE TABLE hws_kinds ( |
175 id NUMBER PRIMARY KEY NOT NULL, | 154 id NUMBER PRIMARY KEY NOT NULL, |
176 kind VARCHAR(64) NOT NULL | 155 kind VARCHAR(64) NOT NULL |