shortbread-docs icon indicating copy to clipboard operation
shortbread-docs copied to clipboard

Handle route relations for roads

Open pnorman opened this issue 1 year ago • 8 comments

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.

pnorman avatar Mar 22 '24 21:03 pnorman

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

westnordost avatar Mar 30 '24 00:03 westnordost

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

pnorman avatar Mar 31 '24 01:03 pnorman

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.

1ec5 avatar Apr 03 '24 09:04 1ec5