shortbread-tiles / shortbread-docs

Documentation of the Shortbread vector tile schema
https://shortbread-tiles.org
Creative Commons Zero v1.0 Universal
28 stars 6 forks source link

Handle route relations for roads #49

Open pnorman opened 8 months ago

pnorman commented 8 months ago

Highway refs are often indicated by route relations, so we need to support them.

One relation may be part of multiple road route relations, each of which has a ref and network tag. They also might be part of no road route relations and have a ref tag. I don't think we need to handle the third case of a ref tag plus refs from relations any different than the first tag.

westnordost commented 8 months ago

Bake the refs of the route relations onto the roads, right?

pnorman commented 8 months ago

Yes, we need the line strings to have appropriate properties. The difficult part is handling multiple relations.

1ec5 commented 8 months ago

Route relations intentionally provide more structure than way refs, so the two mechanisms aren’t quite equivalent – the structure should persist in the tile’s features to some extent, or it would defeat the purpose of route relations. openmaptiles/openmaptiles#1620 adopts a predictable route_#_key format for properties dissolved from route relations, allowing clients to process each value without resorting to any parsing.[^semicolon]

If you need to cap the maximum number of concurrent routes along a given way for performance reasons, here are some statistics to help you arrive at a practical limit: https://github.com/ZeLonewolf/openstreetmap-americana/issues/894#issuecomment-1765395845 https://github.com/ZeLonewolf/openstreetmap-americana/issues/894#issuecomment-1888362411.

[^semicolon]: This would also be a sound server-side solution to the problem of pretty-printing semicolon-delimited value lists.