[GIS] Alternative to Tippecanoe for generating Mapbox vector tiles on command-line

command linemapbox-gl-jsmbtilesvector-tiles

Tippecanoe is the tool I always use for converting Shapefiles/GeoJSONs to Mapbox vector tiles in PBF format, for rendering in Mapbox-GL-JS. But it doesn't seem ideal: its primary use case seems to be processing enormous point datasets such as tweets which means:

  • It focuses on points, not lines or polygons.
  • Many of its settings are focused on determining which features to drop.

There are other limitations in practice:

  • its processing of line and polygon features can be really ugly,
  • its "base zoom" model is not well explained, so that working through its dozens of configuration parameters is pretty hit and miss.
  • although it has some per-feature properties like maxzoom and minzoom it doesn't have a way to vary which properties are included per level
  • its functioning is pretty opaque, there's not much information generated about what choices were made at each level, how "heavy" the tiles are overall, etc.

So my question is: are there other ways to convert vector files to vector tiles that work better for polygons and lines?

Best Answer

Tippecanoe is designed for lines and polygons as well. Here's a recommended starting point for representing polygons at all zoom levels, with one property you want to aggregate at low (zoomed-out) levels when features are combined to keep tiles small and visually useful.

tippecanoe -o out.mbtiles -P --coalesce-smallest-as-needed --detect-shared-borders --extend-zooms-if-still-dropping -z12 --accumulate-attribute=my-attribute:sum|max|min|avg mydata.geojson
Related Question