Changeset: 68eaf92bc7ad for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=68eaf92bc7ad
Added Files:
geom/sql/Tests/functions/Tests/ST_IsSimple.sql
geom/sql/Tests/functions/Tests/ST_IsSimple.stable.err
geom/sql/Tests/functions/Tests/ST_IsSimple.stable.out
Removed Files:
geom/sql/Tests/functions/Tests/isSimple.sql
geom/sql/Tests/functions/Tests/isSimple.stable.err
geom/sql/Tests/functions/Tests/isSimple.stable.out
Modified Files:
geom/monetdb5/geom.h
geom/monetdb5/geom.mal
geom/monetdb5/geomBulk.c
geom/sql/Tests/functions/Tests/All
Branch: geo
Log Message:
ST_IsSimple : mTest + bulk
diffs (truncated from 319 to 300 lines):
diff --git a/geom/monetdb5/geom.h b/geom/monetdb5/geom.h
--- a/geom/monetdb5/geom.h
+++ b/geom/monetdb5/geom.h
@@ -135,6 +135,7 @@ geom_export str wkbIsEmpty(bit*, wkb**);
geom_export str wkbIsEmpty_bat(bat *inBAT_id, bat *outBAT_id);
geom_export str wkbIsSimple(bit*, wkb**);
+geom_export str wkbIsSimple_bat(bat *inBAT_id, bat *outBAT_id);
//Is3D
//IsMeasured
geom_export str wkbBoundary(wkb **outWKB, wkb **inWKB);
diff --git a/geom/monetdb5/geom.mal b/geom/monetdb5/geom.mal
--- a/geom/monetdb5/geom.mal
+++ b/geom/monetdb5/geom.mal
@@ -508,6 +508,7 @@ command Boundary(w:bat[:oid,:wkb]) :bat[
command IsClosed(w:bat[:oid,:wkb]) :bat[:oid,:bit] address wkbIsClosed_bat;
command IsEmpty(w:bat[:oid,:wkb]) :bat[:oid,:bit] address wkbIsEmpty_bat;
+command IsSimple(w:bat[:oid,:wkb]) :bat[:oid,:bit] address wkbIsSimple_bat;
command pbsmIndexCreate(x:bat[:oid,:dbl], y:bat[:oid,:dbl], xmin:dbl,
ymin:dbl, xmax:dbl, ymax:dbl) :bat[:oid,:int] address pbsmIndexCreate_bat;
command geom.pbsmIndexLoad() address pbsmIndexLoad_bat;
diff --git a/geom/monetdb5/geomBulk.c b/geom/monetdb5/geomBulk.c
--- a/geom/monetdb5/geomBulk.c
+++ b/geom/monetdb5/geomBulk.c
@@ -250,6 +250,9 @@ str wkbIsClosed_bat(bat *outBAT_id, bat
str wkbIsEmpty_bat(bat *outBAT_id, bat *inBAT_id) {
return wkbBitOut_bat(outBAT_id, inBAT_id, wkbIsEmpty,
"batgeom.wkbIsEmpty");
}
+str wkbIsSimple_bat(bat *outBAT_id, bat *inBAT_id) {
+ return wkbBitOut_bat(outBAT_id, inBAT_id, wkbIsSimple,
"batgeom.wkbIsSimple");
+}
/*******************************/
/********* Two inputs **********/
diff --git a/geom/sql/Tests/functions/Tests/All
b/geom/sql/Tests/functions/Tests/All
--- a/geom/sql/Tests/functions/Tests/All
+++ b/geom/sql/Tests/functions/Tests/All
@@ -14,8 +14,8 @@ loadTestGeometries
ST_AsText
ST_IsClosed
-#ST_IsSimple
ST_IsEmpty
+ST_IsSimple
#isValid
#isRing
diff --git a/geom/sql/Tests/functions/Tests/isSimple.sql
b/geom/sql/Tests/functions/Tests/ST_IsSimple.sql
rename from geom/sql/Tests/functions/Tests/isSimple.sql
rename to geom/sql/Tests/functions/Tests/ST_IsSimple.sql
--- a/geom/sql/Tests/functions/Tests/isSimple.sql
+++ b/geom/sql/Tests/functions/Tests/ST_IsSimple.sql
@@ -13,7 +13,8 @@ drop table geo;
create table geo (g geometry(multipoint, 4326));
insert into geo values (st_mpointfromtext('multipoint(10 10, 20 20, 30 30)',
4326));
-insert into geo values (st_mpointfromtext('multipoint(10 10, 20 20, 10 10)',
4326));
+insert into geo values (st_mpointfromtext('multipoint(10 10, 20 20, 10 5)',
4326));
select st_isvalid(g) from geo;
drop table geo;
+SELECT geom AS "GEOMETRY" FROM geometries WHERE id<10 AND ST_IsSimple(geom);
diff --git a/geom/sql/Tests/functions/Tests/ST_IsSimple.stable.err
b/geom/sql/Tests/functions/Tests/ST_IsSimple.stable.err
new file mode 100644
--- /dev/null
+++ b/geom/sql/Tests/functions/Tests/ST_IsSimple.stable.err
@@ -0,0 +1,36 @@
+stderr of test 'ST_IsSimple` in directory 'geom/sql/Tests/functions` itself:
+
+
+# 14:37:11 >
+# 14:37:11 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=38572" "--set"
"mapi_usock=/var/tmp/mtest-4305/.s.monetdb.38572" "--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:37:11 >
+
+# 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 = 38572
+# cmdline opt mapi_usock = /var/tmp/mtest-4305/.s.monetdb.38572
+# 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:37:11 >
+# 14:37:11 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-4305" "--port=38572"
+# 14:37:11 >
+
+
+# 14:37:12 >
+# 14:37:12 > "Done."
+# 14:37:12 >
+
diff --git a/geom/sql/Tests/functions/Tests/ST_IsSimple.stable.out
b/geom/sql/Tests/functions/Tests/ST_IsSimple.stable.out
new file mode 100644
--- /dev/null
+++ b/geom/sql/Tests/functions/Tests/ST_IsSimple.stable.out
@@ -0,0 +1,88 @@
+stdout of test 'ST_IsSimple` in directory 'geom/sql/Tests/functions` itself:
+
+
+# 14:37:11 >
+# 14:37:11 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=38572" "--set"
"mapi_usock=/var/tmp/mtest-4305/.s.monetdb.38572" "--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:37:11 >
+
+# 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:38572/
+# Listening for UNIX domain connection requests on
mapi:monetdb:///var/tmp/mtest-4305/.s.monetdb.38572
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 14:37:11 >
+# 14:37:11 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-4305" "--port=38572"
+# 14:37:11 >
+
+#SELECT ST_IsSimple(ST_GeomFromText('POLYGON((1 2, 3 4, 5 6, 1 2))'));
+% .L # table_name
+% st_geomfromtext_single_value # name
+% boolean # type
+% 5 # length
+[ true ]
+#SELECT ST_IsSimple(ST_GeomFromText('LINESTRING(1 1,2 2,2 3.5,1 3,1 2,2 1)'));
+% .L # table_name
+% st_geomfromtext_single_value # name
+% boolean # type
+% 5 # length
+[ false ]
+#create table geo (g geometry(polygon, 4326));
+#insert into geo values(ST_GeomFromText('POLYGON((1 2, 3 4, 5 6, 1 2))',
4326));
+[ 1 ]
+#select st_IsSimple(g) from geo;
+% sys.L # table_name
+% st_issimple_g # name
+% boolean # type
+% 5 # length
+[ true ]
+#drop table geo;
+#create table geo (g geometry(linestring, 4326));
+#insert into geo values(ST_GeomFromText('LINESTRING(1 1,2 2,2 3.5,1 3,1 2,2
1)', 4326));
+[ 1 ]
+#select st_IsSimple(g) from geo;
+% sys.L # table_name
+% st_issimple_g # name
+% boolean # type
+% 5 # length
+[ false ]
+#drop table geo;
+#create table geo (g geometry(multipoint, 4326));
+#insert into geo values (st_mpointfromtext('multipoint(10 10, 20 20, 30 30)',
4326));
+[ 1 ]
+#insert into geo values (st_mpointfromtext('multipoint(10 10, 20 20, 10 5)',
4326));
+[ 1 ]
+#select st_isvalid(g) from geo;
+% sys.L # table_name
+% st_isvalid_g # name
+% boolean # type
+% 5 # length
+[ true ]
+[ true ]
+#drop table geo;
+#SELECT geom AS "GEOMETRY" FROM geometries WHERE id<10 AND ST_IsSimple(geom);
+% sys.L # table_name
+% GEOMETRY # name
+% geometry # type
+% 0 # length
+[ "POINT (10 20)" ]
+[ "LINESTRING (10 20, 30 40, 50 60)" ]
+[ "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."
+# 14:37:12 >
+
diff --git a/geom/sql/Tests/functions/Tests/isSimple.stable.err
b/geom/sql/Tests/functions/Tests/isSimple.stable.err
deleted file mode 100644
--- a/geom/sql/Tests/functions/Tests/isSimple.stable.err
+++ /dev/null
@@ -1,36 +0,0 @@
-stderr of test 'isSimple` in directory 'geom/sql/Tests/functions` itself:
-
-
-# 10:52:08 >
-# 10:52:08 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=39851" "--set"
"mapi_usock=/var/tmp/mtest-4010/.s.monetdb.39851" "--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"
-# 10:52:08 >
-
-# 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 = 39851
-# cmdline opt mapi_usock = /var/tmp/mtest-4010/.s.monetdb.39851
-# 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
-
-# 10:52:09 >
-# 10:52:09 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-4010" "--port=39851"
-# 10:52:09 >
-
-
-# 10:52:09 >
-# 10:52:09 > "Done."
-# 10:52:09 >
-
diff --git a/geom/sql/Tests/functions/Tests/isSimple.stable.out
b/geom/sql/Tests/functions/Tests/isSimple.stable.out
deleted file mode 100644
--- a/geom/sql/Tests/functions/Tests/isSimple.stable.out
+++ /dev/null
@@ -1,76 +0,0 @@
-stdout of test 'isSimple` in directory 'geom/sql/Tests/functions` itself:
-
-
-# 10:52:08 >
-# 10:52:08 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=39851" "--set"
"mapi_usock=/var/tmp/mtest-4010/.s.monetdb.39851" "--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"
-# 10:52:08 >
-
-# 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:39851/
-# Listening for UNIX domain connection requests on
mapi:monetdb:///var/tmp/mtest-4010/.s.monetdb.39851
-# MonetDB/GIS module loaded
-# MonetDB/SQL module loaded
-
-Ready.
-
-# 10:52:09 >
-# 10:52:09 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-4010" "--port=39851"
-# 10:52:09 >
-
-#SELECT ST_IsSimple(ST_GeomFromText('POLYGON((1 2, 3 4, 5 6, 1 2))'));
-% .L # table_name
-% st_geomfromtext_single_value # name
-% boolean # type
-% 5 # length
-[ true ]
-#SELECT ST_IsSimple(ST_GeomFromText('LINESTRING(1 1,2 2,2 3.5,1 3,1 2,2 1)'));
-% .L # table_name
-% st_geomfromtext_single_value # name
-% boolean # type
-% 5 # length
-[ false ]
-#create table geo (g geometry(polygon, 4326));
-#insert into geo values(ST_GeomFromText('POLYGON((1 2, 3 4, 5 6, 1 2))',
4326));
-[ 1 ]
-#select st_IsSimple(g) from geo;
-% sys.L # table_name
-% st_issimple_g # name
-% boolean # type
-% 5 # length
-[ true ]
-#drop table geo;
-#create table geo (g geometry(linestring, 4326));
-#insert into geo values(ST_GeomFromText('LINESTRING(1 1,2 2,2 3.5,1 3,1 2,2
1)', 4326));
-[ 1 ]
-#select st_IsSimple(g) from geo;
-% sys.L # table_name
-% st_issimple_g # name
-% boolean # type
-% 5 # length
-[ false ]
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list