changeset 1247:6c6c5500d72d

Added schema fixpoints. flys-backend/trunk@2727 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Schilberg <bjoern@intevation.de>
date Wed, 14 Sep 2011 08:07:08 +0000
parents e334314e8eb2
children f36ed659003c
files flys-backend/ChangeLog flys-backend/doc/schema/oracle-spatial.sql
diffstat 2 files changed, 27 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/ChangeLog	Wed Sep 14 07:20:26 2011 +0000
+++ b/flys-backend/ChangeLog	Wed Sep 14 08:07:08 2011 +0000
@@ -1,3 +1,7 @@
+2011-09-14  Bjoern Schilberg <bjoern@intevation.de>
+
+	*  doc/schema/oracle-spatial.sql: Added schema fixpoints.
+
 2011-09-14  Bjoern Schilberg <bjoern@intevation.de>
 
 	*  doc/schema/oracle-spatial.sql: Added schema buildings.
--- a/flys-backend/doc/schema/oracle-spatial.sql	Wed Sep 14 07:20:26 2011 +0000
+++ b/flys-backend/doc/schema/oracle-spatial.sql	Wed Sep 14 08:07:08 2011 +0000
@@ -61,6 +61,28 @@
 --/opt/gdal-1.8.0/bin/ogr2ogr -f OCI OCI:flys3/flys3@localhost Wehre.shp -sql 'SELECT 1 AS river_id,Name as name FROM Wehre' -nln buildings -append
 CREATE INDEX buildings_spatial_idx ON buildings(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE');
 
+-- Geodaesie/Festpunkte/Festpunkte.shp
+CREATE SEQUENCE FIXPOINTS_ID_SEQ;
+CREATE TABLE fixpoints (
+    OGR_FID NUMBER(38),
+    GEOM MDSYS.SDO_GEOMETRY,
+    river_id NUMBER(38),
+    x NUMBER(19,11),
+    y NUMBER(19,11),
+    km NUMBER(10) NOT NULL,
+    HPGP VARCHAR2(254),
+    ID NUMBER PRIMARY KEY NOT NULL
+);
+--Extent: (2539388.036000, 5450896.688000) - (2575586.296000, 5507370.606000)
+INSERT INTO USER_SDO_GEOM_METADATA VALUES ('fixpoints', 'GEOM', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2539388.036000,2575586.296000,0.001),MDSYS.SDO_DIM_ELEMENT('Y',5450896.688000,5507370.606000,0.001),MDSYS.SDO_DIM_ELEMENT('Z',-100000,100000,0.002)), 31466);
+CREATE OR REPLACE TRIGGER fixpoints_trigger BEFORE INSERT ON fixpoints FOR each ROW
+    BEGIN
+        SELECT FIXPOINTS_ID_SEQ.nextval INTO :new.id FROM dual;
+    END;
+/
+--/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
+CREATE INDEX fixpoints_spatial_idx ON fixpoints(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=POINT');
+
+
 
 END;
-

http://dive4elements.wald.intevation.org