buskerudbyen / cycling-norway

3 stars 2 forks source link

Add info about closed roads at winter #52

Closed Beck-berry closed 1 year ago

Beck-berry commented 1 year ago

From #25:

Closed road at winter. Can this only be visible during winter months? I.e. calendar from tags, or if not from November to February snowplowing=no and highway=* Extreme example, but saw that there are some with an Overpass run. https://www.openstreetmap.org/way/80561657 Same icon as over. ➡️ "Usikkert vinterføre. Anlegg er merket med at det ikke måkes om vinteren.".

Beck-berry commented 1 year ago

I looked for examples and I found three cases:

Overpass example

@tsobuskerudbyen Do you know any other we should cover?

tsobuskerudbyen commented 1 year ago

No other examples, no.

leonardehrenfried commented 1 year ago

@Beck-berry I tried out the code but I ran into a null pointer problem on the dataset of all of Norway.

The error I'm seeing is:

Jun 30 10:12:18 byvekstavtale build-map[664792]: [5.1K blob data]
Jun 30 10:12:18 byvekstavtale build-map[664792]:   what():  /srv/bicycle/process-openmaptiles.lua:430: attempt to compare nil with number

So I think there is some invalid data in Norway that we need to ignore (or take into account).

Until we reactivate this feature I have commented out the code in https://github.com/buskerudbyen/proposal-visualizer/commit/74c02495b7783ac5860b9c33c14ea99db9537f32

Beck-berry commented 1 year ago

Could we somehow figure out what came out as nil? In overpass I could not find any, which could cause the problem, thus I don't know what to handle :/

I added a commit to handle the nil: https://github.com/buskerudbyen/proposal-visualizer/commit/99c84dad35e70a0b7e9fcdbf62c90037ecce414d

leonardehrenfried commented 1 year ago

Ok, I'm currently trying out this fix. Thanks!

leonardehrenfried commented 1 year ago

Your commit has fixed the problem and the map build has completed. Thanks!