comparison flys-backend/doc/schema/oracle-spatial.sql @ 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
comparison
equal deleted inserted replaced
1246:e334314e8eb2 1247:6c6c5500d72d
59 END; 59 END;
60 / 60 /
61 --/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 61 --/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
62 CREATE INDEX buildings_spatial_idx ON buildings(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE'); 62 CREATE INDEX buildings_spatial_idx ON buildings(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=LINE');
63 63
64 -- Geodaesie/Festpunkte/Festpunkte.shp
65 CREATE SEQUENCE FIXPOINTS_ID_SEQ;
66 CREATE TABLE fixpoints (
67 OGR_FID NUMBER(38),
68 GEOM MDSYS.SDO_GEOMETRY,
69 river_id NUMBER(38),
70 x NUMBER(19,11),
71 y NUMBER(19,11),
72 km NUMBER(10) NOT NULL,
73 HPGP VARCHAR2(254),
74 ID NUMBER PRIMARY KEY NOT NULL
75 );
76 --Extent: (2539388.036000, 5450896.688000) - (2575586.296000, 5507370.606000)
77 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);
78 CREATE OR REPLACE TRIGGER fixpoints_trigger BEFORE INSERT ON fixpoints FOR each ROW
79 BEGIN
80 SELECT FIXPOINTS_ID_SEQ.nextval INTO :new.id FROM dual;
81 END;
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
84 CREATE INDEX fixpoints_spatial_idx ON fixpoints(GEOM) indextype IS MDSYS.SPATIAL_INDEX parameters ('LAYER_GTYPE=POINT');
85
86
64 87
65 END; 88 END;
66

http://dive4elements.wald.intevation.org