comparison flys-backend/doc/schema/oracle-spatial.sql @ 2862:998f1a7dcfde

New shape importers and schema modifications. flys-backend/trunk@4345 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 04 May 2012 06:58:00 +0000
parents b0132e1b9719
children c37effda3655
comparison
equal deleted inserted replaced
2861:b0132e1b9719 2862:998f1a7dcfde
254 BEGIN 254 BEGIN
255 SELECT HYDR_BOUNDARIES_POLY_ID_SEQ.nextval INTO :new.id FROM dual; 255 SELECT HYDR_BOUNDARIES_POLY_ID_SEQ.nextval INTO :new.id FROM dual;
256 END; 256 END;
257 / 257 /
258 CREATE INDEX hydr_boundaries_poly_idx ON hydr_boundaries_poly(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=MULTIPOLYGON'); 258 CREATE INDEX hydr_boundaries_poly_idx ON hydr_boundaries_poly(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=MULTIPOLYGON');
259
260
261 -- Hydrologie/Streckendaten/
262 CREATE SEQUENCE GAUGE_LOCATION_ID_SEQ;
263 CREATE TABLE gauge_location (
264 OGR_FID NUMBER(38),
265 GEOM MDSYS.SDO_GEOMETRY,
266 river_id NUMBER(38),
267 name VARCHAR(64),
268 id NUMBER PRIMARY KEY NOT NULL
269 );
270 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('gauge_location', '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);
271 CREATE OR REPLACE TRIGGER gauge_location_trigger BEFORE INSERT ON gauge_location FOR EACH ROW
272 BEGIN
273 SELECT GAUGE_LOCATION_ID_SEQ.nextval INTO :new.id FROM dual;
274 END;
275 /
276 CREATE INDEX gauge_location_idx ON gauge_location(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=POINT');

http://dive4elements.wald.intevation.org