pescej / docker-mapbox-tools

Dockerized fontnik, spritezero, and tippecanoe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dockerized Mapbox Tools

Compiling Mapbox tools can be painful. Let's fix that.

Build the Docker image

docker build -t tobin/mapboxtools:latest .

Interactive shell

docker run -it -u `id -u $USER` --volume $(pwd):/data tobin/mapboxtools

tippecanoe

See mapbox/tippecanoe for documentation.

docker run -it -u `id -u $USER` --volume $(pwd):/data tobin/mapboxtools \
tippecanoe -zg -o greenways.mbtiles --drop-densest-as-needed greenways.geojson

fontnik

font.sh <input folder> <output folder>

The helper script scans the input folder for *.ttf fonts and places the font glyphs in the output folder.

docker run -it -u `id -u $USER` --volume $(pwd):/data tobin/mapboxtools \
font.sh fonts glyphs

spritezero

sprite.sh <input folder> <output folder>

The helper script scans *.svg in the input folder and places 1x and 2x sprites in the output folder.

docker run -it -u `id -u $USER` --volume $(pwd):/data tobin/mapboxtools \
sprite.sh svg sprites

Notes

  • The volume you mount should have write permissions set so Docker can put stuff there. I'd like to tell you I didn't chmod -R 777 * mine. But I did.

About

Dockerized fontnik, spritezero, and tippecanoe

License:MIT License


Languages

Language:JavaScript 47.3%Language:Dockerfile 35.7%Language:Shell 17.0%