[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha2-149-g9a9241c

git at osgeo.org git at osgeo.org
Thu Nov 5 14:43:31 PST 2020


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, master has been updated
       via  9a9241ce747b3ad1fbeacd899310fac91dfd418b (commit)
      from  4f1fecf2ebc73f2e4d508906f7a73fc77aa0e2f8 (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 9a9241ce747b3ad1fbeacd899310fac91dfd418b
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Nov 5 14:41:23 2020 -0800

    Long-standing bug in pole adjustment code for bounding boxes.
    Results in incorrect box for shapes wrapping the negative Y geocentric axis (-90,0)
    Closes #4727

diff --git a/liblwgeom/lwgeodetic.c b/liblwgeom/lwgeodetic.c
index aa3d278..cac4310 100644
--- a/liblwgeom/lwgeodetic.c
+++ b/liblwgeom/lwgeodetic.c
@@ -360,7 +360,7 @@ static int gbox_check_poles(GBOX *gbox)
 		else if ((gbox->ymin < 0.0) && (gbox->ymax < 0.0))
 		{
 			LWDEBUG(4, "enclosed negative y axis");
-			gbox->ymax = -1.0;
+			gbox->ymin = -1.0;
 		}
 		else
 		{
diff --git a/regress/core/tickets.sql b/regress/core/tickets.sql
index 8631de7..70925f8 100644
--- a/regress/core/tickets.sql
+++ b/regress/core/tickets.sql
@@ -1310,3 +1310,6 @@ SELECT '#4718',
            'POINT(77.46429 37.96999)'::geography
            ))::numeric,3);
 
+SELECT '#4727', _ST_DistanceTree('SRID=4326;POLYGON((-179.9 -85.05112877980659, -179.9 74.99999999999997, -152 80, -130 84.99999999999997, -115 85.05112877980659, -60 85.05112877980659, -60 79, -70 70, -130 50, -80 6, -65 -53, -100 -85.05112877980659, -179.9 -85.05112877980659))'::geography,
+				ST_MakePoint(-150,-40), 0.0, true);
+
diff --git a/regress/core/tickets_expected b/regress/core/tickets_expected
index f520039..b381e7c 100644
--- a/regress/core/tickets_expected
+++ b/regress/core/tickets_expected
@@ -436,3 +436,4 @@ ERROR:  LWGEOM_addpoint: Invalid offset
 #4689|0
 #4748|SRID=3031;POINT(-2399498.7 3213318.5)
 #4718|270.000|90.000
+#4727|0

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

Summary of changes:
 liblwgeom/lwgeodetic.c        | 2 +-
 regress/core/tickets.sql      | 3 +++
 regress/core/tickets_expected | 1 +
 3 files changed, 5 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list