LoginSignup
3
1

More than 5 years have passed since last update.

zero-server maps 日本語版

Last updated at Posted at 2016-08-12
1 / 9

zero-server maps

2018年のふつうのウェブ地図

  • gh-pages を使ってサーバ不要
  • mvttippecanoe で高速軽量
  • Tangram で素敵な可視化


データ作成

"ティピカヌー散開" : データ作成のプロセスの名前

tippecanoe を使い、MVTデータを展開して静的リソースにする。


ティピカヌー散開

  1. Shapefile をダウンロード
  2. ogr2ogr -f GeoJSON ...
  3. tippecanoe ...
  4. "散開"

ティピカヌー散開

ステップ 1. は /vt$/ なしの他レポジトリ (例 hfu/gmjp22vt は hfu/gmjp22vt) で
ステップ 2. と 3. は各レポジトリの __convert__.rb で
ステップ 4. は各レポジトリの __fan_out__.rb で


散開?

  • MVT ファイルをレポジトリに展開する
  • 次のスライドの Ruby スクリプトで。

__fan_out__.rb
#...
Dir.glob('*.mbtiles') {|fn|
  Sequel.sqlite(fn)[:tiles].each {|r|
    #...
    File.open("#{t}/#{z}/#{x}/#{y}.mvt", 'w') {|w|
      w.print Zlib::GzipReader.
        new(StringIO.new(data)).read
}}}

TODO

  • improve attribution (see LICENSE for the time being)
  • improve scene.yaml (need love for data)
  • work on more Global Map data
3
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1