mapbox / mapbox/tippecanoe

Split polygon interiors into their own layer

Open
#414 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
3.1k
Forks
430
PR merge metrics
No merged PRs in 30d

Description

It is hard to make polygons for entire countries or oceans with good detail on the coasts (to z13 or so) without also requiring the interiors to be represented by thousands of identical tiles that do nothing but cover the entire tile with a square.

I think the way to handle this is to provide a way to automatically split polygon layers into a detail layer and a fill layer.

At some particular zoom layer, say, 8, all the polygons whose interior contains one or more entire z8 tiles would have those interior tiles cut out into a separate layer. The remainder of the polygons would continue to be tiled down to the maxzoom, to provide coastal detail. The interiors would exist only at that one zoom level and would be overzoomed to fill in the polygon interiors at higher zooms. The division between the two layers would be in the tile buffer so the edge wouldn't be visible.

(When should the cutover be? The longer you put it off, the more area you cut out, reducing the ultimate number of detail tiles, but the more fill tiles you need to produce. It should be possible to calculate the optimal zoom level to switch over that will produce the smallest final tileset size.)

To be verified: can these be separate layers within the same tileset, or must they be entirely separate tilesets?

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. First determine whether interior and detail layers can coexist in one tileset, then evaluate the zoom-level cutover and tile-buffer behavior; done means a defined splitting strategy that reduces redundant interior tiles while preserving coastal detail.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.