changeset 1245:0414181b0859

Fixed table river_axes_km. flys-backend/trunk@2723 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Schilberg <bjoern@intevation.de>
date Wed, 14 Sep 2011 06:57:28 +0000
parents 281f38fc6c3e
children e334314e8eb2
files flys-backend/ChangeLog flys-backend/doc/schema/oracle-spatial.sql
diffstat 2 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/ChangeLog	Tue Sep 13 20:06:48 2011 +0000
+++ b/flys-backend/ChangeLog	Wed Sep 14 06:57:28 2011 +0000
@@ -1,3 +1,7 @@
+2011-09-14  Bjoern Schilberg <bjoern@intevation.de>
+
+	*  doc/schema/oracle-spatial.sql: Fixed table river_axes_km.
+
 2011-09-13  Bjoern Schilberg <bjoern@intevation.de>
 
 	*  doc/schema/oracle-spatial.sql: Added initial oracle schemas.
--- a/flys-backend/doc/schema/oracle-spatial.sql	Tue Sep 13 20:06:48 2011 +0000
+++ b/flys-backend/doc/schema/oracle-spatial.sql	Wed Sep 14 06:57:28 2011 +0000
@@ -23,10 +23,9 @@
 --/opt/gdal-1.8.0/bin/ogr2ogr -f OCI OCI:flys3/flys3@localhost EZG.shp -sql 'SELECT 1 AS river_id,AREA as area, GEBIETZBEZ as name FROM EZG' -nln catchment -append
 CREATE INDEX catchment_spatial_idx ON catchment(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=polygon');
 
--- FIXME
 -- Geodaesie/Flussachse+km/km.shp
-CREATE SEQUENCE test_ID_SEQ;
-CREATE TABLE test(
+CREATE SEQUENCE RIVER_AXES_KM_ID_SEQ;
+CREATE TABLE river_axes_km(
     OGR_FID NUMBER(38),
     GEOM MDSYS.SDO_GEOMETRY,
     river_id NUMBER(38),
@@ -34,14 +33,13 @@
     ID NUMBER PRIMARY KEY NOT NULL
 );
 --Extent: (2539489.068000, 5450953.000500) - (2575482.527500, 5507278.634500)
-INSERT INTO USER_SDO_GEOM_METADATA VALUES ('test', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2539490.068000,2575482.527500,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5450953.000500,5507278.634500,0.001)), 31466);
-CREATE TRIGGER test_trigger BEFORE INSERT ON test FOR each ROW
+INSERT INTO USER_SDO_GEOM_METADATA VALUES ('river_axes_km', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2539491.068000,2575482.527500,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5450953.000500,5507278.634500,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466);
+CREATE OR REPLACE TRIGGER river_axes_km_trigger BEFORE INSERT ON river_axes_km FOR each ROW
     BEGIN
-        SELECT TEST_ID_SEQ.nextval INTO :new.id FROM dual;
+        SELECT river_axes_km_ID_SEQ.nextval INTO :new.id FROM dual;
     END;
 /
---/opt/gdal-1.8.0/bin/ogr2ogr -f OCI OCI:flys3/flys3@localhost km.shp -sql 'SELECT 1 AS river_id,km as km FROM km' -nln test -nlt POINT -append
-CREATE INDEX test_spatial_idx ON test(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=point');
---CREATE INDEX test_spatial_idx ON test(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('sdo_indx_dims=2,LAYER_GTYPE=point');
+--/opt/gdal-1.8.0/bin/ogr2ogr -f OCI OCI:flys3/flys3@localhost km.shp -sql 'SELECT 1 AS river_id,km as km FROM km' -nln river_axes_km -append
+CREATE INDEX river_axes_km_spatial_idx ON river_axes_km(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=point');
 
 END;

http://dive4elements.wald.intevation.org