Skip to content

Instantly share code, notes, and snippets.

@handygeospatial
Created December 1, 2014 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save handygeospatial/23527856b95135988ee8 to your computer and use it in GitHub Desktop.
Save handygeospatial/23527856b95135988ee8 to your computer and use it in GitHub Desktop.
タイルの説明によく使う図(地理院タイル版) ref: http://qiita.com/handygeospatial/items/adbb7a15e3553fab5bd2
for z in 0..2
for x in 0...(2 ** z)
for y in 0...(2 ** z)
next if File.exist?("#{z}_#{x}_#{y}.png")
`wget -O #{z}_#{x}_#{y}.png http://cyberjapandata.gsi.go.jp/xyz/std/#{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 '/System/Library/Fonts/HelveticaNeue.dfont' -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