Data Sync

A simple interface to the Mapbox Tiling Service

What does this solution do?

Data Sync is a no-code tool to publish your GeoJSON data as vector tiles using the new Mapbox Tiling Service (MTS). This solution has the following functions

  • Converts your GeoJSON data into the required line-delimited GeoJSON format
  • Generates a basic recipe to get you started
  • Publishes the data with a single command, abstracting the series of API calls required to upload data, validate the recipe, and create and publish the tileset
  • Estimates the cost of running a tileset processing job before uploading your data

Data Sync can be used for single jobs, or for building automated data pipelines.

Version:
1
Last Updated:
October 21, 2020
Author:
Mapbox
Start building
Get started with MTS Data Sync today!

Solution Details

Data Sync is a NodeJS-based CLI. It automates all of the necessary processes for creating and maintaining a tileset with the Mapbox Tiling Service. Data Sync can be installed anywhere and provides the following commands:

  • config
  • sync
  • convert
  • estimate
  • token

Config

This is the initial step to the tiling process. It will create a line-delimited version of your GeoJSON, a config file, and a recipe. The information you provide in this step will be added to the configuration file for the sync process.

The initial recipe will need to be filled in prior to syncing. The repository contains a basic recipe and the MTS documentation contains multiple examples, along with the full recipe specification.

Sync

Once the configuration process is complete, the sync command will upload your data, validate your recipe, and monitor your tiling progress.

Convert

The convert command will accept new data and convert it into line-delimited geojson. Once complete, sync will update your tileset.

Utility Functions

Estimate

The estimate command will profile your dataset and calculate an estimated price based on tiled area and processing tier (based on max zoom). The command calculates the price in isolation and has no awareness of prior MTS usage or available discount tier.

Token

The token command enables token rotation.

Technical Information

Data Sync is available via GitHub. To use the solution you will need the following.

  • Current Mapbox account and tokens

    Public-scoped (pk) token for all API interactions.
    Secret-scoped (sk) token for Mapbox Tiling Service interactions. Read about token management here.
  • Node JS and npm

    Node can be installed from here. We recommend nvm to manage multiple Node versions.

Usage considerations

You will be consuming services from Mapbox. You are responsible for any associated costs.

  • Mapbox usage
    Data Sync publishes data to your account using the MTS. The Mapbox Tiling Service is billable, but there is also a generous free tier.For more pricing details, consult the Mapbox pricing documentation.

Ready to get started?

Create an account or talk to one of our experts.