Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/flys-backend/doc/schema/oracle-spatial.sql Wed Sep 14 08:54:07 2011 +0000 +++ b/flys-backend/doc/schema/oracle-spatial.sql Wed Sep 14 09:28:20 2011 +0000 @@ -99,6 +99,27 @@ SELECT RIVER_AXES_ID_SEQ.nextval INTO :new.id FROM dual; END; / +--/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 CREATE INDEX river_axes_spatial_idx ON river_axes(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); +--Geodaesie/Querprofile/QP-Spuren/qps.shp +CREATE SEQUENCE CROSS_SECTION_TRACKS_ID_SEQ; +CREATE TABLE cross_section_tracks ( + OGR_FID NUMBER(38), + GEOM MDSYS.SDO_GEOMETRY, + river_id NUMBER(38), + km NUMBER(14,12) NOT NULL, + z NUMBER(18,5) DEFAULT 0 NOT NULL, + ID NUMBER PRIMARY KEY NOT NULL +); +--Extent: (2539289.724000, 5450852.896743) - (2576589.878311, 5507289.656000) +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); +CREATE OR REPLACE TRIGGER cross_section_tracks_trigger BEFORE INSERT ON cross_section_tracks FOR each ROW + BEGIN + SELECT CROSS_SECTION_TRACKS_ID_SEQ.nextval INTO :new.id FROM dual; + END; +/ +-- /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 +CREATE INDEX CrossSectionTracks_spatial_idx ON cross_section_tracks(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); + END;