[postgis-tickets] [PostGIS] #5232: Coordinates swapping with ST_transform and SRID 3116, postgis 3.1
PostGIS
trac at osgeo.org
Mon Sep 5 10:50:23 PDT 2022
#5232: Coordinates swapping with ST_transform and SRID 3116, postgis 3.1
-----------------------+---------------------------
Reporter: marbotte | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.1.8
Component: postgis | Version: 3.2.x
Resolution: | Keywords:
-----------------------+---------------------------
Changes (by robe):
* milestone: PostGIS 3.3.1 => PostGIS 3.1.8
Comment:
I don't seem to have a problem with this:
On mine
{{{
postgis_full_version
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------
POSTGIS="3.2.2 628da50" [EXTENSION] PGSQL="140" GEOS="3.10.2-CAPI-1.16.0"
PROJ="8.2.1" GDAL="GDAL 3.4.1, released 2021/12/27" LIBXML="2.9.13"
LIBJSON="0.15" LIBPROTO
BUF="1.3.3" WAGYU="0.5.0 (Internal)" RASTER
(1 row)
}}}
{{{
WITH a AS(
SELECT
ST_Transform(
ST_SetSRID(
ST_MakePoint(-73.84, 7.33)
,4326)
,3116 ) geom
), b AS(
SELECT
ST_Transform(
ST_SetSRID(
ST_MakePoint(-73.84, 7.33)
,4326)
,(SELECT proj4text FROM spatial_ref_sys WHERE srid=3116) ) geom
)
SELECT ST_X(geom), ST_Y(geom)
FROM a
UNION ALL
SELECT ST_X(geom), ST_Y(geom)
FROM b
}}}
yields:
{{{
st_x | st_y
--------------------+-------------------
1026224.6948008615 | 1302328.171272312
1026224.6948008615 | 1302328.171272312
(2 rows)
}}}
I haven't checked on a setup with 3.1. Any chance you can upgrade your
3.1? 3.1.3 is pretty old. Latest 3.1 is 3.1.7
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5232#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list