I am attempting to use this MapTiler webpage to create a background image that I can position my image over and then use GDAL to generate tiles. My process is:

  1. Position the map on the MapTiler page over the area I'm adding an overlay to.
  2. Save the static map image and the four coordinate values representing west, south, east, and, north.
  3. Bring the saved image into Photoshop and use it as a background to create my overlay image. The new image always has the same dimensions as the background.
  4. I then use gdal_translate to create a GeoTIFF from the overlay image and the saved coordinates. Here is an example of the parameters used. This command runs without error.

    gdal_translate -of GTiff -a_srs EPSG:900913 -gcp 0 0 west north -gcp width_of_your_input_map_file_in_pixels 0 east north -gcp width_of_your_input_map_file_in_pixels height_of_your_input_map_file_in_pixels east south your_input_file_name.png your_output_file_name.png

  5. I then use gdal2tiles.py to generate the tile set. Here is an example of that command:

    gdal2tiles.py -p mercator -z zoom_range name_of_output_file.png

    Which returns the error:

    ERROR 1: Too many points (2704 out of 2704) failed to transform, unable to compute output bounds.

I believe the problem is that I'm substituting in the coordinates from the MapTiler webpage which are in this form I'm not familiar with.

-4891969.810251281 -26369557.159749157 95295571.90369494 73817984.55419706

So, what coordinate system am I looking at here? How can it be converted into something gdal_translate understands?


The website http://www.maptiler.org/photoshop-google-maps-overlay-tiles/ prints out coordinates in http://epsg.io/3857 - in older GDAL it is called 900913.

The website itself also contains information how to directly use the coordinates in the MapTiler software, including the variant available for free.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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