November, 2022
Eric Ferraiuolo's avatar

Planet OSM to vector tiles

Prepared vector map tiles for whole planet

Task from client:

We are looking for someone who can set up a “TileServer GL” for us. We would like to use it to retrieve our data for a StreetMap editor we are recently working on.

During the discussion, the task was detailed

  1. Client needed vector tiles (in mapbox format .mbtiles)
  2. Clarified the data contained in the tiles and the zooms on which they appear
  3. Set up server for serving tiles into another client’s project

Which difficulties were solved: All OpenStreetMap data (Planet OSM) size is 66GB. The problem is, a lot of research has shown that almost all solutions for self generating tiles for a map server require hugely expensive hardware to complete (it’s not uncommon to see requirements for 64 cores and 128gb RAM!)

The solution is to split whole data to “water data” and “land data” and process it separately. Also split these data to parts and work with it sequentially. After that join parts into a single vector tiles database.

Result preview: image info

What is done:

  • Was prepared tiles from Planet OSM on not expensive server
  • Data was filtered and distributed by zoom levels
  • Setted up server for serving prepared tiles

Tools which used for tiles generation

  • osmium (filtration and splitting planet.osm.pdf)
  • tilemaker (tile generation via lua-config)
  • tippecanoe (join tiles into one database)

Tools which used for tile server

  • mbtileserver (fast server for vector tiles)
  • nginx + varnish (http server + cache layer)
  • docker (container for fast deploy)

Want a similar solution? Contact me