[SCM] PostGIS branch stable-3.3 updated. 3.3.6-30-g0e67b844d
git at osgeo.org
git at osgeo.org
Fri Aug 2 16:50:42 PDT 2024
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.3 has been updated
via 0e67b844d2fd365a41ced24987dbb1febd48c97a (commit)
via f3b71b1d6699040b831db7b4290f1d9e21e4a968 (commit)
from e0595f267097c66e1a1a41f4eae79c8ce0959899 (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 0e67b844d2fd365a41ced24987dbb1febd48c97a
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Fri Aug 2 16:50:37 2024 -0700
NEWS for #5740
diff --git a/NEWS b/NEWS
index 73a3914d4..489f2e51d 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,8 @@ and PostgreSQL 15+.
(Paul Ramsey, Regina Obe)
- #5687, #5756 Support for PostgreSQL 17, revise postgis_get_full_version_schema()
to not rely on search_path
+ - #5740, ST_DistanceSpheroid(geometry) incorrectly handles polygons (Paul Ramsey)
+
PostGIS 3.3.6
2024/02/07
commit f3b71b1d6699040b831db7b4290f1d9e21e4a968
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Fri Aug 2 16:29:15 2024 -0700
Error in ST_DistanceSpheroid due to planar box leaking into geodetic code, references #5740
diff --git a/liblwgeom/lwgeodetic.c b/liblwgeom/lwgeodetic.c
index d739a9b44..b830bac39 100644
--- a/liblwgeom/lwgeodetic.c
+++ b/liblwgeom/lwgeodetic.c
@@ -2080,13 +2080,13 @@ double lwgeom_distance_spheroid(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2, co
type2 = lwgeom2->type;
/* Make sure we have boxes */
- if ( lwgeom1->bbox )
+ if ( FLAGS_GET_GEODETIC(lwgeom1->flags) && lwgeom1->bbox )
gbox1 = *(lwgeom1->bbox);
else
lwgeom_calculate_gbox_geodetic(lwgeom1, &gbox1);
/* Make sure we have boxes */
- if ( lwgeom2->bbox )
+ if ( FLAGS_GET_GEODETIC(lwgeom2->flags) && lwgeom2->bbox )
gbox2 = *(lwgeom2->bbox);
else
lwgeom_calculate_gbox_geodetic(lwgeom2, &gbox2);
diff --git a/postgis/lwgeom_spheroid.c b/postgis/lwgeom_spheroid.c
index 3b6f0b2bb..b313ab7e5 100644
--- a/postgis/lwgeom_spheroid.c
+++ b/postgis/lwgeom_spheroid.c
@@ -521,6 +521,8 @@ Datum geometry_distance_spheroid(PG_FUNCTION_ARGS)
/* We are going to be calculating geodetic distances */
lwgeom_set_geodetic(lwgeom1, LW_TRUE);
lwgeom_set_geodetic(lwgeom2, LW_TRUE);
+ lwgeom_refresh_bbox(lwgeom1);
+ lwgeom_refresh_bbox(lwgeom2);
distance = lwgeom_distance_spheroid(lwgeom1, lwgeom2, sphere, 0.0);
-----------------------------------------------------------------------
Summary of changes:
NEWS | 2 ++
liblwgeom/lwgeodetic.c | 4 ++--
postgis/lwgeom_spheroid.c | 2 ++
3 files changed, 6 insertions(+), 2 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list