[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha2-146-ge2b8950

git at osgeo.org git at osgeo.org
Thu Nov 5 11:47:11 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  e2b89503cd7cd3e4942877894d4b8b7f1a44ba6b (commit)
      from  6812b00ed6195e151d04be8c78aa8f1c20c628ea (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 e2b89503cd7cd3e4942877894d4b8b7f1a44ba6b
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Thu Nov 5 11:46:02 2020 -0800

    Swap axes that have 'Lat' in the first axis. Don't swap axes that are 'Easting' first. After that, believe the directionality provided and swap any 'north' axes. If you still don't know what to do, just leave the axes alone.
    Closes #4748

diff --git a/liblwgeom/lwgeom_transform.c b/liblwgeom/lwgeom_transform.c
index 3a8a4a8..973b0a9 100644
--- a/liblwgeom/lwgeom_transform.c
+++ b/liblwgeom/lwgeom_transform.c
@@ -256,7 +256,16 @@ proj_crs_is_swapped(const PJ *pj_crs)
 				      &out_unit_name,
 				      &out_unit_auth_name,
 				      &out_unit_code);
-		rv = (strcasecmp(out_direction, "north") == 0);
+		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)
+			rv = LW_TRUE;
+		else
+			rv = LW_FALSE;
 	}
 	proj_destroy(pj_cs);
 	return rv;

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

Summary of changes:
 liblwgeom/lwgeom_transform.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list