Skip to content
Permalink
Browse files

[Oracle][Tests] Enhance Geometry creation SQL script

(cherry-picked from 3f6cd31)
  • Loading branch information
rldhont authored and nyalldawson committed May 4, 2018
1 parent d29317c commit a51d618d3972eb61e1c865570412fa26e3eb2827
Showing with 11 additions and 11 deletions.
  1. +11 −11 tests/testdata/provider/testdata_oracle.sql
@@ -37,20 +37,20 @@ INSERT INTO QGIS.POINT_DATA ("pk", GEOM)

CREATE TABLE QGIS.LINE_DATA ( "pk" INTEGER PRIMARY KEY, GEOM SDO_GEOMETRY);
INSERT INTO QGIS.LINE_DATA ("pk", GEOM)
SELECT 1, SDO_UTIL.FROM_WKTGEOMETRY('LINESTRING(1 2, 3 4, 5 6)') from dual
UNION ALL SELECT 4, SDO_GEOMETRY( 3002,4326,NULL, SDO_ELEM_INFO_ARRAY(1,2,1), SDO_ORDINATE_ARRAY(1,2,3,4,5,6,7,8,9)) from dual
UNION ALL SELECT 5, SDO_UTIL.FROM_WKTGEOMETRY('MULTILINESTRING ((1.0 2.0, 3.0 4.0),(5.0 6.0, 7.0 8.0, 9.0 10.0))') from dual
UNION ALL SELECT 6, SDO_UTIL.FROM_WKTGEOMETRY('MULTILINESTRING ((1.0 2.0 11.0, 3.0 4.0 -11.0),(5.0 6.0 9.0, 7.0 8.0 1.0, 9.0 10.0 -3.0))') from dual
SELECT 1, SDO_GEOMETRY( 2002,4326,NULL, SDO_ELEM_INFO_ARRAY(1,2,1), SDO_ORDINATE_ARRAY(1,2,3,4,5,6)) from dual
UNION ALL SELECT 4, SDO_GEOMETRY(3002,4326,NULL, SDO_ELEM_INFO_ARRAY(1,2,1), SDO_ORDINATE_ARRAY(1,2,3,4,5,6,7,8,9)) from dual
UNION ALL SELECT 5, SDO_GEOMETRY(2006,4326,NULL, SDO_ELEM_INFO_ARRAY(1,2,1, 5,2,1), SDO_ORDINATE_ARRAY(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) from dual
UNION ALL SELECT 6, SDO_GEOMETRY(3006,4326,NULL, SDO_ELEM_INFO_ARRAY(1,2,1, 7,2,1), SDO_ORDINATE_ARRAY(1, 2, 11, 3, 4, -11, 5, 6, 9, 7, 8, 1, 9, 10, -3)) from dual

CREATE TABLE QGIS.POLY_DATA ( "pk" INTEGER PRIMARY KEY, GEOM SDO_GEOMETRY);
INSERT INTO QGIS.POLY_DATA ("pk", GEOM)
SELECT 1, SDO_UTIL.FROM_WKTGEOMETRY('POLYGON ((1.0 2.0, 11.0 2.0, 11.0 22.0, 1.0 22.0, 1.0 2.0))') from dual
UNION ALL SELECT 2, SDO_UTIL.FROM_WKTGEOMETRY('POLYGON ((1.0 2.0 3.0, 11.0 2.0 13.0, 11.0 22.0 15.0, 1.0 22.0 7.0, 1.0 2.0 3.0))') from dual
UNION ALL SELECT 3, SDO_UTIL.FROM_WKTGEOMETRY('POLYGON ((1.0 2.0, 11.0 2.0, 11.0 22.0, 1.0 22.0, 1.0 2.0),(5.0 6.0, 8.0 9.0, 8.0 6.0, 5.0 6.0),(3.0 4.0, 5.0 6.0, 3.0 6.0, 3.0 4.0))') from dual
UNION ALL SELECT 4, SDO_UTIL.FROM_WKTGEOMETRY('POLYGON ((1.0 2.0 3.0, 11.0 2.0 13.0, 11.0 22.0 15.0, 1.0 22.0 7.0, 1.0 2.0 3.0),(5.0 6.0 1.0, 8.0 9.0 -1.0, 8.0 6.0 2.0, 5.0 6.0 1.0))') from dual
UNION ALL SELECT 5, SDO_GEOMETRY( 2003,4326,NULL, SDO_ELEM_INFO_ARRAY(1,1003,3), SDO_ORDINATE_ARRAY(1.0, 2.0, 11.0, 22.0)) from dual
UNION ALL SELECT 7, SDO_UTIL.FROM_WKTGEOMETRY('MULTIPOLYGON (((1.0 2.0, 11.0 2.0, 11.0 22.0, 1.0 22.0, 1.0 2.0)),((1.0 2.0, 11.0 2.0, 11.0 22.0, 1.0 22.0, 1.0 2.0),(5.0 6.0, 8.0 9.0, 8.0 6.0, 5.0 6.0),(3.0 4.0, 5.0 6.0, 3.0 6.0, 3.0 4.0)))') from dual
UNION ALL SELECT 8, SDO_UTIL.FROM_WKTGEOMETRY('MULTIPOLYGON (((1.0 2.0 3.0, 11.0 2.0 13.0, 11.0 22.0 15.0, 1.0 22.0 7.0, 1.0 2.0 3.0)),((1.0 2.0 3.0, 11.0 2.0 13.0, 11.0 22.0 15.0, 1.0 22.0 7.0, 1.0 2.0 3.0),(5.0 6.0 1.0, 8.0 9.0 -1.0, 8.0 6.0 2.0, 5.0 6.0 1.0)))') from dual
SELECT 1, SDO_GEOMETRY(2003,4326,NULL, SDO_ELEM_INFO_ARRAY(1,1003,1), SDO_ORDINATE_ARRAY(1, 2, 11, 2, 11, 22, 1, 22, 1, 2)) from dual
UNION ALL SELECT 2, SDO_GEOMETRY(3003,4326,NULL, SDO_ELEM_INFO_ARRAY(1,1003,1), SDO_ORDINATE_ARRAY(1, 2, 3, 11, 2, 13, 11, 22, 15, 1, 22, 7, 1, 2, 3)) from dual
UNION ALL SELECT 3, SDO_GEOMETRY(2003,4326,NULL, SDO_ELEM_INFO_ARRAY(1,1003,1, 11,2003,1, 19,2003,1), SDO_ORDINATE_ARRAY(1, 2, 11, 2, 11, 22, 1, 22, 1, 2, 5, 6, 8, 9, 8, 6, 5, 6, 3, 4, 5, 6, 3, 6, 3, 4)) from dual
UNION ALL SELECT 4, SDO_GEOMETRY(3003,4326,NULL, SDO_ELEM_INFO_ARRAY(1,1003,1, 16,2003,1), SDO_ORDINATE_ARRAY(1, 2, 3, 11, 2, 13, 11, 22, 15, 1, 22, 7, 1, 2, 3, 5, 6, 1, 8, 9, -1, 8, 6, 2, 5, 6, 1)) from dual
UNION ALL SELECT 5, SDO_GEOMETRY(2003,4326,NULL, SDO_ELEM_INFO_ARRAY(1,1003,3), SDO_ORDINATE_ARRAY(1.0, 2.0, 11.0, 22.0)) from dual
UNION ALL SELECT 7, SDO_GEOMETRY(2007,4326,NULL, SDO_ELEM_INFO_ARRAY(1,1003,1, 11,1003,1, 21,2003,1, 29,2003,1), SDO_ORDINATE_ARRAY(1, 2, 11, 2, 11, 22, 1, 22, 1, 2, 1, 2, 11, 2, 11, 22, 1, 22, 1, 2, 5, 6, 8, 9, 8, 6, 5, 6, 3, 4, 5, 6, 3, 6, 3, 4)) from dual
UNION ALL SELECT 8, SDO_GEOMETRY(3007,4326,NULL, SDO_ELEM_INFO_ARRAY(1,1003,1, 16,1003,1, 31,2003,1), SDO_ORDINATE_ARRAY(1, 2, 3, 11, 2, 13, 11, 22, 15, 1, 22, 7, 1, 2, 3, 1, 2, 3, 11, 2, 13, 11, 22, 15, 1, 22, 7, 1, 2, 3, 5, 6, 1, 8, 9, -1, 8, 6, 2, 5, 6, 1)) from dual

CREATE TABLE QGIS.DATE_TIMES ( "id" INTEGER PRIMARY KEY, "date_field" DATE, "datetime_field" TIMESTAMP );

0 comments on commit a51d618

Please sign in to comment.
You can’t perform that action at this time.