abrensch / brouter

configurable OSM offline router with elevation awareness, Java + Android
MIT License
490 stars 118 forks source link

Projection of relation information to child ways - cross-country skiing, not cycleways #489

Open radim-asamm opened 1 year ago

radim-asamm commented 1 year ago

We have recently extended brouter capability by adding cross-country skiing profile. It was necessary to add key-value pairs into lookups.dat file in order to piste: tags being recognized. After new generation of tiles had been generated, routing works as expected in most cases - for properly tagged ways. What does not seem to work: Consider this relation: It is tagged as route=ski, piste:type=nordic, but none of the child ways are tagged as cross-coutry skiing related. I know there is a mechanism that "enriches ways with relation information" and looking into source code I got some basic idea how it works. But here for this relation this "projection" from parent relation to child ways does not seem to work. My wild guess (based on approach seen in OsmCutter.java, nextRelation()) is that the projection mechanism is somehow tightly coupled to cycleways. I must miss something. I would like to kindly ask for some guidance how to troubleshoot this issue. Thank you very much.

afischerdev commented 1 year ago

The lookups.dat next generation (see #458 and new file ) contains a route;0000000454 ski piste

Is that what you mean or do you need more?

radim-asamm commented 1 year ago

I am sorry for too early comment, I updated my issue / question.

radim-asamm commented 1 year ago

I think I understand now. A relation tagged route=ski gets encoded (plus ids of its child ways) into file relations.dat in OsmCutter.java, nextRelation(). All what is needed for this step is route; 0001 ski being present in my lookup file. Then in my lookup file I should introduce something similar to route_bicycle_;0000024662 yes - in my case route_ski_;0001 yes and also variants based on the actual usage of route=ski tag. Then the projection relation -> child ways should work. Also I need to include these new tags in my cross-country skiing profile. Hope this is a correct approach.

afischerdev commented 1 year ago

Please have a look here Route relation is build from route and network. So you may need more entries then routeski