[postgis-tickets] [SCM] PostGIS branch stable-3.0 updated. 3.0.3-13-gb998788

git at osgeo.org git at osgeo.org
Thu Feb 18 12:50:47 PST 2021


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  b99878850802c171fe406a63d3812194e788d74e (commit)
      from  d99d43af1a5787605c0ef56979aa94e0f69be3eb (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 b99878850802c171fe406a63d3812194e788d74e
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Feb 18 12:50:09 2021 -0800

    Handle axis order issues in polar stereographic / etc, closes #4844

diff --git a/NEWS b/NEWS
index f19e627..d8ac89d 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ PostGIS 3.04
   - Support newer proj versions that have deprecated pj_get_release (Paul Ramsey)
   - #4835, Adjust geodetic tolerance for calculations (Paul Ramsey)
   - #4853, DBSCAN cluster not formed when recordset length equal to minPoints (Dan Baston)
+  - #4844, Repair axis order handling for polar coordinate systems (Paul Ramsey)
 
 PostGIS 3.0.3
 2020/11/20
diff --git a/liblwgeom/lwgeom_transform.c b/liblwgeom/lwgeom_transform.c
index cc684bd..49b7415 100644
--- a/liblwgeom/lwgeom_transform.c
+++ b/liblwgeom/lwgeom_transform.c
@@ -288,13 +288,9 @@ proj_crs_is_swapped(const PJ *pj_crs)
 				      &out_unit_name,
 				      &out_unit_auth_name,
 				      &out_unit_code);
-		if (strcasecmp(out_abbrev, "E") == 0)
-			rv = LW_FALSE;
-		else if (strcasecmp(out_abbrev, "Lat") == 0)
-			rv = LW_TRUE;
-		else if (strcasecmp(out_direction, "north") == 0)
-			rv = LW_TRUE;
-		else if (strcasecmp(out_direction, "south") == 0)
+		/* Only swap Lat/Lon systems */
+		/* Use whatever ordering planar systems default to */
+		if (strcasecmp(out_abbrev, "Lat") == 0)
 			rv = LW_TRUE;
 		else
 			rv = LW_FALSE;
diff --git a/regress/core/tickets.sql b/regress/core/tickets.sql
index 78a9107..cedc471 100644
--- a/regress/core/tickets.sql
+++ b/regress/core/tickets.sql
@@ -1302,3 +1302,4 @@ SELECT '#4727', _ST_DistanceTree('SRID=4326;POLYGON((-179.9 -85.05112877980659,
 				ST_MakePoint(-150,-40), 0.0, true);
 
 SELECT '#4853', ST_ClusterDBSCAN(geom,  eps := 0.000906495804256269, minpoints := 4) OVER() AS cid FROM (VALUES ('0101000020E6100000E4141DC9E5934B40D235936FB6193940'::geometry), ('0101000020E6100000C746205ED7934B40191C25AFCE193940'::geometry), ('0101000020E6100000C780ECF5EE934B40B6BE4868CB193940'::geometry), ('0101000020E6100000ABB2EF8AE0934B404451A04FE4193940'::geometry)) AS t(geom);
+SELECT '#4844', ST_AsEWKT(ST_SnapToGrid(ST_Transform('SRID=3575;POINT(370182.35945313 -2213980.8213281)'::geometry,4326),0.01));
diff --git a/regress/core/tickets_expected b/regress/core/tickets_expected
index 21b3fb2..737e0c3 100644
--- a/regress/core/tickets_expected
+++ b/regress/core/tickets_expected
@@ -439,3 +439,4 @@ ERROR:  LWGEOM_addpoint: Invalid offset
 #4853|0
 #4853|0
 #4853|0
+#4844|SRID=4326;POINT(19.49 69.79)

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

Summary of changes:
 NEWS                          |  1 +
 liblwgeom/lwgeom_transform.c  | 10 +++-------
 regress/core/tickets.sql      |  1 +
 regress/core/tickets_expected |  1 +
 4 files changed, 6 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list