Changeset: ccf38273a703 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ccf38273a703
Added Files:
geom/sql/Tests/asText.sql
geom/sql/Tests/asText.stable.err
geom/sql/Tests/asText.stable.out
geom/sql/Tests/coordinates.sql
geom/sql/Tests/coordinates.stable.err
geom/sql/Tests/coordinates.stable.out
geom/sql/Tests/isClosed.sql
geom/sql/Tests/isClosed.stable.err
geom/sql/Tests/isClosed.stable.out
geom/sql/Tests/isRing.sql
geom/sql/Tests/isRing.stable.err
geom/sql/Tests/isRing.stable.out
geom/sql/Tests/isSimple.sql
geom/sql/Tests/isSimple.stable.err
geom/sql/Tests/isSimple.stable.out
geom/sql/Tests/isValid.sql
geom/sql/Tests/isValid.stable.err
geom/sql/Tests/isValid.stable.out
geom/sql/Tests/srid.sql
geom/sql/Tests/srid.stable.err
geom/sql/Tests/srid.stable.out
Branch: geo
Log Message:
Mtests asText, isClosed, isSimple, isValid, isRing, coordinates and srid added
diffs (truncated from 1358 to 300 lines):
diff --git a/geom/sql/Tests/asText.sql b/geom/sql/Tests/asText.sql
new file mode 100644
--- /dev/null
+++ b/geom/sql/Tests/asText.sql
@@ -0,0 +1,58 @@
+select st_astext(st_pointfromtext('point(10 10)'));
+select st_astext(st_pointfromtext('point(20 20)', 4326));
+select st_astext(st_pointfromtext('point(10 10 10)'));
+select st_astext(st_makepoint(10, 10));
+select st_astext(st_point(20, 20));
+select st_astext(st_makepoint(10, 10, 10));
+select st_astext(st_linefromtext('linestring(10 10, 20 20, 30 30)'));
+select st_astext(st_linefromtext('linestring(20 20, 30 30, 40 40)', 4326));
+select st_astext(st_linefromtext('linestring(20 20 20, 30 30 30, 40 40 40)',
4326));
+select st_astext(st_polygonfromtext('polygon((10 10, 20 20, 30 30, 10 10))'));
+select st_astext(st_polygonfromtext('polygon((20 20, 30 30, 40 40, 20 20))',
4326));
+select st_astext(st_polygonfromtext('polygon((10 10 10, 20 20 20, 30 30 30, 10
10 10))'));
+select st_astext(st_mpointfromtext('multipoint(10 10, 20 20)'));
+select st_astext(st_mpointfromtext('multipoint(20 20, 30 30)', 4326));
+select st_astext(st_mpointfromtext('multipoint(20 20 20, 30 30 30)', 4326));
+select st_astext(st_mlinefromtext('multilinestring((10 10, 20 20, 30 30), (40
40, 50 50, 60 60))'));
+select st_astext(st_mlinefromtext('multilinestring((20 20, 30 30, 40 40), (50
50, 60 60, 70 70))', 4326));
+select st_astext(st_mlinefromtext('multilinestring((20 20 20, 30 30 30, 40 40
40), (50 50 50, 60 60 60, 70 70 70))', 4326));
+select st_astext(st_mpolyfromtext('multipolygon(((10 10, 20 20, 30 30, 10
10),(100 100, 200 200, 300 300, 100 100)))'));
+select st_astext(st_mpolyfromtext('multipolygon(((20 20, 30 30, 40 40, 20
20),(200 200, 300 300, 400 400, 200 200)))', 4326));
+select st_astext(st_mpolyfromtext('multipolygon(((10 10 10, 20 20 20, 30 30
30, 10 10 10),(100 100 100, 200 200 200, 300 300 300, 100 100 100)))'));
+
+select st_astext(st_geomfromtext('point(10 10)'));
+select st_astext(st_geomfromtext('linestring(10 10, 20 20, 30 30)'));
+select st_astext(st_geomfromtext('polygon((10 10, 20 20, 30 30, 10 10))'));
+select st_astext(st_geomfromtext('multipoint(10 10, 20 20)'));
+select st_astext(st_geomfromtext('multilinestring((10 10, 20 20, 30 30), (40
40, 50 50, 60 60))'));
+select st_astext(st_geomfromtext('multipolygon(((10 10, 20 20, 30 30, 10
10),(100 100, 200 200, 300 300, 100 100)))'));
+
+create table points_tbl(g geometry(point));
+insert into points_tbl values (st_pointfromtext('point(10 10)'));
+select st_astext(g) from points_tbl;
+drop table points_tbl;
+
+create table lines_tbl(g geometry(linestring));
+insert into lines_tbl values (st_linefromtext('linestring(10 10, 20 20, 30
30)'));
+select st_astext(g) from lines_tbl;
+drop table lines_tbl;
+
+create table polygons_tbl(g geometry(polygon));
+insert into polygons_tbl values (st_polygonfromtext('polygon((10 10, 20 20, 30
30, 10 10))'));
+select st_astext(g) from polygons_tbl;
+drop table polygons_tbl;
+
+create table points_tbl(g geometry(pointz));
+insert into points_tbl values (st_pointfromtext('point(10 10 10)'));
+select st_astext(g) from points_tbl;
+drop table points_tbl;
+
+create table lines_tbl(g geometry(linestringz));
+insert into lines_tbl values (st_linefromtext('linestring(10 10 10, 20 20 20,
30 30 30)'));
+select st_astext(g) from lines_tbl;
+drop table lines_tbl;
+
+create table polygons_tbl(g geometry(polygonz));
+insert into polygons_tbl values (st_polygonfromtext('polygon((10 10 10, 20 20
20, 30 30 30, 10 10 10))'));
+select st_astext(g) from polygons_tbl;
+drop table polygons_tbl;
diff --git a/geom/sql/Tests/asText.stable.err b/geom/sql/Tests/asText.stable.err
new file mode 100644
--- /dev/null
+++ b/geom/sql/Tests/asText.stable.err
@@ -0,0 +1,36 @@
+stderr of test 'asText` in directory 'geom/sql` itself:
+
+
+# 09:48:50 >
+# 09:48:50 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=36317" "--set"
"mapi_usock=/var/tmp/mtest-20159/.s.monetdb.36317" "--set" "monet_prompt="
"--forcemito" "--set" "mal_listing=2"
"--dbpath=/ufs/alvanaki/INSTALL/monetdb/var/MonetDB/mTests_geom_sql" "--set"
"mal_listing=0"
+# 09:48:50 >
+
+# builtin opt gdk_dbpath =
/ufs/alvanaki/INSTALL/monetdb/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 = 36317
+# cmdline opt mapi_usock = /var/tmp/mtest-20159/.s.monetdb.36317
+# cmdline opt monet_prompt =
+# cmdline opt mal_listing = 2
+# cmdline opt gdk_dbpath =
/ufs/alvanaki/INSTALL/monetdb/var/MonetDB/mTests_geom_sql
+# cmdline opt mal_listing = 0
+# cmdline opt gdk_debug = 536870922
+
+# 09:48:51 >
+# 09:48:51 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-20159" "--port=36317"
+# 09:48:51 >
+
+
+# 09:48:52 >
+# 09:48:52 > "Done."
+# 09:48:52 >
+
diff --git a/geom/sql/Tests/asText.stable.out b/geom/sql/Tests/asText.stable.out
new file mode 100644
--- /dev/null
+++ b/geom/sql/Tests/asText.stable.out
@@ -0,0 +1,287 @@
+stdout of test 'asText` in directory 'geom/sql` itself:
+
+
+# 09:48:50 >
+# 09:48:50 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=36317" "--set"
"mapi_usock=/var/tmp/mtest-20159/.s.monetdb.36317" "--set" "monet_prompt="
"--forcemito" "--set" "mal_listing=2"
"--dbpath=/ufs/alvanaki/INSTALL/monetdb/var/MonetDB/mTests_geom_sql" "--set"
"mal_listing=0"
+# 09:48:50 >
+
+# 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.356 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://sibuyan.da.cwi.nl:36317/
+# Listening for UNIX domain connection requests on
mapi:monetdb:///var/tmp/mtest-20159/.s.monetdb.36317
+# MonetDB/GIS module loaded
+# MonetDB/JAQL module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+# SQL catalog created, loading sql scripts once
+# loading sql script: 09_like.sql
+# loading sql script: 10_math.sql
+# loading sql script: 11_times.sql
+# loading sql script: 12_url.sql
+# loading sql script: 13_date.sql
+# loading sql script: 14_inet.sql
+# loading sql script: 15_querylog.sql
+# loading sql script: 16_tracelog.sql
+# loading sql script: 19_cluster.sql
+# loading sql script: 20_vacuum.sql
+# loading sql script: 21_dependency_functions.sql
+# loading sql script: 22_clients.sql
+# loading sql script: 23_skyserver.sql
+# loading sql script: 24_zorder.sql
+# loading sql script: 25_debug.sql
+# loading sql script: 26_sysmon.sql
+# loading sql script: 39_analytics.sql
+# loading sql script: 40_geom.sql
+# loading sql script: 40_json.sql
+# loading sql script: 41_jsonstore.sql
+# loading sql script: 45_uuid.sql
+# loading sql script: 46_gsl.sql
+# loading sql script: 75_storagemodel.sql
+# loading sql script: 80_statistics.sql
+# loading sql script: 80_udf.sql
+# loading sql script: 99_system.sql
+#WARNING To speedup geom.AsText a bulk operator implementation is needed
+#WARNING To speedup geom.AsText a bulk operator implementation is needed
+#WARNING To speedup geom.AsText a bulk operator implementation is needed
+#WARNING To speedup geom.AsText a bulk operator implementation is needed
+#WARNING To speedup geom.AsText a bulk operator implementation is needed
+#WARNING To speedup geom.AsText a bulk operator implementation is needed
+
+# 09:48:51 >
+# 09:48:51 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-20159" "--port=36317"
+# 09:48:51 >
+
+#select st_astext(st_pointfromtext('point(10 10)'));
+% .L # table_name
+% st_pointfromtext_single_value # name
+% clob # type
+% 49 # length
+[ "\"POINT (10.0000000000000000 10.0000000000000000)\"" ]
+#select st_astext(st_pointfromtext('point(20 20)', 4326));
+% .L # table_name
+% st_pointfromtext_single_value # name
+% clob # type
+% 49 # length
+[ "\"POINT (20.0000000000000000 20.0000000000000000)\"" ]
+#select st_astext(st_pointfromtext('point(10 10 10)'));
+% .L # table_name
+% st_pointfromtext_single_value # name
+% clob # type
+% 71 # length
+[ "\"POINT Z (10.0000000000000000 10.0000000000000000 10.0000000000000000)\""
]
+#select st_astext(st_makepoint(10, 10));
+% .L # table_name
+% st_makepoint_single_value # name
+% clob # type
+% 49 # length
+[ "\"POINT (10.0000000000000000 10.0000000000000000)\"" ]
+#select st_astext(st_point(20, 20));
+% .L # table_name
+% st_point_single_value # name
+% clob # type
+% 49 # length
+[ "\"POINT (20.0000000000000000 20.0000000000000000)\"" ]
+#select st_astext(st_makepoint(10, 10, 10));
+% .L # table_name
+% st_makepoint_single_value # name
+% clob # type
+% 71 # length
+[ "\"POINT Z (10.0000000000000000 10.0000000000000000 10.0000000000000000)\""
]
+#select st_astext(st_linefromtext('linestring(10 10, 20 20, 30 30)'));
+% .L # table_name
+% st_linefromtext_single_value # name
+% clob # type
+% 136 # length
+[ "\"LINESTRING (10.0000000000000000 10.0000000000000000, 20.0000000000000000
20.0000000000000000, 30.0000000000000000 30.0000000000000000)\"" ]
+#select st_astext(st_linefromtext('linestring(20 20, 30 30, 40 40)', 4326));
+% .L # table_name
+% st_linefromtext_single_value # name
+% clob # type
+% 136 # length
+[ "\"LINESTRING (20.0000000000000000 20.0000000000000000, 30.0000000000000000
30.0000000000000000, 40.0000000000000000 40.0000000000000000)\"" ]
+#select st_astext(st_linefromtext('linestring(20 20 20, 30 30 30, 40 40 40)',
4326));
+% .L # table_name
+% st_linefromtext_single_value # name
+% clob # type
+% 198 # length
+[ "\"LINESTRING Z (20.0000000000000000 20.0000000000000000
20.0000000000000000, 30.0000000000000000 30.0000000000000000
30.0000000000000000, 40.0000000000000000 40.0000000000000000
40.0000000000000000)\"" ]
+#select st_astext(st_polygonfromtext('polygon((10 10, 20 20, 30 30, 10 10))'));
+% .L # table_name
+% st_polygonfromtext_single_value # name
+% clob # type
+% 176 # length
+[ "\"POLYGON ((10.0000000000000000 10.0000000000000000, 20.0000000000000000
20.0000000000000000, 30.0000000000000000 30.0000000000000000,
10.0000000000000000 10.0000000000000000))\"" ]
+#select st_astext(st_polygonfromtext('polygon((20 20, 30 30, 40 40, 20 20))',
4326));
+% .L # table_name
+% st_polygonfromtext_single_value # name
+% clob # type
+% 176 # length
+[ "\"POLYGON ((20.0000000000000000 20.0000000000000000, 30.0000000000000000
30.0000000000000000, 40.0000000000000000 40.0000000000000000,
20.0000000000000000 20.0000000000000000))\"" ]
+#select st_astext(st_polygonfromtext('polygon((10 10 10, 20 20 20, 30 30 30,
10 10 10))'));
+% .L # table_name
+% st_polygonfromtext_single_value # name
+% clob # type
+% 258 # length
+[ "\"POLYGON Z ((10.0000000000000000 10.0000000000000000 10.0000000000000000,
20.0000000000000000 20.0000000000000000 20.0000000000000000,
30.0000000000000000 30.0000000000000000 30.0000000000000000,
10.0000000000000000 10.0000000000000000 10.0000000000000000))\"" ]
+#select st_astext(st_mpointfromtext('multipoint(10 10, 20 20)'));
+% .L # table_name
+% st_mpointfromtext_single_value # name
+% clob # type
+% 95 # length
+[ "\"MULTIPOINT (10.0000000000000000 10.0000000000000000, 20.0000000000000000
20.0000000000000000)\"" ]
+#select st_astext(st_mpointfromtext('multipoint(20 20, 30 30)', 4326));
+% .L # table_name
+% st_mpointfromtext_single_value # name
+% clob # type
+% 95 # length
+[ "\"MULTIPOINT (20.0000000000000000 20.0000000000000000, 30.0000000000000000
30.0000000000000000)\"" ]
+#select st_astext(st_mpointfromtext('multipoint(20 20 20, 30 30 30)', 4326));
+% .L # table_name
+% st_mpointfromtext_single_value # name
+% clob # type
+% 137 # length
+[ "\"MULTIPOINT Z (20.0000000000000000 20.0000000000000000
20.0000000000000000, 30.0000000000000000 30.0000000000000000
30.0000000000000000)\"" ]
+#select st_astext(st_mlinefromtext('multilinestring((10 10, 20 20, 30 30), (40
40, 50 50, 60 60))'));
+% .L # table_name
+% st_mlinefromtext_single_value # name
+% clob # type
+% 268 # length
+[ "\"MULTILINESTRING ((10.0000000000000000 10.0000000000000000,
20.0000000000000000 20.0000000000000000, 30.0000000000000000
30.0000000000000000), (40.0000000000000000 40.0000000000000000,
50.0000000000000000 50.0000000000000000, 60.0000000000000000
60.0000000000000000))\"" ]
+#select st_astext(st_mlinefromtext('multilinestring((20 20, 30 30, 40 40), (50
50, 60 60, 70 70))', 4326));
+% .L # table_name
+% st_mlinefromtext_single_value # name
+% clob # type
+% 268 # length
+[ "\"MULTILINESTRING ((20.0000000000000000 20.0000000000000000,
30.0000000000000000 30.0000000000000000, 40.0000000000000000
40.0000000000000000), (50.0000000000000000 50.0000000000000000,
60.0000000000000000 60.0000000000000000, 70.0000000000000000
70.0000000000000000))\"" ]
+#select st_astext(st_mlinefromtext('multilinestring((20 20 20, 30 30 30, 40 40
40), (50 50 50, 60 60 60, 70 70 70))', 4326));
+% .L # table_name
+% st_mlinefromtext_single_value # name
+% clob # type
+% 390 # length
+[ "\"MULTILINESTRING Z ((20.0000000000000000 20.0000000000000000
20.0000000000000000, 30.0000000000000000 30.0000000000000000
30.0000000000000000, 40.0000000000000000 40.0000000000000000
40.0000000000000000), (50.0000000000000000 50.0000000000000000
50.0000000000000000, 60.0000000000000000 60.0000000000000000
60.0000000000000000, 70.0000000000000000 70.0000000000000000
70.0000000000000000))\"" ]
+#select st_astext(st_mpolyfromtext('multipolygon(((10 10, 20 20, 30 30, 10
10),(100 100, 200 200, 300 300, 100 100)))'));
+% .L # table_name
+% st_mpolyfromtext_single_value # name
+% clob # type
+% 357 # length
+[ "\"MULTIPOLYGON (((10.0000000000000000 10.0000000000000000,
20.0000000000000000 20.0000000000000000, 30.0000000000000000
30.0000000000000000, 10.0000000000000000 10.0000000000000000),
(100.0000000000000000 100.0000000000000000, 200.0000000000000000
200.0000000000000000, 300.0000000000000000 300.0000000000000000,
100.0000000000000000 100.0000000000000000)))\"" ]
+#select st_astext(st_mpolyfromtext('multipolygon(((20 20, 30 30, 40 40, 20
20),(200 200, 300 300, 400 400, 200 200)))', 4326));
+% .L # table_name
+% st_mpolyfromtext_single_value # name
+% clob # type
+% 357 # length
+[ "\"MULTIPOLYGON (((20.0000000000000000 20.0000000000000000,
30.0000000000000000 30.0000000000000000, 40.0000000000000000
40.0000000000000000, 20.0000000000000000 20.0000000000000000),
(200.0000000000000000 200.0000000000000000, 300.0000000000000000
300.0000000000000000, 400.0000000000000000 400.0000000000000000,
200.0000000000000000 200.0000000000000000)))\"" ]
+#select st_astext(st_mpolyfromtext('multipolygon(((10 10 10, 20 20 20, 30 30
30, 10 10 10),(100 100 100, 200 200 200, 300 300 300, 100 100 100)))'));
+% .L # table_name
+% st_mpolyfromtext_single_value # name
+% clob # type
+% 523 # length
+[ "\"MULTIPOLYGON Z (((10.0000000000000000 10.0000000000000000
10.0000000000000000, 20.0000000000000000 20.0000000000000000
20.0000000000000000, 30.0000000000000000 30.0000000000000000
30.0000000000000000, 10.0000000000000000 10.0000000000000000
10.0000000000000000), (100.0000000000000000 100.0000000000000000
100.0000000000000000, 200.0000000000000000 200.0000000000000000
200.0000000000000000, 300.0000000000000000 300.0000000000000000
300.0000000000000000, 100.0000000000000000 100.0000000000000000
100.0000000000000000)))\"" ]
+#select st_astext(st_geomfromtext('point(10 10)'));
+% .L # table_name
+% st_geomfromtext_single_value # name
+% clob # type
+% 49 # length
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list