Manage large data files for Mapbox Studio with Tippecanoe
If your data is large in size and exceeds the maximum upload limit, you may not be able to upload it to Mapbox Studio. This guide will show you how to use Tippecanoe, a command-line utility, to convert your data into smaller files suitable for uploading to Mapbox Studio.
Getting started
Before you begin, your data must be in the form of a GeoJSON file. There are many tools you can use to do this conversion — we recommend using ogr2ogr.
You will also need to install Tippecanoe. Please note that Tippecanoe is not supported on Windows.
Reducing the size of a large data file
The GeoJSON file in the example below (new-york_new-york_buildings.geojson
) is 761.5 MB in size. Since this exceeds the upload limit for a GeoJSON file, Tippecanoe will need to be used to reduce the size of this file.
Converting GeoJSON to vector tiles
Once Tippecanoe is installed, you can convert your GeoJSON file to MBTiles. In your command line, navigate to the directory that contains the GeoJSON file, and then run the following command:
tippecanoe -o nyc-buildings.mbtiles new-york_new-york_buildings.geojson
Where new-york_new-york_buildings.geojson
is the name of your GeoJSON file, and nyc-buildings.mbtiles
is the name you should give to the resulting MBTiles file.
Tippecanoe will then read and sort the features and convert them to the MBTiles data format. Tippecanoe has many other options, but you will stick to the command above for this guide.
The resulting MBTiles file will be saved in your current directory. You now have a new vector tileset that has a size of 4.7 Mb - dramatically less than the original GeoJSON file!
Next steps
Now that you've converted your GeoJSON file to a vector tileset, you can upload it to Mapbox Studio to use in a custom style. Read the Mapbox Studio Manual uploads section to learn more about uploading your custom data.
Once your data has been uploaded, take a look at the Mapbox Studio Manual style section for more information on styling line layers, fill layers, fill-extrusion layers, circle layers, and symbol layers in the Mapbox Studio style editor.