mueschel / OsmDestinationSigns

Display of OSM destination signs
9 stars 6 forks source link

destination_sign relation not render correctly? #8

Closed Nekzuris closed 2 years ago

Nekzuris commented 2 years ago

Hi, there are 2 hiking routes that share the same way at first and the signs directions on this tool doesn't look right, maybe I'm missing something or the render should be improved.

image image

I think it should look like this: image

Links for you to check: https://www.openstreetmap.org/node/9135444003 https://osm.mueschelsoft.de/destinationsign/example/index.htm#node=9135444003

mueschel commented 2 years ago

Hi, the source of the problem is that there is no relation between the routes the way belongs to and the destination signs. I now added an additional case - if the destination:ref on the sign matches the ref of one of the routes the way belongs to, then only the symbol/name of this route is shown. If there is no match, then still all routes and symbols are shown.

Could you check if this works/fails/makes new problems?

Nekzuris commented 2 years ago

Thanks for the quick fix, works perfectly with destination:ref but I think you messed up the case when there is no match, no symbols are shown

Nekzuris commented 2 years ago

Actually after thinking about it, this might be the right thing to do, there are many sign that indicate a destination without any trail specifically leading to that destination, so it make sense for me to not show any symbol if there is no reference on the destination_sign relation

mueschel commented 2 years ago

but I think you messed up the case when there is no match, no symbols are shown

Right, should be fixed now. Actually this was more than one case that showed none or the wrong symbol.

Actually after thinking about it, this might be the right thing to do, there are many sign that indicate a destination without any trail specifically leading to that destination, so it make sense for me to not show any symbol if there is no reference on the destination_sign relation

I'm not sure what the best way is. I guess there is no universal solution. In the end, we're trying to show a destination sign that helps the traveler to find the right way. At the intersection, knowing the ref/symbol of the way might help, even if you can't follow this route to your final destination...

Nekzuris commented 2 years ago

Perfect, looks good to me now 👍

Also why did you render the text color over some sign ? image from this trails image

mueschel commented 2 years ago

That't not the text color, but "green_frame". "green_frame" is not a valid foreground, so according to the definition of osmc:symbol in the OSM Wiki it has to be text:

osmc:symbol=waycolor:background[:foreground][[:foreground2]:text:textcolor]

The implementation on waymarked trails uses a slightly less complex syntax:

osmc:symbol=waycolor:background:foreground[:text:textcolor]

So it's ignored and not printed. With my implementation, I guess this is what you're after? osmc:symbol = :green_frame:green:white_stripe:: image But it won't show any white in the other implementations available...

Nekzuris commented 2 years ago

Oh okay, I just copied the symbol from a nearby trails

this is the symbol, so I'll just remove the frame then image

and how would you tag the destination:ref for this sign? if I separate them with ; it expect 2 destinations and I shouldn't add "Fontaine de la Cour" twice? Should I just not specify the ref?

Nekzuris commented 2 years ago

What about this one? image

mueschel commented 2 years ago

These cases are complicated. I don't think we have a proper tagging scheme yet. The best possible option (not used yet) might be to have the destination relations as part of the route relations and take the symbols from there - but on the other hand, this doesn't tell us what is actually shown on the signs.

Nekzuris commented 2 years ago

Okay, that fine, I just tagged all 4 destinations without any ref for now