[postgis-tickets] [SCM] PostGIS branch main updated. 3.2.0alpha1-26-g894916e

git at osgeo.org git at osgeo.org
Sun Sep 26 12:20:24 PDT 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, main has been updated
       via  894916e50a63091b8c7e5fb641892379eda559c7 (commit)
      from  4836300b1b393effbfe7274c911a07f1c77d78d9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 894916e50a63091b8c7e5fb641892379eda559c7
Author: Sandro Santilli <strk at kbt.io>
Date:   Sun Sep 26 21:18:37 2021 +0200

    Add unit test for https://trac.osgeo.org/postgis/ticket/4990

diff --git a/liblwgeom/cunit/cu_ptarray.c b/liblwgeom/cunit/cu_ptarray.c
index c393577..ee0ab76 100644
--- a/liblwgeom/cunit/cu_ptarray.c
+++ b/liblwgeom/cunit/cu_ptarray.c
@@ -719,7 +719,16 @@ static void test_ptarray_closest_segment_2d()
 	ASSERT_DOUBLE_EQUAL(dist, 2);
 
 
-  lwline_free(line);
+	lwline_free(line);
+
+	/* See https://trac.osgeo.org/postgis/ticket/4990 */
+	wkt = "LINESTRING(4 31,7 31,7 34,4 34,4 31)";
+	line = lwgeom_as_lwline(lwgeom_from_text(wkt));
+	pa = line->points;
+	qp.x = 7.1; qp.y = 31;
+	rv = ptarray_closest_segment_2d(pa, &qp, &dist);
+	ASSERT_INT_EQUAL(rv, 0);
+	lwline_free(line);
 }
 
 

-----------------------------------------------------------------------

Summary of changes:
 liblwgeom/cunit/cu_ptarray.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list