[postgis-tickets] [SCM] PostGIS branch stable-3.2 updated. 3.2.2-31-gc0574b810
git at osgeo.org
git at osgeo.org
Wed Aug 17 13:49:02 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.2 has been updated
via c0574b8104356a71a0bc3eebb49313f357d47b16 (commit)
via f1c0c865a98fcd0eb89b4c0df645e695175dae58 (commit)
from 6424da431a53208478acb3f297be7533b9633906 (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 c0574b8104356a71a0bc3eebb49313f357d47b16
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Wed Aug 17 13:48:56 2022 -0700
News entry for #5171
diff --git a/NEWS b/NEWS
index 649eb07fb..b1093fc11 100644
--- a/NEWS
+++ b/NEWS
@@ -14,8 +14,8 @@ Proj 6.1+, and PostgreSQL 14+.
- #5202, Guard against downgrades (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.2.2
2022/07/22
commit f1c0c865a98fcd0eb89b4c0df645e695175dae58
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 | 4 ++--
liblwgeom/lwspheroid.c | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list