mapbox/vector-tile-spec

Reconstructing Complete Features

Closed this issue · 3 comments

One essential use case that arises from having tiles is recreating a complete feature that spans many tiles.

Being that a given tile will clip a geometry, how do we know which paths are actually just clipping a feature as opposed to an actual path describing that features?

Also, how do we uniquely identify each feature so that we know that we can join it to geometries in other tiles?

@hallahan features have an id attribute. Whether it would be used to join pieces of features across tiles is something that a specification external to the .proto file should cover. See also @pramsey's comment in #5.

Partial responses are a feature of other protocols (HTTP, for example). Would giving features a "partial" attribute be the way to go?

@hallahan Currently, vector tiles don't contain any information on where and how a feature was clipped, or whether it was clipped at all. This information may be stored in future versions of this format. If you have any suggestions regarding this matter, please feel free to share them.

Apart from that, @sgillies mentions that you can assign arbitrary tags, or use the id field to uniquely identify features.

Also note that you don't have to clip features to store them in a vector tile. The boundaries of 0...extent (usually 4095) are no hard boundaries; the vector tile format can store features that have coordinates that are outside of the extent.

Polygon features can interact with a tile in four ways:

  • be completely outside a tile (easy to represent!)
  • be completely inside a tile (easy to represent!)
  • be partially inside a tile (is only the boundary of the polygon included, or are extra lines at the tile boundary added to "close" the polygon within the tile?)
  • completely contain a tile (is the boundary of the tile used to "close" the filled area? If so, how can a render know that the boundary should only be filled, but not stroked?)