[postgis-tickets] r17602 - ST_Startpoint: Improve tests and documentation

Raul raul at rmr.ninja
Mon Jul 15 03:08:13 PDT 2019


Author: algunenano
Date: 2019-07-15 03:08:13 -0700 (Mon, 15 Jul 2019)
New Revision: 17602

Modified:
   trunk/regress/core/regress_ogc.sql
   trunk/regress/core/regress_ogc_expected
Log:
ST_Startpoint: Improve tests and documentation

Closes https://github.com/postgis/postgis/pull/443/



Modified: trunk/regress/core/regress_ogc.sql
===================================================================
--- trunk/regress/core/regress_ogc.sql	2019-07-15 10:07:03 UTC (rev 17601)
+++ trunk/regress/core/regress_ogc.sql	2019-07-15 10:08:13 UTC (rev 17602)
@@ -189,7 +189,6 @@
 select 'ST_GeometryN', ST_asewkt(ST_GeometryN('LINESTRING(0 0, 1 1)'::geometry, 1));
 select 'ST_NumGeometries', ST_NumGeometries('LINESTRING(0 0, 1 1)'::geometry);
 select 'ST_Union1', ST_AsText(ST_Union(ARRAY['POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))'::geometry, 'POLYGON((0.5 0.5, 1.5 0.5, 1.5 1.5, 0.5 1.5, 0.5 0.5))'::geometry]));
-select 'ST_StartPoint1',ST_AsText(ST_StartPoint('LINESTRING(0 0, 1 1, 2 2)'::geometry));
 select 'ST_EndPoint1', ST_AsText(ST_Endpoint('LINESTRING(0 0, 1 1, 2 2)'::geometry));
 select 'ST_PointN1', ST_AsText(ST_PointN('LINESTRING(0 0, 1 1, 2 2)'::geometry,2));
 select 'ST_PointN2', ST_AsText(ST_PointN('LINESTRING(0 0, 1 1, 2 2)'::geometry,3));
@@ -203,3 +202,10 @@
 
 -- issues with EMPTY --
 select 'ST_Buffer(empty)', ST_AsText(ST_Buffer('POLYGON EMPTY'::geometry, 0.5));
+
+-- ST_StartPoint
+select 'ST_StartPoint1',ST_AsText(ST_StartPoint('LINESTRING(0 0, 1 1, 2 2)'::geometry));
+select 'ST_StartPoint2',ST_AsText(ST_StartPoint('CIRCULARSTRING(2 2, 1 1, 1 0)'::geometry));
+select 'ST_StartPoint3',ST_AsText(ST_StartPoint('COMPOUNDCURVE(CIRCULARSTRING(3 3, 1 1, 1 0),(1 0, 0 1))'::geometry));
+select 'ST_StartPoint4',ST_AsText(ST_StartPoint('CURVEPOLYGON(CIRCULARSTRING(5 5, 4 0, 4 4, 0 4, 5 5),(1 1, 3 3, 3 1, 1 1))'::geometry));
+select 'ST_StartPoint5',ST_AsText(ST_StartPoint('POLYGON((0 0, 1 1, 0 1, 0 0))'::geometry));
\ No newline at end of file

Modified: trunk/regress/core/regress_ogc_expected
===================================================================
--- trunk/regress/core/regress_ogc_expected	2019-07-15 10:07:03 UTC (rev 17601)
+++ trunk/regress/core/regress_ogc_expected	2019-07-15 10:08:13 UTC (rev 17602)
@@ -108,7 +108,6 @@
 ST_GeometryN|LINESTRING(0 0,1 1)
 ST_NumGeometries|1
 ST_Union1|POLYGON((0 0,0 1,0.5 1,0.5 1.5,1.5 1.5,1.5 0.5,1 0.5,1 0,0 0))
-ST_StartPoint1|POINT(0 0)
 ST_EndPoint1|POINT(2 2)
 ST_PointN1|POINT(1 1)
 ST_PointN2|POINT(2 2)
@@ -120,3 +119,8 @@
 ST_PointN8|
 ST_PointN9|POINT Z (1 1 1)
 ST_Buffer(empty)|POLYGON EMPTY
+ST_StartPoint1|POINT(0 0)
+ST_StartPoint2|POINT(2 2)
+ST_StartPoint3|POINT(3 3)
+ST_StartPoint4|
+ST_StartPoint5|



More information about the postgis-tickets mailing list