Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to gdal and have a simple question. I want to transform an image from OpenStreetMap projection to Nasa Blue Marble projection. What I understand is that OpenStreetMap projection is EPSG:3857 and Blue Marble projection is EPSG:4326 (

So, I simply downloaded a sample 256*256 tile like this: and applied the following command:

gdalwarp -s_srs EPSG:3857 -t_srs EPSG:4326 "0.png" "o_bluemarble.png"

I received the following error: "Copying color table from 0.png to new file. ERROR 1: Unable to compute a transformation between pixel/line and georeferenced coordinates for 0.png. There is no affine transformation and no GCPs."

From where should I start?

Update 1

I got it. I need to define the bounds. Firstly, I got the bounds:

gdaltransform -s_srs EPSG:4326 -t_srs EPSG:3857
-180 85.05
-20037508.3427892 20036051.9193368 0

I used 85.05 as it is the approximation to infinity in Spherical Mercator used by Bing. Then, I used the following commands:

./gdal_translate -of Gtiff -co "tfw=yes"  -a_ullr -20037508.3427892 20036051.9193368 20037508.3427892 -20036051.9193368 -a_srs "EPSG:3857"  "input.png" "input_tfw.tiff"

./gdalwarp -s_srs EPSG:3857 -t_srs EPSG:4326 -ts 256 128 "input_tfw.tiff" "output.tif"

The problem now is that by comparing an image downloaded from openstreetmap with Blue Marble, the poles are not aligned properly. I mean here Greenland, not the far pole. What do think the problem is?

share|improve this question
85,05° N is not really Google's approximation for infinity. It is just chosen to get a square tile for zoom level 0. It is true that 90°N will be infinity in that projection, but everything between 85 and 89.99 can be projected, though rather distorted. – AndreJ Aug 30 '13 at 10:56

I'm not sure what your problem is. The image I get from OSM looks like this:

OSM topmost tile

And after running your commands I get this:

WGS84 image

Which looks like how I would expect a lon/lat dataset to look, which is essentially an equirectangular projection:

enter image description here

share|improve this answer
There was a slight shift near poles but I fixed it by providing a more accurate lat value (85.0511). Thanks. – egsemsem Nov 30 '11 at 4:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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