[postgis-tickets] [SCM] PostGIS branch stable-3.0 updated. 3.0.5-7-gd8786601e
git at osgeo.org
git at osgeo.org
Thu Jun 30 12:16:37 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 d8786601e26fc67747dc2acbfe3cdc78c96883fc (commit)
via 1f5ed2286d544f161c4a0cfc628f49454fa25dcd (commit)
from e039130b3d3a9e905c7ffb8dab6976fed1330a7f (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 d8786601e26fc67747dc2acbfe3cdc78c96883fc
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Thu Jun 30 12:16:29 2022 -0700
NEWS entry for #4835
diff --git a/NEWS b/NEWS
index 2e4dc03eb..30cf30a3f 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ PostGIS 3.0.6dev
2022/XX/XX
* Bug Fixes and Enhancements *
+ - #4835, Occasional distance errors in polar area (Paul Ramsey)
- #5152, Fix infinite loop with ST_Split (Sandro Santilli)
- #5087, Prevent configure for PostgreSQL >= 14
and note in docs, PostgreSQL > 13 major
commit 1f5ed2286d544f161c4a0cfc628f49454fa25dcd
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 ff602fdb8..8bdd7573e 100644
--- a/liblwgeom/lwgeodetic.c
+++ b/liblwgeom/lwgeodetic.c
@@ -1235,7 +1235,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