# HG changeset patch # User Tom Gottfried # Date 1361264450 -3600 # Node ID 97dfb065a3001f5b2a5bdbac89ed576307233723 # Parent eecd1ebba128a036269f1297c7dab85aa1b2031e# Parent a79f6a085ab60faadbfa3166baab890e6606635a merge diff -r a79f6a085ab6 -r 97dfb065a300 flys-backend/doc/schema/oracle-spatial.sql --- a/flys-backend/doc/schema/oracle-spatial.sql Tue Feb 19 09:53:16 2013 +0100 +++ b/flys-backend/doc/schema/oracle-spatial.sql Tue Feb 19 10:00:50 2013 +0100 @@ -59,33 +59,6 @@ --CREATE INDEX CrossSectionTracks_spatial_idx ON cross_section_tracks(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); --- TODO: TestMe. Fix Importer-Script. Fix oracle_spatial_idx.sql script. --- Geodaesie/Linien/rohre-und-speeren -CREATE SEQUENCE LINES_ID_SEQ; -CREATE TABLE lines ( - OGR_FID NUMBER(38), - GEOM MDSYS.SDO_GEOMETRY, - river_id NUMBER(38), - kind VARCHAR2(16) NOT NULL, - z NUMBER(38,12) DEFAULT 0, - name VARCHAR(64), - path VARCHAR(256), - ID NUMBER PRIMARY KEY NOT NULL -); -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); -CREATE OR REPLACE TRIGGER lines_trigger BEFORE INSERT ON lines FOR each ROW - BEGIN - SELECT LINES_ID_SEQ.nextval INTO :new.id FROM dual; - END; -/ --- NOTE: Should lines should be 3D. --- TODO: Test index. ---CREATE INDEX lines_idx ON lines(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); --- 'kind': --- 0: ROHR1 --- 1: DAMM - - -- Geodaesie/Bauwerke/Wehre.shp CREATE SEQUENCE BUILDINGS_ID_SEQ; CREATE TABLE buildings( diff -r a79f6a085ab6 -r 97dfb065a300 flys-backend/doc/schema/oracle-spatial_idx.sql --- a/flys-backend/doc/schema/oracle-spatial_idx.sql Tue Feb 19 09:53:16 2013 +0100 +++ b/flys-backend/doc/schema/oracle-spatial_idx.sql Tue Feb 19 10:00:50 2013 +0100 @@ -6,4 +6,4 @@ CREATE INDEX CrossSectionTracks_spatial_idx ON cross_section_tracks(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); CREATE INDEX hws_spatial_idx ON hws(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); CREATE INDEX floodplain_spatial_idx ON floodplain(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=POLYGON'); -CREATE INDEX lines_idx ON lines(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); + diff -r a79f6a085ab6 -r 97dfb065a300 flys-backend/doc/schema/postgresql-spatial.sql --- a/flys-backend/doc/schema/postgresql-spatial.sql Tue Feb 19 09:53:16 2013 +0100 +++ b/flys-backend/doc/schema/postgresql-spatial.sql Tue Feb 19 10:00:50 2013 +0100 @@ -41,23 +41,6 @@ ALTER TABLE cross_section_tracks ALTER COLUMN id SET DEFAULT NEXTVAL('CROSS_SECTION_TRACKS_ID_SEQ'); --- Geodaesie/Linien/rohre-und-spreen -CREATE SEQUENCE LINES_ID_SEQ; -CREATE TABLE lines ( - id int PRIMARY KEY NOT NULL, - river_id int REFERENCES rivers(id) ON DELETE CASCADE, - kind VARCHAR(16) NOT NULL, - z FLOAT8 DEFAULT 0, - name VARCHAR(64), - path VARCHAR(256) -); -SELECT AddGeometryColumn('lines', 'geom', 31467, 'LINESTRING', 3); -ALTER TABLE lines ALTER COLUMN id SET DEFAULT NEXTVAL('LINES_ID_SEQ'); --- 'kind': --- 0: ROHR1 --- 1: DAMM - - -- Geodaesie/Bauwerke/Wehre.shp CREATE SEQUENCE BUILDINGS_ID_SEQ; CREATE TABLE buildings (