Mercurial > dive4elements > river
comparison flys-backend/doc/schema/oracle-spatial.sql @ 1250:660116539429
Added schema hws.
flys-backend/trunk@2734 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Bjoern Schilberg <bjoern@intevation.de> |
---|---|
date | Wed, 14 Sep 2011 09:49:18 +0000 |
parents | 735717961e0b |
children | f124c99077b5 |
comparison
equal
deleted
inserted
replaced
1249:735717961e0b | 1250:660116539429 |
---|---|
120 END; | 120 END; |
121 / | 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 | 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'); | 123 CREATE INDEX CrossSectionTracks_spatial_idx ON cross_section_tracks(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); |
124 | 124 |
125 --Hydrologie/HW-Schutzanlagen/hws.shp | |
126 CREATE SEQUENCE HWS_ID_SEQ; | |
127 CREATE TABLE hws( | |
128 OGR_FID NUMBER(38), | |
129 GEOM MDSYS.SDO_GEOMETRY, | |
130 river_id NUMBER(38), | |
131 hws_facility VARCHAR2(40), | |
132 type VARCHAR2(254), | |
133 ID NUMBER PRIMARY KEY NOT NULL | |
134 ); | |
135 --Extent: (2539778.101933, 5456638.161347) - (2567463.841704, 5500605.745332) | |
136 INSERT INTO USER_SDO_GEOM_METADATA VALUES ('hws', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2539778.101933,2567463.841704,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5456638.161347,5500605.745332,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466); | |
137 CREATE OR REPLACE TRIGGER hws_trigger BEFORE INSERT ON hws FOR each ROW | |
138 BEGIN | |
139 SELECT HWS_ID_SEQ.nextval INTO :new.id FROM dual; | |
140 END; | |
141 / | |
142 --/opt/gdal-1.8.0/bin/ogr2ogr -f OCI OCI:flys3/flys3@localhost hws.shp -sql 'SELECT 1 AS river_id,HWS_ANLAGE as hws_facility, TYP as type from HWS' -nln hws -append | |
143 CREATE INDEX hws_spatial_idx ON hws(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); | |
144 | |
145 | |
146 | |
125 END; | 147 END; |