[postgis-tickets] [SCM] PostGIS branch stable-3.1 updated. 3.1.3-11-g74b40a7

git at osgeo.org git at osgeo.org
Mon Jul 26 14:30:27 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, stable-3.1 has been updated
       via  74b40a739ed0cb3afd7de742801bb6ea1e295e89 (commit)
      from  b420cf7abfc0319b2dbf9b3a893ee055560b3001 (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 74b40a739ed0cb3afd7de742801bb6ea1e295e89
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Mon Jul 26 14:15:34 2021 -0700

    Error in arc direction flagging, fixes #4326

diff --git a/NEWS b/NEWS
index 03215b8..753b01d 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ PostGIS 3.1.4dev
   - #4941, Fix loose mbr in topology.face on update (Sandro Santilli)
   - #4949, Swapped coordinates for N/E planar systems (Paul Ramsey)
   - GI617, Fix typo in setting of INVMINDIST (Charles Karney)
+  - #4326, Fix CircularPolygon area calculation (Paul Ramsey)
 
 
 PostGIS 3.1.3
diff --git a/liblwgeom/cunit/cu_measures.c b/liblwgeom/cunit/cu_measures.c
index 8867992..69c992d 100644
--- a/liblwgeom/cunit/cu_measures.c
+++ b/liblwgeom/cunit/cu_measures.c
@@ -208,6 +208,19 @@ static void test_mindistance2d_tolerance(void)
 	*/
 	DIST2DTEST("LINESTRING(0.5 1,0.5 3)", "MULTICURVE(CIRCULARSTRING(2 3,3 2,2 1,1 2,2 3),(0 0, 0 5))", 0.5, default_accepted_error);
 
+	/*
+	** "Fast path" case
+	*/
+	DIST2DTEST("LINESTRING(10 0,11 1,12 2,13 3,14 4,15 5,16 6)",
+		"LINESTRING(1 1.5,2 3,3 4.5,4 6,5 7.5,6 9)",
+		8.3205, default_accepted_error);
+
+	/*
+	** Ticket 4326
+	*/
+	DIST2DTEST(
+		"CURVEPOLYGON(CIRCULARSTRING(7874821 8715927,8907663 8715927,8844683 7750316,7937800 7750316,7874821 8715927))",
+		"POINT(5433865 8243495)", 2271704.2698450615, default_accepted_error);
 }
 
 static void
diff --git a/liblwgeom/ptarray.c b/liblwgeom/ptarray.c
index 746964a..38cfa5c 100644
--- a/liblwgeom/ptarray.c
+++ b/liblwgeom/ptarray.c
@@ -941,7 +941,7 @@ ptarrayarc_contains_point_partial(const POINTARRAY *pa, const POINT2D *pt, int c
 		}
 
 		/* Going "down"! */
-		if ( side > 0 && (seg2->y <= pt->y) && (pt->y < seg1->y) )
+		if ( side > 0 && (seg3->y <= pt->y) && (pt->y < seg1->y) )
 		{
 			wn--;
 		}

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

Summary of changes:
 NEWS                          |  1 +
 liblwgeom/cunit/cu_measures.c | 13 +++++++++++++
 liblwgeom/ptarray.c           |  2 +-
 3 files changed, 15 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list