comparison flys-backend/doc/schema/oracle-spatial.sql @ 5013:eecd1ebba128 dami

SCHEMA CHANGE: removed obsolete table 'lines' from spatial schema (now 'hws_lines')
author Tom Gottfried <tom.gottfried@intevation.de>
date Tue, 19 Feb 2013 09:57:57 +0100
parents f5912365619c
children 9ef49f3b0304
comparison
equal deleted inserted replaced
5010:ee52faa6b7ac 5013:eecd1ebba128
55 BEGIN 55 BEGIN
56 SELECT CROSS_SECTION_TRACKS_ID_SEQ.nextval INTO :new.id FROM dual; 56 SELECT CROSS_SECTION_TRACKS_ID_SEQ.nextval INTO :new.id FROM dual;
57 END; 57 END;
58 / 58 /
59 --CREATE INDEX CrossSectionTracks_spatial_idx ON cross_section_tracks(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); 59 --CREATE INDEX CrossSectionTracks_spatial_idx ON cross_section_tracks(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE');
60
61
62 -- TODO: TestMe. Fix Importer-Script. Fix oracle_spatial_idx.sql script.
63 -- Geodaesie/Linien/rohre-und-speeren
64 CREATE SEQUENCE LINES_ID_SEQ;
65 CREATE TABLE lines (
66 OGR_FID NUMBER(38),
67 GEOM MDSYS.SDO_GEOMETRY,
68 river_id NUMBER(38),
69 kind VARCHAR2(16) NOT NULL,
70 z NUMBER(38,12) DEFAULT 0,
71 name VARCHAR(64),
72 path VARCHAR(256),
73 ID NUMBER PRIMARY KEY NOT NULL
74 );
75 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('lines', '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);
76 CREATE OR REPLACE TRIGGER lines_trigger BEFORE INSERT ON lines FOR each ROW
77 BEGIN
78 SELECT LINES_ID_SEQ.nextval INTO :new.id FROM dual;
79 END;
80 /
81 -- NOTE: Should lines should be 3D.
82 -- TODO: Test index.
83 --CREATE INDEX lines_idx ON lines(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE');
84 -- 'kind':
85 -- 0: ROHR1
86 -- 1: DAMM
87 60
88 61
89 -- Geodaesie/Bauwerke/Wehre.shp 62 -- Geodaesie/Bauwerke/Wehre.shp
90 CREATE SEQUENCE BUILDINGS_ID_SEQ; 63 CREATE SEQUENCE BUILDINGS_ID_SEQ;
91 CREATE TABLE buildings( 64 CREATE TABLE buildings(

http://dive4elements.wald.intevation.org