Changeset: 3da762beeb8f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3da762beeb8f
Added Files:
geom/sql/Tests/functions/Tests/ST_IsRing.stable.err
geom/sql/Tests/functions/Tests/ST_IsRing.stable.out
Modified Files:
geom/sql/Tests/functions/Tests/ST_Boundary.sql
geom/sql/Tests/functions/Tests/ST_Boundary.stable.out
geom/sql/Tests/functions/Tests/ST_Contains.stable.out
geom/sql/Tests/functions/Tests/ST_IsClosed.stable.out
geom/sql/Tests/functions/Tests/ST_IsSimple.sql
geom/sql/Tests/functions/Tests/ST_IsSimple.stable.out
geom/sql/Tests/functions/Tests/loadTestGeometries.sql
geom/sql/Tests/functions/Tests/loadTestGeometries.stable.out
Branch: geo
Log Message:
new geometries loaded in geneeral table
New outputs of tests approved
diffs (238 lines):
diff --git a/geom/sql/Tests/functions/Tests/ST_Boundary.sql
b/geom/sql/Tests/functions/Tests/ST_Boundary.sql
--- a/geom/sql/Tests/functions/Tests/ST_Boundary.sql
+++ b/geom/sql/Tests/functions/Tests/ST_Boundary.sql
@@ -6,6 +6,6 @@ SELECT ST_Boundary(ST_GeomFromText('POLY
SELECT ST_Boundary(ST_GeomFromText('MULTILINESTRING((1 1 1,0 0 0.5, -1 1 1),(1
1 0.5,0 0 0.5, -1 1 0.5, 1 1 0.5) )'));
-SELECT geom AS "GEOMETRY", ST_Boundary(geom) AS "BOUNDARY" FROM geometries
WHERE id<9;
+SELECT geom AS "GEOMETRY", ST_Boundary(geom) AS "BOUNDARY" FROM geometries
WHERE id<12;
diff --git a/geom/sql/Tests/functions/Tests/ST_Boundary.stable.out
b/geom/sql/Tests/functions/Tests/ST_Boundary.stable.out
--- a/geom/sql/Tests/functions/Tests/ST_Boundary.stable.out
+++ b/geom/sql/Tests/functions/Tests/ST_Boundary.stable.out
@@ -55,12 +55,15 @@ Ready.
% 0, 0 # length
[ "POINT (10 20)", "GEOMETRYCOLLECTION EMPTY" ]
[ "LINESTRING (10 20, 30 40, 50 60)", "MULTIPOINT (10 20, 50 60)" ]
+[ "LINESTRING (10 20, 30 40, 50 60, 80 60, 60 40, 10 20)", "MULTIPOINT
EMPTY" ]
+[ "LINESTRING (10 10, 50 50, 30 80, 25 5)", "MULTIPOINT (10 10, 25 5)"
]
[ "POLYGON ((10 10, 10 20, 20 20, 20 10, 10 10))", "LINESTRING (10 10, 10
20, 20 20, 20 10, 10 10)" ]
[ "MULTIPOINT (10 20, 30 40)", "GEOMETRYCOLLECTION EMPTY" ]
[ "MULTILINESTRING ((30 40, 40 50), (50 60, 60 70))", "MULTIPOINT (30 40, 40
50, 50 60, 60 70)" ]
[ "MULTILINESTRING ((30 40, 40 50, 30 40), (50 60, 60 70))", "MULTIPOINT (50
60, 60 70)" ]
[ "MULTILINESTRING ((30 40, 40 50, 30 40), (50 60, 40 50, 20 30, 50 60))",
"MULTIPOINT EMPTY" ]
[ "MULTIPOLYGON (((10 10, 10 20, 20 20, 20 10, 10 10), (30 30, 30 40, 40 40,
40 30, 30 30)))", "MULTILINESTRING ((10 10, 10 20, 20 20, 20 10, 10 10), (30
30, 30 40, 40 40, 40 30, 30 30))" ]
+[ "MULTIPOLYGON EMPTY", "MULTILINESTRING EMPTY" ]
# 16:00:23 >
# 16:00:23 > "Done."
diff --git a/geom/sql/Tests/functions/Tests/ST_Contains.stable.out
b/geom/sql/Tests/functions/Tests/ST_Contains.stable.out
--- a/geom/sql/Tests/functions/Tests/ST_Contains.stable.out
+++ b/geom/sql/Tests/functions/Tests/ST_Contains.stable.out
@@ -59,6 +59,8 @@ Ready.
% 0, 5 # length
[ "POINT (10 20)", false ]
[ "LINESTRING (10 20, 30 40, 50 60)", false ]
+[ "LINESTRING (10 20, 30 40, 50 60, 80 60, 60 40, 10 20)", false ]
+[ "LINESTRING (10 10, 50 50, 30 80, 25 5)", true ]
[ "POLYGON ((10 10, 10 20, 20 20, 20 10, 10 10))", true ]
[ "MULTIPOINT (10 20, 30 40)", false ]
[ "MULTILINESTRING ((30 40, 40 50), (50 60, 60 70))", false ]
diff --git a/geom/sql/Tests/functions/Tests/ST_IsClosed.stable.out
b/geom/sql/Tests/functions/Tests/ST_IsClosed.stable.out
--- a/geom/sql/Tests/functions/Tests/ST_IsClosed.stable.out
+++ b/geom/sql/Tests/functions/Tests/ST_IsClosed.stable.out
@@ -96,6 +96,8 @@ Ready.
% 0, 5 # length
[ "POINT (10 20)", true ]
[ "LINESTRING (10 20, 30 40, 50 60)", false ]
+[ "LINESTRING (10 20, 30 40, 50 60, 80 60, 60 40, 10 20)", true ]
+[ "LINESTRING (10 10, 50 50, 30 80, 25 5)", false ]
[ "POLYGON ((10 10, 10 20, 20 20, 20 10, 10 10))", true ]
[ "MULTIPOINT (10 20, 30 40)", true ]
[ "MULTILINESTRING ((30 40, 40 50), (50 60, 60 70))", false ]
diff --git a/geom/sql/Tests/functions/Tests/ST_IsRing.stable.err
b/geom/sql/Tests/functions/Tests/ST_IsRing.stable.err
new file mode 100644
--- /dev/null
+++ b/geom/sql/Tests/functions/Tests/ST_IsRing.stable.err
@@ -0,0 +1,36 @@
+stderr of test 'ST_IsRing` in directory 'geom/sql/Tests/functions` itself:
+
+
+# 14:55:48 >
+# 14:55:48 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=34702" "--set"
"mapi_usock=/var/tmp/mtest-5773/.s.monetdb.34702" "--set" "monet_prompt="
"--forcemito" "--set" "mal_listing=2"
"--dbpath=/export/scratch1/alvanaki/INSTALL/MonetDB-public/var/MonetDB/mTests_geom_sql_Tests_functions"
"--set" "mal_listing=0"
+# 14:55:48 >
+
+# builtin opt gdk_dbpath =
/export/scratch1/alvanaki/INSTALL/MonetDB-public/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 = 34702
+# cmdline opt mapi_usock = /var/tmp/mtest-5773/.s.monetdb.34702
+# cmdline opt monet_prompt =
+# cmdline opt mal_listing = 2
+# cmdline opt gdk_dbpath =
/export/scratch1/alvanaki/INSTALL/MonetDB-public/var/MonetDB/mTests_geom_sql_Tests_functions
+# cmdline opt mal_listing = 0
+# cmdline opt gdk_debug = 536870922
+
+# 14:55:48 >
+# 14:55:48 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-5773" "--port=34702"
+# 14:55:48 >
+
+
+# 14:55:48 >
+# 14:55:48 > "Done."
+# 14:55:48 >
+
diff --git a/geom/sql/Tests/functions/Tests/ST_IsRing.stable.out
b/geom/sql/Tests/functions/Tests/ST_IsRing.stable.out
new file mode 100644
--- /dev/null
+++ b/geom/sql/Tests/functions/Tests/ST_IsRing.stable.out
@@ -0,0 +1,55 @@
+stdout of test 'ST_IsRing` in directory 'geom/sql/Tests/functions` itself:
+
+
+# 14:55:48 >
+# 14:55:48 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=34702" "--set"
"mapi_usock=/var/tmp/mtest-5773/.s.monetdb.34702" "--set" "monet_prompt="
"--forcemito" "--set" "mal_listing=2"
"--dbpath=/export/scratch1/alvanaki/INSTALL/MonetDB-public/var/MonetDB/mTests_geom_sql_Tests_functions"
"--set" "mal_listing=0"
+# 14:55:48 >
+
+# MonetDB 5 server v11.20.0
+# This is an unreleased version
+# Serving database 'mTests_geom_sql_Tests_functions', using 8 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit
integers 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:34702/
+# Listening for UNIX domain connection requests on
mapi:monetdb:///var/tmp/mtest-5773/.s.monetdb.34702
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 14:55:48 >
+# 14:55:48 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-5773" "--port=34702"
+# 14:55:48 >
+
+#SELECT ST_IsRing(st_linefromtext('LINESTRING(0 0, 0 1, 1 1, 1 0, 0 0)'));
+% .L # table_name
+% st_linefromtext_single_value # name
+% boolean # type
+% 5 # length
+[ true ]
+#SELECT ST_IsRing(st_linefromtext('LINESTRING(0 0, 0 1, 1 0, 1 1, 0 0)'));
+% .L # table_name
+% st_linefromtext_single_value # name
+% boolean # type
+% 5 # length
+[ false ]
+#select ST_IsRing(ST_GeomFromText('POLYGON((0 0, 1 1, 1 2, 1 1, 0 0))'));
+% .L # table_name
+% st_geomfromtext_single_value # name
+% boolean # type
+% 5 # length
+[ false ]
+#SELECT geom AS "GEOMETRY" FROM geometries WHERE ST_IsRing(geom);
+% sys.L # table_name
+% GEOMETRY # name
+% geometry # type
+% 0 # length
+[ "LINESTRING (10 20, 30 40, 50 60, 80 60, 60 40, 10 20)" ]
+
+# 14:55:48 >
+# 14:55:48 > "Done."
+# 14:55:48 >
+
diff --git a/geom/sql/Tests/functions/Tests/ST_IsSimple.sql
b/geom/sql/Tests/functions/Tests/ST_IsSimple.sql
--- a/geom/sql/Tests/functions/Tests/ST_IsSimple.sql
+++ b/geom/sql/Tests/functions/Tests/ST_IsSimple.sql
@@ -17,4 +17,4 @@ insert into geo values (st_mpointfromtex
select st_isvalid(g) from geo;
drop table geo;
-SELECT geom AS "GEOMETRY" FROM geometries WHERE id<10 AND ST_IsSimple(geom);
+SELECT geom AS "GEOMETRY" FROM geometries WHERE id<11 AND ST_IsSimple(geom);
diff --git a/geom/sql/Tests/functions/Tests/ST_IsSimple.stable.out
b/geom/sql/Tests/functions/Tests/ST_IsSimple.stable.out
--- a/geom/sql/Tests/functions/Tests/ST_IsSimple.stable.out
+++ b/geom/sql/Tests/functions/Tests/ST_IsSimple.stable.out
@@ -76,11 +76,11 @@ Ready.
% 0 # length
[ "POINT (10 20)" ]
[ "LINESTRING (10 20, 30 40, 50 60)" ]
+[ "LINESTRING (10 20, 30 40, 50 60, 80 60, 60 40, 10 20)" ]
[ "POLYGON ((10 10, 10 20, 20 20, 20 10, 10 10))" ]
[ "MULTIPOINT (10 20, 30 40)" ]
[ "MULTILINESTRING ((30 40, 40 50), (50 60, 60 70))" ]
[ "MULTIPOLYGON (((10 10, 10 20, 20 20, 20 10, 10 10), (30 30, 30 40, 40 40,
40 30, 30 30)))" ]
-[ "MULTIPOLYGON EMPTY" ]
# 14:37:12 >
# 14:37:12 > "Done."
diff --git a/geom/sql/Tests/functions/Tests/loadTestGeometries.sql
b/geom/sql/Tests/functions/Tests/loadTestGeometries.sql
--- a/geom/sql/Tests/functions/Tests/loadTestGeometries.sql
+++ b/geom/sql/Tests/functions/Tests/loadTestGeometries.sql
@@ -1,25 +1,28 @@
CREATE TABLE geometries(id serial, geom geometry);
---simple geometries
---1 closed
+--1 closed, simple => ring
INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('POINT(10 20)'));
---2
+--2 simple
INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('LINESTRING(10 20, 30 40, 50
60)'));
---3 closed
+--3 closed, simple, ring
+INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('LINESTRING(10 20, 30 40, 50
60, 80 60, 60 40, 10 20)'));
+--4
+INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('LINESTRING(10 10, 50 50, 30
80, 25 5)'));
+--5 closed, simple
INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('POLYGON((10 10, 10 20, 20 20,
20 10, 10 10))'));
---4 closed
+--6 closed, simple
INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('MULTIPOINT(10 20, 30 40)'));
---5
+--7 simple
INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('MULTILINESTRING((30 40, 40
50), (50 60, 60 70))'));
---6
+--8
INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('MULTILINESTRING((30 40, 40
50, 30 40), (50 60, 60 70))'));
---7 closed
+--9 closed
INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('MULTILINESTRING((30 40, 40
50, 30 40), (50 60, 40 50, 20 30, 50 60))'));
---8
+--10 simple
INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('MULTIPOLYGON(((10 10, 10 20,
20 20, 20 10, 10 10),(30 30, 30 40, 40 40, 40 30, 30 30)))'));
---9
+--11 simple
INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('MULTIPOLYGON EMPTY'));
---10
+--12
INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('GEOMETRYCOLLECTION(POINT(10
20),LINESTRING(10 20, 30 40),POLYGON((10 10, 10 20, 20 20, 20 10, 10 10)))'));
---11 closed
+--13 closed
INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('GEOMETRYCOLLECTION(POINT(10
20),LINESTRING(10 20, 30 40, 10 20),POLYGON((10 10, 10 20, 20 20, 20 10, 10
10)))'));
diff --git a/geom/sql/Tests/functions/Tests/loadTestGeometries.stable.out
b/geom/sql/Tests/functions/Tests/loadTestGeometries.stable.out
--- a/geom/sql/Tests/functions/Tests/loadTestGeometries.stable.out
+++ b/geom/sql/Tests/functions/Tests/loadTestGeometries.stable.out
@@ -61,6 +61,10 @@ Ready.
[ 1 ]
#INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('LINESTRING(10 20, 30 40, 50
60)'));
[ 1 ]
+#INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('LINESTRING(10 20, 30 40, 50
60, 80 60, 60 40, 10 20)'));
+[ 1 ]
+#INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('LINESTRING(10 10, 50 50, 30
80, 25 5)'));
+[ 1 ]
#INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('POLYGON((10 10, 10 20, 20
20, 20 10, 10 10))'));
[ 1 ]
#INSERT INTO geometries(geom) VALUES(ST_WKTToSQL('MULTIPOINT(10 20, 30 40)'));
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list