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 trying to generate map tiles using gdal2tiles for an area much larger than MapTiler can handle. However, my tile caches are not showing up on the maps. I checked gdal2tiles by running the same file through it and MapTiler - and the outputs come out differently. Here's my gdal2tiles command:

/usr/local/Cellar/gdal/1.9.0/bin/ -p mercator --s_srs 3857 -z 1-9 -v myFile.tiff

For instance, in the maptiler output, I get the file


While gdal gives me different files, like


The output should be identical, right? Is there something I'm missing? My projection on the original file is definitely correct. I have also tried gdal2tiles with 900913. I am running gdal2tiles on MacOS X Mountain Lion, gdal 1.9.0.

share|improve this question
check out your profile whether mercator or geodetic. it looks like your first output is mercator and second is geodetic. – Aragon Apr 12 '13 at 13:11
That's interesting.. but as you can see, I am calling with the -p mercator argument, and mercator is also the default anyway. Do we think that that gdal2tiles could be broken in this reqard? – deepwinter Apr 12 '13 at 17:01
possible duplicate of GDAL2Tiles: MapTiles from BSB/KAP are Switched – AndreJ Aug 27 '13 at 10:08

It's because gdal2tiles generates the tiles in TMS format. You need to enable it on your map or do a small calculation on the fly in order to display the tiles.

share|improve this answer

It is the difference between TMS and XYZ/WMTS addressing of the same mercator tile.

See the detailed description and mashup I made at:

GDAL2Tiles renders always TMS.

The scripts and equations for conversion of the flipped y-coordinate are mentioned in the MapTiler User Group on Google Groups.

If you render the map tiles with the new MapTiler ( you can choose whether you want TMS or XYZ/WMTS addressing of the tiles. This option is available under the "Advanced options" button.

share|improve this answer

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.