I have a lot of coordinates I want to convert from Sweref99tm to WGS84 for display on google maps. I'm using gdal installed on my laptop:

$ echo "6782384 599140" | gdaltransform -s_srs EPSG:3006 -t_srs EPSG:4326
64.1363442998149 3.53655177487795 0

But according to several sites online where I input the same coordinates, I get 61.163396, 16.842654 returned instead.

Anyone have an idea what I'm doing wrong?

  • Give coordinates in order easting- northing.
    – user30184
    Mar 5, 2017 at 13:06

1 Answer 1


Gdaltrasform takes coordinates in longitude-latitude or easting-northing order. That is how GDAL always handles coordinates internally and perhaps that is so self-evident for GDAL developers that it is not documented in http://www.gdal.org/gdaltransform.html. All you need to do is to flip the order of the coordinates

gdaltransform -s_srs EPSG:3006 -t_srs EPSG:4326
599140 6782384
16.8426538013697 61.1633955987023 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.