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

Paul Ramsey pramsey at cleverelephant.ca
Wed Jul 21 13:25:02 PDT 2021


The fix is not in any released version yet. If you pull the code from git
and build you can confirm it works for your case (I'm going to guess that
it will, your description matches the other N/E systems.

P

On Tue, Jul 20, 2021 at 5:12 PM David Stenwall <david.stenwall at icloud.com>
wrote:

> Hi
> Ok, so I _think_ I have the same issue as in
> 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
>
> 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
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20210721/320e3aeb/attachment.html>


More information about the postgis-users mailing list