[postgis-tickets] [SCM] PostGIS branch stable-3.2 updated. 3.2.1-32-g167e67f5d
git at osgeo.org
git at osgeo.org
Thu Jun 30 12:14:41 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 167e67f5d317eac2bfff0b1177c34c907c0a81ca (commit)
via 40ca39a7cef3b459adf41714aca92f4bc7aa2504 (commit)
from f98c02953580de676d8286b9142feecf14e40dc4 (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 167e67f5d317eac2bfff0b1177c34c907c0a81ca
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Thu Jun 30 12:14:25 2022 -0700
News entry for #4835
diff --git a/NEWS b/NEWS
index 81ab47561..e52ffa767 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ PostGIS 3.2.2dev
2022/MM/DD
* Bug Fixes *
+ - #4835, Occasional distance errors in polar area (Paul Ramsey)
- #5124, GRANT USAGE on topology schema to PUBLIC (Sandro Santilli)
- #5120, Fix not-null result from ST_EstimatedExtent against
truncated tables with spatial index (Sandro Santilli)
commit 40ca39a7cef3b459adf41714aca92f4bc7aa2504
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Thu Jun 30 12:11:51 2022 -0700
For edge_distance_to_point test, do not check that candidate point is on the target plane: we already know it is because we deliberately constructed it to be there. References #4835
diff --git a/liblwgeom/cunit/cu_geodetic.c b/liblwgeom/cunit/cu_geodetic.c
index 3021bc54b..12506476d 100644
--- a/liblwgeom/cunit/cu_geodetic.c
+++ b/liblwgeom/cunit/cu_geodetic.c
@@ -1184,6 +1184,15 @@ static void test_lwgeom_distance_sphere(void)
spheroid_init(&s, 6378137.0, 6356752.314245179498);
s.a = s.b = s.radius;
+ /* https://trac.osgeo.org/postgis/ticket/4835 */
+ lwg1 = lwgeom_from_wkt("POINT(45 90)", LW_PARSER_CHECK_NONE);
+ lwg2 = lwgeom_from_wkt("LINESTRING(15.55 78.216667, -164.58 68.875)", LW_PARSER_CHECK_NONE);
+ d = lwgeom_distance_spheroid(lwg1, lwg2, &s, 0.0);
+ // printf("%12.8g\n", d);
+ CU_ASSERT_DOUBLE_EQUAL(d, 1958.2179, 0.1);
+ lwgeom_free(lwg1);
+ lwgeom_free(lwg2);
+
/* https://trac.osgeo.org/postgis/ticket/4835 */
lwg1 = lwgeom_from_wkt("POINT(0 90)", LW_PARSER_CHECK_NONE);
lwg2 = lwgeom_from_wkt("LINESTRING(-166.11 68.875,15.55 78.216667)", LW_PARSER_CHECK_NONE);
diff --git a/liblwgeom/lwgeodetic.c b/liblwgeom/lwgeodetic.c
index ea204fb12..87b4c1316 100644
--- a/liblwgeom/lwgeodetic.c
+++ b/liblwgeom/lwgeodetic.c
@@ -1237,7 +1237,7 @@ double edge_distance_to_point(const GEOGRAPHIC_EDGE *e, const GEOGRAPHIC_POINT *
vector_difference(&p, &n, &k);
normalize(&k);
cart2geog(&k, &gk);
- if ( edge_contains_point(e, &gk) )
+ if ( edge_point_in_cone(e, &gk) )
{
d1 = sphere_distance(gp, &gk);
}
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
liblwgeom/cunit/cu_geodetic.c | 9 +++++++++
liblwgeom/lwgeodetic.c | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list