OSM data to mapBox format

Viewed 9195

I saw several places where OSM data is converted to MVT (mapbox vector tiles) for simple rendering.

Those include:

  • OSRM which provides MVT based image of the route for rendering
  • OpenMapTiles which enables downloading of OSM maps in MVT format
  • GeoServer which can import OSM and export MVT

Is there a simple tool to convert OSM data to MVT locally?

I have my own data in OSM format that I want to convert to MVT and store locally, without rendering to a map image.

3 Answers

After some long time search, here is my conclusion at the very moment:

  • gdal should be useful with ogr2ogr cli tool converter. Theorically, it is able to convert from osm to mvt (geojson step should not be mandatory).

  • tippecanoe does a quiet equivalent thing, from geojson to mvt (ogr2ogr or osmium can help to convert from .osm to .geojson)

But the devil is in details: you need to be explicit on what data go on what mvt layer (water, roads, buildings, etc...). I've not found a convenient "all-in-one" tool able to convert osm building or building parts polygons and relations into mvt buildings layer, and so on... It looks like each team (mapbox and co) keeps it secretely behind API services with API key system.

Related