[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-62-ga2a5961
git at osgeo.org
git at osgeo.org
Mon Feb 8 14:58:51 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, master has been updated
via a2a5961828613c10796f72753cf70980d6b414a5 (commit)
via 04d167389116720f2889dcba2721f68ef979daef (commit)
from 20f4d1b9165c00c92e8682894961dc4522c354b9 (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 a2a5961828613c10796f72753cf70980d6b414a5
Merge: 04d1673 20f4d1b
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Mon Feb 8 14:58:46 2021 -0800
Merge branch 'master' of https://git.osgeo.org/gitea/postgis/postgis
commit 04d167389116720f2889dcba2721f68ef979daef
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Mon Feb 8 14:58:29 2021 -0800
Only do axis flips on CRS that have a "Lat" as the first column. Otherwise just take the EPSG database order. References #4842, #4748
diff --git a/liblwgeom/lwgeom_transform.c b/liblwgeom/lwgeom_transform.c
index ed7d601..51d9c2d 100644
--- a/liblwgeom/lwgeom_transform.c
+++ b/liblwgeom/lwgeom_transform.c
@@ -277,7 +277,7 @@ proj_crs_is_swapped(const PJ *pj_crs)
const char *out_name, *out_abbrev, *out_direction;
double out_unit_conv_factor;
const char *out_unit_name, *out_unit_auth_name, *out_unit_code;
- /* Read only first axis, see if it is degrees / north */
+ /* Read only first axis */
proj_cs_get_axis_info(NULL,
pj_cs,
0,
@@ -288,13 +288,10 @@ 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 6acda49..da3ea27 100644
--- a/regress/core/tickets.sql
+++ b/regress/core/tickets.sql
@@ -1298,7 +1298,9 @@ SELECT '#4670-5', ST_AsEWKT(ST_AddPoint('LINESTRING(0 0, 1 1, 3 3, 4 4)'::geomet
SELECT '#4689', _ST_DistanceTree('POLYGON ((30 10, 40 40, 20 40, 30 10))'::geography, 'POLYGON((81 6,140 35,-70 18,-51 0,-60 -46,106 -6,81 6))');
+-- Polar Stereographic Axis order issues
SELECT '#4748', ST_AsEWKT(ST_Transform(ST_SetSRID(ST_Point(-36.75, -54.25), 4326), 3031),1);
+SELECT '#4842', ST_AsEWKT(ST_Transform(ST_SetSRID(ST_Point(12.572, 66.081), 4326), 3413),1);
SELECT '#4718',
round(degrees(
diff --git a/regress/core/tickets_expected b/regress/core/tickets_expected
index bc1f71a..181f22f 100644
--- a/regress/core/tickets_expected
+++ b/regress/core/tickets_expected
@@ -435,6 +435,7 @@ ERROR: BOX2D_construct: args can not be empty points
ERROR: LWGEOM_addpoint: Invalid offset
#4689|0
#4748|SRID=3031;POINT(-2399498.7 3213318.5)
+#4842|SRID=3413;POINT(2218086.2 -1409161.3)
#4718|270.000|90.000
#4727|0
#4796|POLYGON((178632 397744,178738 397769,178745 397741,178749 397742,178752 397727,178748 397726,178759 397684,178699 397669,178694 397691,178646 397680,178632 397744))
-----------------------------------------------------------------------
Summary of changes:
liblwgeom/lwgeom_transform.c | 13 +++++--------
regress/core/tickets.sql | 2 ++
regress/core/tickets_expected | 1 +
3 files changed, 8 insertions(+), 8 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list