mapbox / mapbox/tippecanoe

Support different zoom levels for different layers generated together

Open
#832 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
3.1k
Forks
430
PR merge metrics
No merged PRs in 30d

Description

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:

  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.
  2. 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...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the --named-layer entry point and how tile-join handles layer zoom metadata; verify current behavior with the three-layer GeoJSON scenario described. Done means a single generation workflow accepts per-layer zoom settings and reports correct layer metadata without losing the merged tile-size constraint.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, json
Domain
cli, data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.