[postgis-tickets] [SCM] PostGIS branch stable-3.0 updated. 3.0.6-30-g35c31865f

git at osgeo.org git at osgeo.org
Wed Aug 17 13:50:51 PDT 2022


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.0 has been updated
       via  35c31865f210be96371ca03a838be347fee94859 (commit)
       via  f25654671e053dcd4baaf63d0e5c302c837bd160 (commit)
      from  3fa174a0a68c7bf8b31733bf0c08f7cd9158c306 (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 35c31865f210be96371ca03a838be347fee94859
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Aug 17 13:50:42 2022 -0700

    News entry for #5171

diff --git a/NEWS b/NEWS
index 1eadd3de0..44dde73e0 100644
--- a/NEWS
+++ b/NEWS
@@ -6,7 +6,8 @@ PostGIS 3.0.7dev
   - #4643, Fix upgrade from unpackaged on PostgreSQL >= 13 (Sandro Santilli)
   - #5209, #5210, Fix upgrades with CVE-2022-2625 PostgreSQL fix
   - #5032, Correctly read extent off multi-key GIST indexes (Paul Ramsey)
-  - #5171, Reset proj error state after failed parse (Paul Ramsey)
+  - #5181, Reset proj error state after failed parse (Paul Ramsey)
+  - #5171, Short circuit geodesic distance when inputs equal (Paul Ramsey)
 
 PostGIS 3.0.6
 2022/07/20

commit f25654671e053dcd4baaf63d0e5c302c837bd160
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Aug 17 13:45:41 2022 -0700

    Short circuit geodesic distance when input points are equal (References #5171)

diff --git a/liblwgeom/lwspheroid.c b/liblwgeom/lwspheroid.c
index 59368db42..bf8c5cbef 100644
--- a/liblwgeom/lwspheroid.c
+++ b/liblwgeom/lwspheroid.c
@@ -79,6 +79,11 @@ static double spheroid_big_b(double u2)
 double spheroid_distance(const GEOGRAPHIC_POINT *a, const GEOGRAPHIC_POINT *b, const SPHEROID *spheroid)
 {
 	struct geod_geodesic gd;
+
+	/* Same point => zero distance */
+	if ( geographic_point_equals(a, b) )
+		return 0.0;
+
 	geod_init(&gd, spheroid->a, spheroid->f);
 	double lat1 = a->lat * 180.0 / M_PI;
 	double lon1 = a->lon * 180.0 / M_PI;

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

Summary of changes:
 NEWS                   | 3 ++-
 liblwgeom/lwspheroid.c | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list