This follows up a question posted over seven years ago. The results look very similar to the original inquiry without an answer or update I could test successfully.

I made a custom stylized EPSG:3857 map that matches up perfectly (with exception of a few differences in Antarctica) to an OpenStreetMap EPSG:3857 export:

enter image description here

My goal is to create an ECE image that lines up with NASA's Blue Marble (EPSG:4326 I think):

Blue Marble: Image courtesy of NASA. Image courtesy of NASA.

Following steps I found here, I can get close.

gdaltransform -s_srs EPSG:4326 -t_srs EPSG:3857
-180 85.0511


-20037508.3427892 20037471.2051371 0


gdal_translate -of Gtiff -co "tfw=yes"  -a_ullr -20037508.3427892 20037471.2051371 20037508.3427892 -20037471.2051371 -a_srs "EPSG:3857"  "/espg-3857.tiff" "tfw.tiff"

gdalwarp -s_srs EPSG:3857 -t_srs EPSG:4326 -ts 1024 512 "tfw.tiff" "espg-4326.tiff"


enter image description here

This is not the desired result however. Note the closeness of Greenland to the top compared to the Blue Marble image. When overlaying the two, many differences can be seen:

enter image description here

What can I do to correctly transform from EPSG:3857 to EPSG:4326 for this world map?

  • I'm reading that the square EPSG:3857 image may have poles cut off. That would contribute to misalignment, would it not? Maybe I need to add some padding on the poles... Mar 24, 2019 at 15:57
  • Yes, it is. EPSG:3857 is a Mercator projection of a spheric datum. Cropped to symmetric latitudes for which the vertical deformation occupies the same space as a hemisphere wide. The result is a quadrangular image. Very used in web applications due to the speed with which their coordinates can be transformed. Mar 24, 2019 at 23:56

1 Answer 1


If your first image is in EPSG:3857, it is a square. Therefore:

gdal_translate -of Gtiff -co "tfw=yes" -a_ullr -20037508.3427892 20037508.3427892 20037508.3427892 -20037508.3427892 -a_srs "EPSG:3857" "/espg-3857.tiff" "tfw.tiff"

Because 85.0511 is the result of an approximation (20037508.3427892 is also an approximation, but it is the GDAL's approximaton, not yours).

I would think that the creation of the world file is not necessary as well, since the image would be georeferenced when setting the values of the edges.

Then, you can:

gdalwarp -s_srs EPSG:3857 -t_srs EPSG:4326 -ts 1024 0 "tfw.tiff" "espg-4326.tiff"

to get an image of 1024 pixels wide and the number of lines that are necessary for high.

Finally, you need to recreate the missing lines near the poles (the missing parts of the Arctic Ocean and the Antarctic continent), to get the 512 lines.


Your Answer

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

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