comparison flys-backend/doc/schema/oracle-spatial.sql @ 5358:59f9760e8b7f

Switch to 2D for fixpoints and river_axes This is needed so that the spatial index can work. The importer only imports them as 2D geometries
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 21 Mar 2013 09:30:46 +0100
parents 555a99dff849
children 2da74705c29d
comparison
equal deleted inserted replaced
5357:776427b5aa76 5358:59f9760e8b7f
37 km NUMBER(7,3), 37 km NUMBER(7,3),
38 name VARCHAR(64), 38 name VARCHAR(64),
39 path VARCHAR(256), 39 path VARCHAR(256),
40 ID NUMBER PRIMARY KEY NOT NULL 40 ID NUMBER PRIMARY KEY NOT NULL
41 ); 41 );
42 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('river_axes_km', '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); 42 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('river_axes_km', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',3282450,3912240,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5248260,6100130,0.001)), 31467);
43 CREATE OR REPLACE TRIGGER river_axes_km_trigger BEFORE INSERT ON river_axes_km FOR each ROW 43 CREATE OR REPLACE TRIGGER river_axes_km_trigger BEFORE INSERT ON river_axes_km FOR each ROW
44 BEGIN 44 BEGIN
45 SELECT river_axes_km_ID_SEQ.nextval INTO :new.id FROM dual; 45 SELECT river_axes_km_ID_SEQ.nextval INTO :new.id FROM dual;
46 END; 46 END;
47 / 47 /
108 HPGP VARCHAR2(255), 108 HPGP VARCHAR2(255),
109 name VARCHAR(64), 109 name VARCHAR(64),
110 path VARCHAR(256), 110 path VARCHAR(256),
111 ID NUMBER PRIMARY KEY NOT NULL 111 ID NUMBER PRIMARY KEY NOT NULL
112 ); 112 );
113 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('fixpoints', '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); 113 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('fixpoints', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',3282450,3912240,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5248260,6100130,0.001)), 31467);
114 CREATE OR REPLACE TRIGGER fixpoints_trigger BEFORE INSERT ON fixpoints FOR each ROW 114 CREATE OR REPLACE TRIGGER fixpoints_trigger BEFORE INSERT ON fixpoints FOR each ROW
115 BEGIN 115 BEGIN
116 SELECT FIXPOINTS_ID_SEQ.nextval INTO :new.id FROM dual; 116 SELECT FIXPOINTS_ID_SEQ.nextval INTO :new.id FROM dual;
117 END; 117 END;
118 / 118 /

http://dive4elements.wald.intevation.org