Skip to content

Instantly share code, notes, and snippets.

@kudarisenmon
Created December 20, 2016 21:44
Show Gist options
  • Save kudarisenmon/ea3a8be674ef798ce5e77d8518d4ec1e to your computer and use it in GitHub Desktop.
Save kudarisenmon/ea3a8be674ef798ce5e77d8518d4ec1e to your computer and use it in GitHub Desktop.
OpenStreetMapをA0ポスター印刷するための大きな画像を作るスクリプト
#!/bin/bash
SERVER=(a b c)
x=115773
y=51995
rm -f *.png
xlist=''
for (( xx = ${x} ; xx < `expr ${x} + 27` ; xx++ )) {
list=''
for (( yy = ${y} ; yy < `expr ${y} + 37` ; yy++ )) {
wget -nv "https://${SERVER[`expr $yy % 3`]}.tile.openstreetmap.org/17/${xx}/${yy}.png";
list="$list ${yy}.png"
}
convert -append $list "a${xx}.png"
xlist="$xlist a${xx}.png"
rm -f $list
}
convert +append $xlist "a0map.png"
ls -lh a0map.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment