mapbox / mapbox/vector-tile-spec
Encoding features that can be “merged” from multiple tiles
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 1k
- Forks
- 213
- PR merge metrics
- No merged PRs in 30d
Description
This issue really encompasses a cluster of related problems:
Inter-tile feature identity: when a single logical feature exists in multiple tiles, there’s no guaranteed way to know that its instances in different tiles are all manifestations of the same feature. An identity relation would be useful for, e.g.:
- Feature interactivity in Mapbox GL: highlighting a feature in one tile should highlight parts of the same feature in other tiles (See https://github.com/mapbox/mapbox-gl-js/issues/6019)
- De-duplicating features for analysis (e.g., with tile-reduce or Turf)
Clipping detection: features that span multiple tiles are almost always clipped to each tile’s bounds (with some buffer). Clipping may introduce new points in linestring or polygon geometries (e.g., to close an otherwise open polygon ring). There is no way for a points that are clipping artifacts to be distinguished from those that come from the original geometry. As a result, Mapbox GL currently needs tiles with linestring or polygon to use a buffer so that it does not, for example, render polygon outlines or line caps at tile boundaries. (Related: https://github.com/mapbox/vector-tile-spec/issues/6)
Geometry reconstitution: Even when the inter-tile identity problem is not an issue (e.g., features have unique ids), recovering the original geometry—or reassembling the subset of it that exists in the tiles you have—is a challenge: at each place where a geometry has been ‘cut’ at a tile boundary, we need a way to associate the corresponding points or segments from each tile’s portion of the geometry. (See also https://github.com/mapbox/vector-tile-spec/issues/8) Support for this in the spec would be useful for, e.g.:
- Placing labels along a line
- Rendering things like gradients along a line (https://github.com/mapbox/mapbox-gl-js/pull/6303), or inner glow/tint bands (https://github.com/mapbox/mapbox-gl-js/pull/6303)
These problems also introduce new inter-tile consistency concerns that haven’t been an issue in previous versions of the spec.
- Will this necessitate some sort of id uniqueness across an entire tileset?
- If individual tiles in a tileset may change, how can clients determine when two tiles’ contents are consistent?
cc @ericfischer @flippmoke @jfirebaugh @kkaefer
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the three problem areas in this issue alongside the linked Mapbox GL, vector-tile-spec, tile-reduce, and Turf discussions. A useful outcome would define whether the specification should address inter-tile identity, clipping detection, geometry reconstitution, and tile consistency, with agreement on the required scope.
Written by the indexing model from the issue text.
Assessment
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100