[GIS] How to transform SRID 3035 to SRID 4326

coordinate systempostgissrid

I have data in the ETRS 89 LAEA format (SRID: 3035). But I have problems to transform it.

Example data:
N2736 E4541

I want to transform it to WGS84 (SRID: 4326), to check the coordinates on a map.

My transformation looks like this:
SELECT ST_AsText(ST_Transform(ST_GeomFromText('POINT(27.36 45.41)',3035),4326))

I get: POINT(-29.0867265338903 12.9940786314927)
But the point should be in Germany and not in the atlantic ocean 🙁

Best Answer

At a guess, your point should be about 5.5km southeast of Bad Reichenhall right?

If so, the problem you have is you're interpreting your input coordinates incorrectly. The clue is in the source projection's name: LAEA which stands for Lambert Azimuthal Equal-Area, which is a projection that uses linear units (metres in this case) rather than angular units.

So your data of N2736 E4541 should be translated into metres - and here's the rub, they're in 1000's of metres, so your actual coordinate is 4541000, 2736000 (eastings are usually given before northings). If I use GDAL's gdaltransform:

$ gdaltransform -s_srs EPSG:3035 -t_SRS EPSG:4326

and type in the coordinates:

4541000, 2736000

I get:

12.9300691689392 47.6983999922817

Which puts me near the border between Bavaria and Austria.

In terms of PostGIS, you'd use:

SELECT ST_AsText(ST_Transform(ST_GeomFromText('POINT(4541000 2736000)',3035),4326));

Which returns me:

                st_astext
------------------------------------------
 POINT(12.9300691689392 47.6983999922817)
(1 row)