Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This tool lets you easily create or update vector tilesets on Mapbox from your CSV files using command line. It can be especially handy if you need to periodically update some vector tileset (e.g. every day updates). It is alternative for Mapbox Studio where you can do almost same things manually. Under the hood the tool is using Mapbox Python API, ogr2ogr and tippecanoe utilites. Just pass your CSV file with WKT geometries, specify some parameters and you are done. 

Installation

MapboxUtils is distributed as a Docker image so you need to have Docker platform installed. You can get Docker here

MapboxUtils is publicly available on Docker hub: https://hub.docker.com/r/clevermaps/mapbox-utils

Use following command to get the image:

Code Block
docker pull clevermaps/mapbox-utils:latest

Available parameters

...

--inputfile /workdir/countries_wkt.csv

...

--geomcolumn wkt

...

--tilesetmapid cleveranalytics.14j1fhp2

...

--tilesetname countries_wkt-02ssft

...

--layername countries_wkt

...

--minzoom 5

...

--maxzoom 15

...

fields

...

--fields "id:integer;name:string"

...

--mbtiles_params "drop-fraction-as-needed extend-zooms-if-still-dropping"

...

--mapboxtoken abcdefgah1234

...

Panel
panelIconId1f389
panelIcon:tada:
panelIconText🎉
bgColor#E3FCEF

The content you are trying to reach has been moved here: https://docs.

...

clevermaps.

...

io/

...

docs/

...

Running MapboxUtils

Create a new tileset without specifying tilesetname or layername

Code Block
docker run -t -v /home/user/clevermaps/mapbox-utils:/workdir clevermaps/mapbox-utils:latest --inputfile /workdir/countries_wkt.csv --geomcolumn wkt --minzoom 5 --maxzoom 15 --fields "id:integer;name:string" --mapboxtoken abcdefgah1234

Create a new tileset and specify tilesetname and layername

Code Block
docker run -t -v /home/user/clevermaps/mapbox-utils:/workdir clevermaps/mapbox-utils:latest --inputfile /workdir/countries_wkt.csv --geomcolumn wkt --minzoom 5 --maxzoom 15 --fields "id:integer;name:string" --mapboxtoken abcdefgah1234 --tilesetname countries_wkt --layername countries_wkt

Update existing tileset

Code Block
docker run -t -v /home/user/clevermaps/mapbox-utils:/workdir clevermaps/mapbox-utils:latest --inputfile /workdir/countries_wkt.csv --geomcolumn wkt --minzoom 5 --maxzoom 15 --fields "id:integer;name:string" --mapboxtoken abcdefgah1234 --tilesetmapid cleveranalytics.14j1fhp2 --tilesetname countries_wkt-02ssft --layername countries_wkt

mapboxutils-docker

We are proud to announce that we have launched a new documentation.

Please update your saved links and bookmarks to follow a new address docs.clevermaps.io.