mapbox / mapbox/vector-tile-spec
Tile Continuity with Updating Tiles
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 1k
- Forks
- 213
- PR merge metrics
- No merged PRs in 30d
Description
## Problem
Tilesets are often viewed as static datasets, but over time it could be very possible to treat them as a dynamic datastore. This is already being done in some cases but there is always the possibility of clients downloading tiles at the time that they change. This can cause discontinuities between the same feature as it might have been edited or changed. In the past this was not as big of an issue as we were wanting to consider each tile as its own dataset, however, with the introduction of the possibility of tiles being required to know if they match their neighbor via possible additions such as https://github.com/mapbox/vector-tile-spec/issues/104 this may no longer be the case.
An example line from tile that was different from the other two tiles containing the same feature.

## Possible Solution 1
The simplest solution would be to simply have all features or layers to have a hash or version to make sure that all other tiles match that same version. However, this could make there be a requirement to update all tiles at once even if only one tile changed a feature. This is not ideal for high update rates of tilesets.
## Possible Solution 2
It would be possible to version the edges between tiles and encode this information within each tile. This could be encoded in each layer to know if the layer version matches the edge version of the tile next to it. This would be encoded in the layer as a set of 4 repeated integers, with each integer representing the edge's version in the order of Top, Right, Bottom, Left edges of the tile. This would be optional and if edge versioning was not required this would assume that no check is required or the tileset is not needing to update.
```
required uint64 version = 12;
```
The edge version would be incremented each time an edit is made to a feature, and would require that surrounding tiles also be updated with a new edge version to match (even if data was not changed in that tile). This means only the areas changed plus a 1 tile buffer would require version changes.
The version `0` is reserved in this model as it would signify that there is no layer's data in the tile next to it. This would be useful if a feature is dropped from a tile or if the edge is on a tile boundary.
## Conclusion
I would support the second solution much more then the first and there are other likely solutions to this problem. Thoughts?
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 vector-tile-spec issue and the linked vector-tile-spec issue 104 to understand how neighboring tiles may need to match. Compare the proposed feature or layer versioning approaches and identify the required specification changes; done means the project has selected and documented a concrete continuity model.
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