[Talk-us] Highway ref on way or relation?

Brian M. Sperlongano zelonewolf at gmail.com
Tue Jul 5 20:55:34 UTC 2022


Yes, Clay has it right that both are needed, but to be more specific:

On ways, both the network and ref of all concurrent routes are packed into
the ref tag.  So you could have something like:
ref=I-35;US-80;SR-25

That fictional road would be a member of three separate route relations
that look something like:
network=US:I
ref=35

network=US:US
ref=80

network=US:TX:SR
ref=25

This allows route-aware renderers (like OSM Americana as noted by Clay) to
render rich route detail such as highway shields, while still allowing the
older, simpler route rendering approach, as used in OSM Carto, to still
function.

On Tue, Jul 5, 2022 at 7:31 AM Clay Smalley <claysmalley at gmail.com> wrote:

> On Tue, Jul 5, 2022 at 6:31 AM Eric H. Christensen via Talk-us <
> talk-us at openstreetmap.org> wrote:
>
>> It appears that the rendering engine for OSM.org is not looking at ref
>> tags in the relations at all and only what is set on the way.  Is this
>> expected behavior?
>
>
> Yes. OpenStreetMap-Carto, the "Standard" map style on the OSM website,
> only processes ref tags on ways and ignores relations.
>
> OpenStreetMap-Americana [1] [2] is a work in progress that processes ref
> tags on relations instead.
>
>
>> The wiki seems to suggest[0] that multiple refs should be maintained
>> using relations.  What am I missing here?
>>
>
> Relations are the best way to model multiple overlapping routes, though
> many renderers ignore them in favor of displaying the ref tag from the way.
> So as long as different renderers are using refs from both the relation and
> the way, we have to maintain both.
>
> [1] https://github.com/ZeLonewolf/openstreetmap-americana
> [2] https://zelonewolf.github.io/openstreetmap-americana/
> _______________________________________________
> Talk-us mailing list
> Talk-us at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/talk-us
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-us/attachments/20220705/6c0fee1d/attachment-0001.htm>


More information about the Talk-us mailing list