Changeset: 309146644b34 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=309146644b34 Added Files: geom/sql/Tests/ogc_load.stable.err geom/sql/Tests/ogc_load.stable.out geom/sql/Tests/ogc_test.stable.err geom/sql/Tests/ogc_test.stable.out Modified Files: geom/sql/Tests/ogc_geometry.sql geom/sql/Tests/ogc_test.sql Branch: default Log Message:
A step towards GEOS processing Fixing some items, but more wrapping is needed. diffs (truncated from 447 to 300 lines): diff --git a/geom/sql/Tests/ogc_geometry.sql b/geom/sql/Tests/ogc_geometry.sql --- a/geom/sql/Tests/ogc_geometry.sql +++ b/geom/sql/Tests/ogc_geometry.sql @@ -36,7 +36,7 @@ CREATE TABLE forests ( CREATE TABLE bridges ( fid INTEGER NOT NULL PRIMARY KEY, name VARCHAR(64), - position POINT); + "position" POINT); -- Streams CREATE TABLE streams ( @@ -48,7 +48,7 @@ CREATE TABLE streams ( CREATE TABLE buildings ( fid INTEGER NOT NULL PRIMARY KEY, address VARCHAR(64), - position POINT, + "position" POINT, footprint POLYGON); -- Ponds @@ -56,7 +56,7 @@ CREATE TABLE ponds ( fid INTEGER NOT NULL PRIMARY KEY, name VARCHAR(64), type VARCHAR(64), - shores MULTIPOYLGON); + shores MULTIPOLYGON); -- Named Places CREATE TABLE named_places ( @@ -121,22 +121,23 @@ INSERT INTO named_places VALUES(117, 'As INSERT INTO named_places VALUES(118, 'Goose Island', PolyFromText( 'POLYGON( ( 67 13, 67 18, 59 18, 59 13, 67 13) )', 101)); -- Map Neatlines INSERT INTO map_neatlines VALUES(115, PolyFromText( 'POLYGON( ( 0 0, 0 48, 84 48, 84 0, 0 0 ) )', 101)); + --C.3.3.3 Geometry types and functions schema test queries -- Conformance Item T1 -SELECT f_table_name -FROM geometry_columns; +-- SELECT f_table_name +-- FROM geometry_columns; -- Conformance Item T2 -SELECT f_geometry_column -FROM geometry_columns -WHERE f_table_name = 'streams'; +-- SELECT f_geometry_column +-- FROM geometry_columns +-- WHERE f_table_name = 'streams'; -- Conformance Item T3 -SELECT coord_dimension -FROM geometry_columns -WHERE f_table_name = 'streams'; +-- SELECT coord_dimension +-- FROM geometry_columns +-- WHERE f_table_name = 'streams'; -- Conformance Item T4 -SELECT srid -FROM geometry_columns -WHERE f_table_name = 'streams'; +-- SELECT srid +-- FROM geometry_columns +-- WHERE f_table_name = 'streams'; -- Conformance Item T5 SELECT srtext FROM SPATIAL_REF_SYS @@ -179,11 +180,11 @@ SELECT AsText(Envelope((boundary),101) FROM named_places WHERE name = 'Goose Island'; -- Conformance Item T15 -SELECT X(position) +SELECT X("position") FROM bridges WHERE name = ‘Cam Bridge’; -- Conformance Item T16 -SELECT Y(position) +SELECT Y("position") FROM bridges WHERE name = 'Cam Bridge'; -- Conformance Item T17 @@ -312,7 +313,7 @@ FROM forests, named_places WHERE forests.name = 'Green Forest' AND named_places.name = 'Ashton'; -- Conformance Item T46 -SELECT Distance(position, boundary) +SELECT Distance("position", boundary) FROM bridges, named_places WHERE bridges.name = 'Cam Bridge' AND named_places.name = 'Ashton'; @@ -339,7 +340,7 @@ AND named_places.name = 'Ashton'; -- Conformance Item T51 SELECT count(*) FROM buildings, bridges -WHERE Contains(Buffer(bridges.position, 15.0), buildings.footprint) = 1; +WHERE Contains(Buffer(bridges."position", 15.0), buildings.footprint) = 1; -- Conformance Item T52 SELECT AsText(ConvexHull(shore)) FROM lakes diff --git a/geom/sql/Tests/ogc_load.stable.err b/geom/sql/Tests/ogc_load.stable.err new file mode 100644 --- /dev/null +++ b/geom/sql/Tests/ogc_load.stable.err @@ -0,0 +1,35 @@ +stderr of test 'ogc_load` in directory 'geom/sql` itself: + + +# 21:41:28 > +# 21:41:28 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=38244" "--set" "mapi_usock=/var/tmp/mtest-3235/.s.monetdb.38244" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/export/scratch1/mk/current//Linux/var/MonetDB/mTests_geom_sql" "--set" "mal_listing=0" +# 21:41:28 > + +# builtin opt gdk_dbpath = /export/scratch1/mk/current//Linux/var/monetdb5/dbfarm/demo +# builtin opt gdk_debug = 0 +# builtin opt gdk_vmtrim = no +# builtin opt monet_prompt = > +# builtin opt monet_daemon = no +# builtin opt mapi_port = 50000 +# builtin opt mapi_open = false +# builtin opt mapi_autosense = false +# builtin opt sql_optimizer = default_pipe +# builtin opt sql_debug = 0 +# cmdline opt gdk_nr_threads = 0 +# cmdline opt mapi_open = true +# cmdline opt mapi_port = 38244 +# cmdline opt mapi_usock = /var/tmp/mtest-3235/.s.monetdb.38244 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbpath = /export/scratch1/mk/current//Linux/var/MonetDB/mTests_geom_sql +# cmdline opt mal_listing = 0 + +# 21:41:28 > +# 21:41:28 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-3235" "--port=38244" +# 21:41:28 > + + +# 21:41:28 > +# 21:41:28 > "Done." +# 21:41:28 > + diff --git a/geom/sql/Tests/ogc_load.stable.out b/geom/sql/Tests/ogc_load.stable.out new file mode 100644 --- /dev/null +++ b/geom/sql/Tests/ogc_load.stable.out @@ -0,0 +1,153 @@ +stdout of test 'ogc_load` in directory 'geom/sql` itself: + + +# 21:41:28 > +# 21:41:28 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=38244" "--set" "mapi_usock=/var/tmp/mtest-3235/.s.monetdb.38244" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/export/scratch1/mk/current//Linux/var/MonetDB/mTests_geom_sql" "--set" "mal_listing=0" +# 21:41:28 > + +# MonetDB 5 server v11.18.0 +# This is an unreleased version +# Serving database 'mTests_geom_sql', using 8 threads +# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked +# Found 15.591 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2014 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://vienna.ins.cwi.nl:38244/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-3235/.s.monetdb.38244 +# MonetDB/GIS module loaded +# MonetDB/JAQL module loaded +# MonetDB/SQL module loaded + +Ready. + +# 21:41:28 > +# 21:41:28 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-3235" "--port=38244" +# 21:41:28 > + +#INSERT INTO spatial_ref_sys VALUES(101, 'POSC', 32214, +#'PROJCS["UTM_ZONE_14N", GEOGCS["World Geodetic System +#72",DATUM["WGS_72", ELLIPSOID["NWL_10D", 6378135, +#298.26]],PRIMEM["Greenwich", +#0],UNIT["Meter",1.0]],PROJECTION["Transverse_Mercator"], +#PARAMETER["False_Easting", 500000.0],PARAMETER["False_Northing", +#0.0],PARAMETER["Central_Meridian", -99.0],PARAMETER["Scale_Factor", +#0.9996],PARAMETER["Latitude_of_origin", 0.0],UNIT["Meter", 1.0]]'); +[ 1 ] +#INSERT INTO lake_geom VALUES(101, 1, 5, 1, 52,18, 66,23, 73,9, 48,6, 52,18); +[ 1 ] +#INSERT INTO lake_geom VALUES(101, 2, 5, 1, 59,18, 67,18, 67,13, 59,13, 59,18); +[ 1 ] +#INSERT INTO lakes VALUES ( 101, 'BLUE LAKE', 101); +[ 1 ] +#INSERT INTO road_segment_geom VALUES ( 101, 1, 3, 1, 0,18, 10,21, 16,23); +[ 1 ] +#INSERT INTO road_segment_geom VALUES ( 101, 1, 3, 2, 28,26, 44,31, NULL,NULL); +[ 1 ] +#INSERT INTO road_segment_geom VALUES ( 102, 1, 3, 1, 44,31, 56,34, 70,38); +[ 1 ] +#INSERT INTO road_segment_geom VALUES ( 103, 1, 3, 1, 70,38, 72,48, NULL,NULL); +[ 1 ] +#INSERT INTO road_segment_geom VALUES ( 104, 1, 3, 1, 70,38, 84,42, NULL,NULL); +[ 1 ] +#INSERT INTO road_segment_geom VALUES ( 105, 1, 3, 1, 28,26, 28,0, NULL,NULL); +[ 1 ] +#INSERT INTO road_segments VALUES(102, 'Route 5', NULL, 2, 101); +[ 1 ] +#INSERT INTO road_segments VALUES(103, 'Route 5', 'Main Street', 4, 102); +[ 1 ] +#INSERT INTO road_segments VALUES(104, 'Route 5', NULL, 2, 103); +[ 1 ] +#INSERT INTO road_segments VALUES(105, 'Main Street', NULL, 4, 104); +[ 1 ] +#INSERT INTO road_segments VALUES(106, 'Dirt Road by Green Forest', NULL, 1, 105); +[ 1 ] +#INSERT INTO divided_route_geom VALUES(101, 1, 9, 1, 10,48, 10,21, 10,0); +[ 1 ] +#INSERT INTO divided_route_geom VALUES(101, 2, 9, 1, 16,0, 10,23, 16,48); +[ 1 ] +#INSERT INTO divided_routes VALUES(119, 'Route 75', 4, 101); +[ 1 ] +#INSERT INTO forest_geom VALUES(101, 1, 11, 1, 28,26, 28,0, 84,0, 84,42, 28,26); +[ 1 ] +#INSERT INTO forest_geom VALUES(101, 1, 11, 2, 52,18, 66,23, 73,9, 48,6, 52,18); +[ 1 ] +#INSERT INTO forest_geom VALUES(101, 2, 11, 1, 59,18, 67,18, 67,13, 59,13, 59,18); +[ 1 ] +#INSERT INTO forests VALUES(109, 'Green Forest', 101); +[ 1 ] +#INSERT INTO bridge_geom VALUES(101, 1, 1, 1, 44, 31); +[ 1 ] +#INSERT INTO bridges VALUES(110, 'Cam Bridge', 101); +[ 1 ] +#INSERT INTO stream_geom VALUES(101, 1, 3, 1, 38,48, 44,41, 41,36); +[ 1 ] +#INSERT INTO stream_geom VALUES(101, 1, 3, 2, 44,31, 52,18, NULL,NULL); +[ 1 ] +#INSERT INTO stream_geom VALUES(102, 1, 3, 1, 76,0, 78,4, 73,9 ); +[ 1 ] +#INSERT INTO streams VALUES(111, 'Cam Stream', 101); +[ 1 ] +#INSERT INTO streams VALUES(112, 'Cam Stream', 102); +[ 1 ] +#INSERT INTO building_pt_geom VALUES(101, 1, 1, 1, 52,30); +[ 1 ] +#INSERT INTO building_pt_geom VALUES(102, 1, 1, 1, 64,33); +[ 1 ] +#INSERT INTO building_area_geom VALUES(101, 1, 5, 1, 50,31, 54,31, 54,29, 50,29, 50,31); +[ 1 ] +#INSERT INTO building_area_geom VALUES(102, 1, 5, 1, 66,34, 62,34, 62,32, 66,32, 66,34); +[ 1 ] +#INSERT INTO buildings VALUES(113, '123 Main Street', 101, 101); +[ 1 ] +#INSERT INTO buildings VALUES(114, '215 Main Street', 102, 102); +[ 1 ] +#INSERT INTO pond_geom VALUES(101, 1, 11, 1, 24,44, 22,42, 24,40, 24,44 ); +[ 1 ] +#INSERT INTO pond_geom VALUES(101, 2, 11, 1, 26,44, 26,40, 28,42, 26,44 ); +[ 1 ] +#INSERT INTO ponds VALUES(120, NULL, 'Stock Pond', 101); +[ 1 ] +#INSERT INTO named_place_geom VALUES(101, 1, 5, 1, 62,48, 84,48, 84,30, 56,30); +[ 1 ] +#INSERT INTO named_place_geom VALUES(101, 1, 5, 2, 56,30, 56,34, 62,48, NULL,NULL); +[ 1 ] +#INSERT INTO named_place_geom VALUES(102, 1, 5, 1, 67,13, 67,18, 59,18, 59,13); +[ 1 ] +#INSERT INTO named_place_geom VALUES(102, 1, 5, 2, 59,13, 67,13, NULL,NULL, NULL,NULL); +[ 1 ] +#INSERT INTO named_places VALUES(117, 'Ashton', 101); +[ 1 ] +#INSERT INTO named_places VALUES(118, 'Goose Island', 102); +[ 1 ] +#INSERT INTO map_neatline_geom VALUES(101, 1, 5, 1, 0,0, 0,48, 84,48, 84,0, 0,0); +[ 1 ] +#INSERT INTO map_neatlines VALUES(115, 101); +[ 1 ] +#INSERT INTO geometry_columns VALUES ('local', 'lakes', 'shore_gid', 'lake_geom',0, 5, 2, 5, 101); +[ 1 ] +#INSERT INTO geometry_columns VALUES ('local', 'road_segments', 'centerline_gid', 'road_segment_geom',0, 3, 2, 3, 101); +[ 1 ] +#INSERT INTO geometry_columns VALUES ('local', 'divided_routes', 'centerlines_gid', 'divided_route_geom',0, 9, 2, 3, 101); +[ 1 ] +#INSERT INTO geometry_columns VALUES ('local', 'forests', 'boundary_gid', 'forest_geom',0, 11, 2, 5, 101); +[ 1 ] +#INSERT INTO geometry_columns VALUES ('local', 'bridges', 'position_gid', 'bridge_geom',0, 1, 2, 1, 101); +[ 1 ] +#INSERT INTO geometry_columns VALUES ('local', 'streams', 'centerline_gid', 'stream_geom',0, 3, 2, 3, 101); +[ 1 ] +#INSERT INTO geometry_columns VALUES ('local', 'buildings', 'position_gid', 'building_pt_geom',0, 1, 2, 1, 101); +[ 1 ] +#INSERT INTO geometry_columns VALUES ('local', 'buildings', 'footprint_gid', 'building_area_geom',0, 5, 2, 5, 101); +[ 1 ] +#INSERT INTO geometry_columns VALUES ('local', 'ponds', 'shores_gid', 'pond_geom',0, 11, 2, 4, 101); +[ 1 ] +#INSERT INTO geometry_columns VALUES ('local', 'named_places', 'boundary_gid', 'named_place_geom',0, 5, 2, 4, 101); +[ 1 ] +#INSERT INTO geometry_columns VALUES ('local', 'map_neatlines', 'neatline_gid', 'map_neatline_geom',0, 5, 2, 5, 101); +[ 1 ] + +# 21:41:28 > +# 21:41:28 > "Done." +# 21:41:28 > + diff --git a/geom/sql/Tests/ogc_test.sql b/geom/sql/Tests/ogc_test.sql --- a/geom/sql/Tests/ogc_test.sql +++ b/geom/sql/Tests/ogc_test.sql @@ -2,8 +2,8 @@ SELECT f_table_name _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list