Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

関東のベクトルタイルデータ生成 #1

Open
ShogoHirasawa opened this issue May 11, 2022 · 5 comments
Open

関東のベクトルタイルデータ生成 #1

ShogoHirasawa opened this issue May 11, 2022 · 5 comments
Assignees

Comments

@ShogoHirasawa
Copy link
Member

ShogoHirasawa commented May 11, 2022

参考資料

これを参考にOSMのベクトルタイルデータを生成していく

@ShogoHirasawa
Copy link
Member Author

Tilemakerインストール

このreadme.mdを参考に以下のコマンド実行

brew install protobuf boost lua51 shapelib rapidjson

5分くらいインストールに時間かかった。
インストール後に以下の表示が出たので、指示どうり追加インストール。
スクリーンショット 2022-05-11 17 11 14

とりあえずうまくいってそう
スクリーンショット 2022-05-11 17 12 26

次に以下のコマンド実行

make
sudo make install

エラー発生
スクリーンショット 2022-05-11 17 15 14

@ShogoHirasawa
Copy link
Member Author

ShogoHirasawa commented May 11, 2022

Tilemakerインストール2

このサイトを参考に再度挑戦

アクセス権がないからクローンできないという表示がでた。
スクリーンショット 2022-05-12 11 59 25

調べると、アクセスするためにはSSH Keysが必要っぽい。
このQiitaの記事を参考にSSH Keysを発行してみる。

以下のコマンドを実行

ssh-keygen -t rsa -b 4096 -C [email protected]

スクリーンショット 2022-05-12 12 03 25

スクリーンショット 2022-05-12 12 05 00

id_rsa.pub に保存されている公開鍵をGitHubに登録。

再度以下のコマンド入力

git clone [email protected]:systemed/tilemaker.git

無事クローン成功
スクリーンショット 2022-05-12 12 11 32

スクリーンショット 2022-05-12 12 12 32

@ShogoHirasawa ShogoHirasawa self-assigned this May 11, 2022
@ShogoHirasawa
Copy link
Member Author

Tilemakerで MBTilesを生成

先程クローンしたtilemakerに前もってダウンロードした、OSMの関東地方のデータを格納
スクリーンショット 2022-05-12 12 18 00

以下のコマンドを実行

tilemaker --input kanto-latest.osm.pbf --output kanto-latest.osm.mbtiles

tilemakerっていうコマンドは無いよって言われた。
クローンしただけだから、コマンド自体は入ってはいない模様。
スクリーンショット 2022-05-12 12 19 46

Tilemakerの公式GitHubを参照して以下のtilemakerのディレクトリー上で以下のコマンドを実施。
スクリーンショット 2022-05-12 12 24 19
おそらくうまくいった....。
スクリーンショット 2022-05-12 12 25 51

再度、以下のコマンド実行

tilemaker --input kanto-latest.osm.pbf --output kanto-latest.osm.mbtiles

無事MBTiles完成
スクリーンショット 2022-05-12 12 27 56

@ShogoHirasawa
Copy link
Member Author

MBTilesをtippecanoeを用いてpbfに変換

以下のコマンド実行

git clone [email protected]:mapbox/tippecanoe.git

クローン完了
スクリーンショット 2022-05-12 13 03 24

クローン後以下のコマンド実行

cd tippecanoe
make tippecanoe

おそらく成功
スクリーンショット 2022-05-12 13 05 53

以下のコマンド実行

tile-join --force --no-tile-compression --no-tile-size-limit --no-tile-stats --output-to-directory=/Users/shogohirasawa/Desktop/tilemaker/kanto-latest.osm.mbtiles

エラー発生
スクリーンショット 2022-05-12 13 18 50

@ShogoHirasawa
Copy link
Member Author

再度、クローンからやり直した。
その後、クローンしたtippecanoe内で以下のコマンドを実行

make tippecanoe

そのあと、以下のコマンドを実行

tile-join --force --no-tile-compression --no-tile-size-limit --no-tile-stats --output-to-directory=hoge /Users/shogohirasawa/Desktop/tilemaker/kanto-latest.osm.mbtiles 

フォルダ名をhogeからkanto-latest.osmに変更。無事に成功した
スクリーンショット 2022-05-18 12 42 17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant