Support different zoom levels for different layers generated together
I need to generate a tileset containing three layers, boundaries at very different scales. I'd like them to have minzooms of 7, 9 and 11.
As far as I can tell, there are two ways I can do this:
- Pre-process the geojsons to add a
tippecanoeobject onto every feature with the minzoom/maxzoom I want, then process as normal. Downside: extra processing, and I'm not sure whatminzoomwill end up appearing in the tilejson for each layer. - Process each geojson individually into its own mbtiles file with zoom properties passed on the command line, then combine them using tile-join. Downside: extra processing, and it's harder to ensure that the total merged tile size doesn't exceed 500KB.
Ideally I'd be able to do this in one step, perhaps by passing extra flags to --named-layer:
tippecanoe --named-layer='{"file":"lowzoom.geojson","minzoom":7}' ...
Even more ideally, it'd be possible to set all the configuration options for each layer in a separate JSON file, rather than trying to jam JSON into parameters...
Hmm, yes, ultimately tippecanoe should probably support something like the Tilesets API's recipe format for tiling specifications, but you are right, --named-layer would be the right place for this currently. I'll think about whether there is any straightforward way to add this.
Tilesets API's recipe
just on that, I think it's worth adding a note somewhere in the README to point to the Tilesets API as an alternative to tippecanoe.
@stevage do you know a simple way to do "1. Pre-process the geojsons to add a tippecanoe object onto every feature with the minzoom/maxzoom I want, then process as normal. Downside: extra processing, and I'm not sure what minzoom will end up appearing in the tilejson for each layer.?" I am working with geojson file in python/geopandas, and have been trying to find a simple quick way to add the tippecanoe object to every feature.