Changeset: d5159e06fda7 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d5159e06fda7
Added Files:
        geom/sql/Tests/functions/Tests/ST_Boundary.sql
        geom/sql/Tests/functions/Tests/ST_Boundary.stable.err
        geom/sql/Tests/functions/Tests/ST_Boundary.stable.out
Removed Files:
        geom/sql/Tests/functions/Tests/boundary.sql
        geom/sql/Tests/functions/Tests/boundary.stable.err
        geom/sql/Tests/functions/Tests/boundary.stable.out
Modified Files:
        geom/monetdb5/geom.c
Branch: geo
Log Message:

ST_Boundary : bulk + mtest


diffs (238 lines):

diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -2701,7 +2701,8 @@ static str wkbBasic(wkb **out, wkb **geo
 
        outGeometry = (*func)(geosGeometry);
        //set the srid equal to the srid of the initial geometry
-       GEOSSetSRID(outGeometry, (*geom)->srid);
+       if((*geom)->srid) //GEOSSetSRID has assertion for srid != 0
+               GEOSSetSRID(outGeometry, (*geom)->srid);
        
        *out = geos2wkb(outGeometry);
        
diff --git a/geom/sql/Tests/functions/Tests/boundary.sql 
b/geom/sql/Tests/functions/Tests/ST_Boundary.sql
rename from geom/sql/Tests/functions/Tests/boundary.sql
rename to geom/sql/Tests/functions/Tests/ST_Boundary.sql
--- a/geom/sql/Tests/functions/Tests/boundary.sql
+++ b/geom/sql/Tests/functions/Tests/ST_Boundary.sql
@@ -6,3 +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<7;
+
+
diff --git a/geom/sql/Tests/functions/Tests/ST_Boundary.stable.err 
b/geom/sql/Tests/functions/Tests/ST_Boundary.stable.err
new file mode 100644
--- /dev/null
+++ b/geom/sql/Tests/functions/Tests/ST_Boundary.stable.err
@@ -0,0 +1,36 @@
+stderr of test 'ST_Boundary` in directory 'geom/sql/Tests/functions` itself:
+
+
+# 16:00:22 >  
+# 16:00:22 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=39071" "--set" 
"mapi_usock=/var/tmp/mtest-17783/.s.monetdb.39071" "--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"
+# 16:00:22 >  
+
+# 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 = 39071
+# cmdline opt  mapi_usock = /var/tmp/mtest-17783/.s.monetdb.39071
+# 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
+
+# 16:00:22 >  
+# 16:00:22 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-17783" "--port=39071"
+# 16:00:22 >  
+
+
+# 16:00:23 >  
+# 16:00:23 >  "Done."
+# 16:00:23 >  
+
diff --git a/geom/sql/Tests/functions/Tests/ST_Boundary.stable.out 
b/geom/sql/Tests/functions/Tests/ST_Boundary.stable.out
new file mode 100644
--- /dev/null
+++ b/geom/sql/Tests/functions/Tests/ST_Boundary.stable.out
@@ -0,0 +1,66 @@
+stdout of test 'ST_Boundary` in directory 'geom/sql/Tests/functions` itself:
+
+
+# 16:00:22 >  
+# 16:00:22 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=39071" "--set" 
"mapi_usock=/var/tmp/mtest-17783/.s.monetdb.39071" "--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"
+# 16:00:22 >  
+
+# 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:39071/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-17783/.s.monetdb.39071
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 16:00:22 >  
+# 16:00:22 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-17783" "--port=39071"
+# 16:00:22 >  
+
+#SELECT ST_Boundary(ST_GeomFromText('LINESTRING(1 1,0 0, -1 1)'));
+% .L # table_name
+% st_geomfromtext_single_value # name
+% geometry # type
+% 0 # length
+[ "MULTIPOINT (1 1, -1 1)"     ]
+#SELECT ST_Boundary(ST_GeomFromText('POLYGON((1 1,0 0, -1 1, 1 1))'));
+% .L # table_name
+% st_geomfromtext_single_value # name
+% geometry # type
+% 0 # length
+[ "LINESTRING (1 1, 0 0, -1 1, 1 1)"   ]
+#SELECT ST_Boundary(ST_GeomFromText('POLYGON((1 1 1,0 0 1, -1 1 1, 1 1 1))'));
+% .L # table_name
+% st_geomfromtext_single_value # name
+% geometry # type
+% 0 # length
+[ "LINESTRING Z (1 1 1, 0 0 1, -1 1 1, 1 1 1)" ]
+#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) )'));
+% .L # table_name
+% st_geomfromtext_single_value # name
+% geometry # type
+% 0 # length
+[ "MULTIPOINT Z (-1 1 1, 1 1 0.75)"    ]
+#SELECT geom AS "GEOMETRY", ST_Boundary(geom) AS "BOUNDARY" FROM geometries 
WHERE id<7;
+% sys.L,       sys.L # table_name
+% GEOMETRY,    BOUNDARY # name
+% geometry,    geometry # type
+% 0,   0 # length
+[ "POINT (10 20)",     "GEOMETRYCOLLECTION EMPTY"      ]
+[ "LINESTRING (10 20, 30 40, 50 60)",  "MULTIPOINT (10 20, 50 60)"     ]
+[ "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 ((10 20, 30 40), (40 50, 60 70))",  "MULTIPOINT (10 20, 30 
40, 40 50, 60 70)"       ]
+[ "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))"    ]
+
+# 16:00:23 >  
+# 16:00:23 >  "Done."
+# 16:00:23 >  
+
diff --git a/geom/sql/Tests/functions/Tests/boundary.stable.err 
b/geom/sql/Tests/functions/Tests/boundary.stable.err
deleted file mode 100644
--- a/geom/sql/Tests/functions/Tests/boundary.stable.err
+++ /dev/null
@@ -1,36 +0,0 @@
-stderr of test 'boundary` in directory 'geom/sql/Tests/functions` itself:
-
-
-# 10:52:12 >  
-# 10:52:12 >  "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:12 >  
-
-# 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:13 >  
-# 10:52:13 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-4010" "--port=39851"
-# 10:52:13 >  
-
-
-# 10:52:13 >  
-# 10:52:13 >  "Done."
-# 10:52:13 >  
-
diff --git a/geom/sql/Tests/functions/Tests/boundary.stable.out 
b/geom/sql/Tests/functions/Tests/boundary.stable.out
deleted file mode 100644
--- a/geom/sql/Tests/functions/Tests/boundary.stable.out
+++ /dev/null
@@ -1,55 +0,0 @@
-stdout of test 'boundary` in directory 'geom/sql/Tests/functions` itself:
-
-
-# 10:52:12 >  
-# 10:52:12 >  "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:12 >  
-
-# 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:13 >  
-# 10:52:13 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-4010" "--port=39851"
-# 10:52:13 >  
-
-#SELECT ST_Boundary(ST_GeomFromText('LINESTRING(1 1,0 0, -1 1)'));
-% .L # table_name
-% st_geomfromtext_single_value # name
-% geometry # type
-% 0 # length
-[ "MULTIPOINT (1 1, -1 1)"     ]
-#SELECT ST_Boundary(ST_GeomFromText('POLYGON((1 1,0 0, -1 1, 1 1))'));
-% .L # table_name
-% st_geomfromtext_single_value # name
-% geometry # type
-% 0 # length
-[ "LINESTRING (1 1, 0 0, -1 1, 1 1)"   ]
-#SELECT ST_Boundary(ST_GeomFromText('POLYGON((1 1 1,0 0 1, -1 1 1, 1 1 1))'));
-% .L # table_name
-% st_geomfromtext_single_value # name
-% geometry # type
-% 0 # length
-[ "LINESTRING Z (1 1 1, 0 0 1, -1 1 1, 1 1 1)" ]
-#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) )'));
-% .L # table_name
-% st_geomfromtext_single_value # name
-% geometry # type
-% 0 # length
-[ "MULTIPOINT Z (-1 1 1, 1 1 0.75)"    ]
-
-# 10:52:13 >  
-# 10:52:13 >  "Done."
-# 10:52:13 >  
-
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to