andreynovikov / trekarta

Simple, responsive map for your trek. You decide how to journey today, not the application!
https://trekarta.info
GNU General Public License v3.0
174 stars 25 forks source link

Honor foot= flag in special cases #139

Closed andreynovikov closed 3 years ago

andreynovikov commented 3 years ago

https://www.openstreetmap.org/way/441558821 - should be rendered as not accessible for hiking https://www.openstreetmap.org/way/368777970 - should be rendered as path

hungerburg commented 3 years ago

There is the less known route relation, route=foot, e.g. https://www.openstreetmap.org/relation/11648589 - The wiki says, this is for shorter walks than route=hiking; For all that its worth, they are interchangeable. waymarked-trails does so. Worldwide, there are close to 50,000 acc. to taginfo.

hungerburg commented 3 years ago

As of now, it is still not fully working: There are paths with "access=private" that show available, and there are paths with "access=no;foot=yes" that do not show at all. I tried a lot, but I cannot get my head around the missing boolean operators in rendertheme. Perhaps it is easier, to unconditionally render without regard to access, and just change the backdrop (as a last step, or as a first step)?

hungerburg commented 3 years ago

Attached a patch, that tries to work it out with minimal intrusion; Looks ok-ish on the emulator. Will test it on the mobile now. Tracks still left to unmolested. Saves one level of intent in the style :)

Hiking-Forbidden.txt

Sample ways: https://www.openstreetmap.org/way/39496234 , https://www.openstreetmap.org/way/485746395

andreynovikov commented 3 years ago

Both render correctly for me. May be you have not applied all latest patches?

hungerburg commented 3 years ago

I made two screenshots, current master and my branch. I do not see the closed path in master (left).

Screenshot_Hochnissl-Master Screenshot_Hochnissl-roverdub

I will make line-caps not butt, that makes the overlapping segments too distinct. Should be decent, yet visible, so width=fix in hiking activity. Also shows enlarged ridge, that adds some noise to the area.

Update, grey lines for forbidden paths should have cap="butt", to not overlap

andreynovikov commented 3 years ago

It can be seen on left screenshot in fact. But I didn't emphasize it in hiking mode. Fixed it in https://github.com/andreynovikov/trekarta/commit/14e6d55395bb6d90dc75b9b0a7ced3ee97adc5ae

hungerburg commented 3 years ago

I wrote a comment there yesterday and sent a reworked suggestion, how to make them a bit less prominent, than they became with that change. Do they need a background line? Is it for the legend?

This also makes it apply to paths that have an access key only. As of now, these are missed by the rule.