Mercurial > dive4elements > river
comparison flys-backend/doc/schema/oracle-spatial.sql @ 1249:735717961e0b
Added schema cross_section_tracks.
flys-backend/trunk@2731 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Bjoern Schilberg <bjoern@intevation.de> |
---|---|
date | Wed, 14 Sep 2011 09:28:20 +0000 |
parents | f36ed659003c |
children | 660116539429 |
comparison
equal
deleted
inserted
replaced
1248:f36ed659003c | 1249:735717961e0b |
---|---|
97 CREATE OR REPLACE TRIGGER river_axes_trigger BEFORE INSERT ON river_axes FOR each ROW | 97 CREATE OR REPLACE TRIGGER river_axes_trigger BEFORE INSERT ON river_axes FOR each ROW |
98 BEGIN | 98 BEGIN |
99 SELECT RIVER_AXES_ID_SEQ.nextval INTO :new.id FROM dual; | 99 SELECT RIVER_AXES_ID_SEQ.nextval INTO :new.id FROM dual; |
100 END; | 100 END; |
101 / | 101 / |
102 --/opt/gdal-1.8.0/bin/ogr2ogr -f OCI OCI:flys3/flys3@localhost achse.shp -sql 'SELECT 1 AS river_id,0 as kind from achse' -nln river_axes -append | |
102 CREATE INDEX river_axes_spatial_idx ON river_axes(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); | 103 CREATE INDEX river_axes_spatial_idx ON river_axes(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); |
103 | 104 |
105 --Geodaesie/Querprofile/QP-Spuren/qps.shp | |
106 CREATE SEQUENCE CROSS_SECTION_TRACKS_ID_SEQ; | |
107 CREATE TABLE cross_section_tracks ( | |
108 OGR_FID NUMBER(38), | |
109 GEOM MDSYS.SDO_GEOMETRY, | |
110 river_id NUMBER(38), | |
111 km NUMBER(14,12) NOT NULL, | |
112 z NUMBER(18,5) DEFAULT 0 NOT NULL, | |
113 ID NUMBER PRIMARY KEY NOT NULL | |
114 ); | |
115 --Extent: (2539289.724000, 5450852.896743) - (2576589.878311, 5507289.656000) | |
116 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('cross_section_tracks', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2539289.724000,2576589.878311,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5450852.896743,5507289.656000,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); | |
117 CREATE OR REPLACE TRIGGER cross_section_tracks_trigger BEFORE INSERT ON cross_section_tracks FOR each ROW | |
118 BEGIN | |
119 SELECT CROSS_SECTION_TRACKS_ID_SEQ.nextval INTO :new.id FROM dual; | |
120 END; | |
121 / | |
122 -- /opt/gdal-1.8.0/bin/ogr2ogr -f OCI OCI:flys3/flys3@localhost qps.shp -sql 'SELECT 1 AS river_id,KILOMETER as km, ELEVATION as z from qps' -nln cross_section_tracks -append | |
123 CREATE INDEX CrossSectionTracks_spatial_idx ON cross_section_tracks(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); | |
124 | |
104 END; | 125 END; |