Mercurial > dive4elements > river
comparison flys-backend/doc/schema/oracle-spatial.sql @ 1248:f36ed659003c
Added schema river_axes.
flys-backend/trunk@2728 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Bjoern Schilberg <bjoern@intevation.de> |
---|---|
date | Wed, 14 Sep 2011 08:54:07 +0000 |
parents | 6c6c5500d72d |
children | 735717961e0b |
comparison
equal
deleted
inserted
replaced
1247:6c6c5500d72d | 1248:f36ed659003c |
---|---|
81 END; | 81 END; |
82 / | 82 / |
83 --/opt/gdal-1.8.0/bin/ogr2ogr -f OCI OCI:flys3/flys3@localhost Festpunkte.shp -sql 'SELECT 1 AS river_id,x as x,y as y, km as km, HPGP as HPGP FROM Festpunkte' -nln fixpoints -append | 83 --/opt/gdal-1.8.0/bin/ogr2ogr -f OCI OCI:flys3/flys3@localhost Festpunkte.shp -sql 'SELECT 1 AS river_id,x as x,y as y, km as km, HPGP as HPGP FROM Festpunkte' -nln fixpoints -append |
84 CREATE INDEX fixpoints_spatial_idx ON fixpoints(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=POINT'); | 84 CREATE INDEX fixpoints_spatial_idx ON fixpoints(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=POINT'); |
85 | 85 |
86 | 86 -- Geodaesie/Flussachse+km/achse |
87 CREATE SEQUENCE RIVER_AXES_ID_SEQ; | |
88 CREATE TABLE river_axes( | |
89 OGR_FID NUMBER(38), | |
90 GEOM MDSYS.SDO_GEOMETRY, | |
91 river_id NUMBER(38), | |
92 kind NUMBER(38) DEFAULT 0 NOT NULL, | |
93 ID NUMBER PRIMARY KEY NOT NULL | |
94 ); | |
95 --Extent: (2539488.036000, 5450928.892000) - (2575486.407000, 5507352.839000) | |
96 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('river_axes', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2539488.036000,2575486.407000,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5450928.892000,5507352.839000,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); | |
97 CREATE OR REPLACE TRIGGER river_axes_trigger BEFORE INSERT ON river_axes FOR each ROW | |
98 BEGIN | |
99 SELECT RIVER_AXES_ID_SEQ.nextval INTO :new.id FROM dual; | |
100 END; | |
101 / | |
102 CREATE INDEX river_axes_spatial_idx ON river_axes(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); | |
87 | 103 |
88 END; | 104 END; |