[postgis-users] Axis switching in transform from SRID 4326 to 3006 (Sweref99 TM) with PostGIS 3.1.3

David Stenwall david.stenwall at icloud.com
Tue Jul 20 17:02:58 PDT 2021


Hi
Ok, so I _think_ I have the same issue as in https://trac.osgeo.org/postgis/ticket/4949 <https://trac.osgeo.org/postgis/ticket/4949> since Sweref99 is also an N/E-type projection, also the National Projection of Sweden. I tried updating to 3.1.3 but no success.
 
I’m using ST_Transform to convert between lat/long and Sweref99 but the axis get reversed and a point in sweden ends up in the Indian ocean.

I’m using
"POSTGIS=""3.1.3 008d2db"" [EXTENSION] PGSQL=""130"" GEOS=""3.9.1-CAPI-1.14.2"" PROJ=""7.2.1"" LIBXML=""2.9.10"" LIBJSON=""0.15"" LIBPROTOBUF=""1.4.0"" WAGYU=""0.5.0 (Internal)"" TOPOLOGY"

Example

SELECT ST_AsText(ST_Transform('SRID=3006;POINT(675117 6580677)', 4326))  // Sweden National Museum

returns

"POINT(62.973291540292465 4.080735770719003)”  // Somewhere east of Africa

That should be long/lat 18.078113 59.328482 according to epsg.io <http://epsg.io/>

So am I missing something or is the fix in 3.1.3 not working or is this a similar problem but not the same thing?

Regards
David

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20210721/7ee636a3/attachment.html>


More information about the postgis-users mailing list