GitHunt
BD

bdon/cobble

A tool for rendering vector tiles to raster images with Mapnik

cobble

Render vector tiles to raster images with Mapnik.

Cobble serves raster tiles through an embedded HTTP server; with a given set of vector tiles:

cbbl serve dataset.mbtiles

There is a very basic Mapnik style in the debug directory. You can download packages of vector tiles based on fresh OpenStreetMap data at Protomaps Map Bundles. Make sure to choose the "mbtiles" output format.

Key features

  • Meta-tiles: tiles are rendered in batches; by default one vector tile is rendered as 4x4 raster tiles. This is necessary for label placement across tiles.
  • Pixel density: tiles can rendered at 72 dpi, @2x and @3x resolutions.

Use

Linux: libcairo-dev libtiff-dev libharfbuzz-dev

Build

  • Mapnik is expected to be an a sibling directory
  • Configure your mapnik build with ./configure FULL_LIB_PATH=False INPUT_PLUGINS='geojson,raster,shape,topojson' ENABLE_LOG=True

Alternatives

Other Stuff

Languages

C++77.0%Jinja13.9%Python5.7%CMake3.4%

Contributors

BSD 3-Clause "New" or "Revised" License
Created November 4, 2020
Updated February 9, 2025