[postgis-tickets] r14913 - Add some tests to document ST_Expand behavior

Daniel Baston dbaston at gmail.com
Tue May 17 17:34:59 PDT 2016


Author: dbaston
Date: 2016-05-17 17:34:59 -0700 (Tue, 17 May 2016)
New Revision: 14913

Modified:
   trunk/regress/regress.sql
   trunk/regress/regress_expected
Log:
Add some tests to document ST_Expand behavior

Modified: trunk/regress/regress.sql
===================================================================
--- trunk/regress/regress.sql	2016-05-17 01:24:39 UTC (rev 14912)
+++ trunk/regress/regress.sql	2016-05-18 00:34:59 UTC (rev 14913)
@@ -248,5 +248,18 @@
 select '191', ST_AsText(ST_Points('MULTICURVE EMPTY'));
 select '192', ST_AsText(ST_Points('POLYGON((35 10,45 45,15 40,10 20,35 10),(20 30,35 35,30 20,20 30))'));
 
+select '200', ST_Expand(null::geometry, 1);
+select '201', ST_AsText(ST_Expand('LINESTRING (1 2 3, 10 20 30)'::geometry, 1));
+select '202', ST_AsText(ST_Expand('LINESTRINGM (1 2 3, 10 20 30)'::geometry, 1));
+select '203', ST_AsText(ST_Expand('LINESTRING (1 2, 10 20)'::geometry, 3));
+select '204', ST_AsText(ST_Expand('POLYGON EMPTY'::geometry, 4));
+select '205', ST_AsText(ST_Expand('POINT EMPTY'::geometry, 2));
+select '206', ST_AsText(ST_Expand('POINT (2 3)'::geometry, 0));
+select '207', ST_AsText(ST_Expand('LINESTRING (1 2, 3 4)'::geometry, 0));
+select '208', ST_AsText(ST_Expand('POINT (0 0)'::geometry, -1));
+select '209', ST_AsText(ST_Expand('LINESTRING (0 0, 10 10)'::geometry, -4));
+select '210', ST_Expand(null::box3d, 1);
+select '211', ST_Expand('BOX3D(-1 3 5, -1 6 8)'::BOX3D, 1);
+
 -- Drop test table
 DROP table test;

Modified: trunk/regress/regress_expected
===================================================================
--- trunk/regress/regress_expected	2016-05-17 01:24:39 UTC (rev 14912)
+++ trunk/regress/regress_expected	2016-05-18 00:34:59 UTC (rev 14913)
@@ -173,3 +173,15 @@
 190|t
 191|MULTIPOINT EMPTY
 192|MULTIPOINT(35 10,45 45,15 40,10 20,35 10,20 30,35 35,30 20,20 30)
+200|
+201|POLYGON Z ((0 1 2,0 21 2,11 21 31,11 1 31,0 1 2))
+202|POLYGON M ((0 1 2,0 21 2,11 21 31,11 1 31,0 1 2))
+203|POLYGON((-2 -1,-2 23,13 23,13 -1,-2 -1))
+204|POLYGON EMPTY
+205|POINT EMPTY
+206|POLYGON((2 3,2 3,2 3,2 3,2 3))
+207|POLYGON((1 2,1 4,3 4,3 2,1 2))
+208|POLYGON((1 1,1 -1,-1 -1,-1 1,1 1))
+209|POLYGON((4 4,4 6,6 6,6 4,4 4))
+210|
+211|BOX3D(-2 2 4,0 7 9)



More information about the postgis-tickets mailing list