Direkt zum Inhalt Direkt zur Navigation

Jan Torbens homepage

Sie sind hier: Startseite public stuff Merging OpenStreetMap tiles
Artikelaktionen

Merging OpenStreetMap tiles

erstellt von jtheuer zuletzt verändert: 27.08.2009 22:17

If you have tiles but want to print a large set of them, a screenshot of OpenStreetMap is not really a good idea. Instead use ImageMagick.

With the montage tool of ImageMagic you can just put the tiles together. The easiest way is to do it in two steps, first the cols, then the final picture. I did it, because OSM has the tiles in a directory like zoom/y/x.png. Here is the relevant code:

# for i in 173[67]? ; do montage $i/114[45]* -geometry 256x256 -tile 1x20 col$i.png ;done

# montage col*.png -geometry 256x5120 -tile 20x1 final.png
The magic is the 173[67]? and the 114[45]* expression. It defines which tiles should be in the final result. [67] means either 6 or 7. If you change the number of tiles, you have to adjust the -tile XxX parameter, too. Good luck.