Skip to content

Instantly share code, notes, and snippets.

@smellman
Created November 28, 2014 19:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save smellman/30fa094aa256e25489d9 to your computer and use it in GitHub Desktop.
Save smellman/30fa094aa256e25489d9 to your computer and use it in GitHub Desktop.
for z in 0..2
for x in 0...(2 ** z)
for y in 0...(2 ** z)
`wget -O #{z}_#{x}_#{y}.png http://a.tile.openstreetmap.org/#{z}/#{x}/#{y}.png`
end
end
end
for z in 0..2
files = []
for y in 0...(2 ** z)
for x in 0...(2 ** z)
`convert -font Osaka -pointsize 48 -gravity center -annotate 0 "(#{z},#{x},#{y})" #{z}_#{x}_#{y}.png with_txt_#{z}_#{x}_#{y}.png`
files << "with_txt_#{z}_#{x}_#{y}.png"
end
end
`montage #{files.join(' ')} -geometry +#{z+1}+#{z+1} conv_#{z}.png`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment