メインコンテンツまでスキップ

Upload large source files to Mapbox Tiling Service

If you upload large amounts of source data to Mapbox Tiling Service, the process may take a long time to finish or even time out. However, there are a few strategies you can use to make the tileset source upload process shorter.

Tileset sources

When you create or replace a tileset source, the upload time for the source data depends partially on the file size. There are two strategies you can use to make the upload process shorter: split the file and skip validation.

Split the file

If the upload process takes a long time to finish or times out, you can split your source file into up to 10 smaller files and upload them individually.

Remember that the maximum combined size of all files that make up a single tileset source is 50 GB. If you need to increase your limit, contact us.

  • To create a new tileset source from a large source data file, split the source file into smaller files so that no file is larger than 5 GB. Issue a POST request with a single source data file to the tileset source, then append the other source data to the tileset source. For example, if you have a 45 GB file, write a script to issue 9 POST requests, each with a 5 GB file.
  • To replace the data in an existing tileset source, split the source file into smaller files so that no file is larger than 5 GB. Issue a request to the PUT endpoint with a single source data file. Then use the POST endpoint to append any additional files.

Skip validation

When you use the Tilesets CLI upload-source command to either create a new tileset source or replace the data in an existing tileset source, by default it validates the data by processing the entire file in memory before beginning the upload. For large files, this validation means the upload process may take a long time. You can use the --no-validation option to bypass this behavior, which will significantly decrease your upload time.

このpageは役に立ちましたか?