Is there an easy way to download a bunch of web map tiles (in /z/x/y.png format) and stitch them together into a single large image? I could probably script this using ImageMagick, but would prefer not to invent another wheel.

(The tiles in question are made by me in TileMill. I'm having serious problems with TileMill's export feature, and thought this might be a workaround.)

Mac or Linux only.

8 Answers 8


Ok, in the end this script did the job:

for x in `seq $X1 $X2`; do
for y in `seq $Y1 $Y2`; do
echo "Getting ${x},${y}"
curl -s http://localhost:20008/tile/SteveCountryVic/${Z}/${x}/${y}.png -o ${Z}_${y}_${x}.png &
montage -mode concatenate -tile "$((X2-X1+1))x" "${Z}_*.png" out_z${Z}_${X1}_${Y1}-${X2}_${Y2}.png

The only hassle is working out the values of X1,X2,Y1,Y2. Install imagemagick first:

sudo apt-get install imagemagick

Here's another option: https://github.com/ericfischer/tile-stitch

It's a simple command line tool where you specify the desired zoom level along with a bounding box or a center point w/ desired output dimensions in pixels.

The install instructions assume linux, but it compiled easily for me on OSX.


I have successfully used taho.exe for such things. You can learn more about it from here:


You can change the source URL manually to fit your needs; even local addresses with file:/// will do.

You can switch the language to English under Bearbeiten -> Optionen. An English help manual is included in the Docu folder.

The programme DYJtracks from the same author and the same download page is a bit more comfortable to get a single map, and works even without a gpx file. But I don't know if you can get it running under Linux using wine.


You could use a GDAL TMS minidriver and gdal_translate. There several examples explaining how to specifically configure the minidriver depending by how the tile service is made. Furthermore, here's a post (in Italian, sorry!) written by @aborruso which also answers to your question. Hope this helps!


This is what I did. No coding required.

I set the region using BigMap 2. http://bigmap.osmz.ru

Then I used Awesome Screenshot extension and set 'Capture Entire Page' https://chrome.google.com/webstore/detail/alelhddbbhepgpmgidjdcjakblofbmce

It might take awhile to capture the screen. It depends on how big your map is.

Finally, I save it to local file.

  • 1
    You can avoid using browser extensions if you download python or perl code (with the "Python" or "Perl" link) for selected tiles. If you selected less that 100 tiles, you can press "Queue" and receive a stitched image in a couple of minutes. May 14, 2014 at 15:12

This doesn't always work, but if you just have the tile images and no other information, you can feed them into Image Composite Editor and it will align and combine them (usually).


If you like Python solutions this tiny script may help: https://github.com/dmserebr/OsmTileMerger

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – Vince
    Jan 9, 2022 at 4:31

Please check out following links might be helpful for you.




  • 1
    Thanks. qbigmap: not enough doco for me to be able to build it or try out the binary. (Which "linux" does it target anyway? Is it GUI? Who knows?) Bigmap: can't use the online version, may play with code. modestmaps: not sure how I would use this to solve my problem. Oct 10, 2013 at 7:30

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.