Manage large data files for Mapbox Studio with Tippecanoe
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.
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
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!
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.