Repository navigation
move bike route handling into custom models - #3226
Conversation
ratrun
left a comment
There was a problem hiding this comment.
Except for the questions in the file bike.json I don't have other comments
| // to use this custom model you need to set the following option in the config.yml | ||
| // graph.elevation.provider: srtm # enables elevation | ||
| // graph.encoded_values: bike_priority, bike_access, roundabout, bike_average_speed, bike_road_access, foot_road_access, average_slope, mtb_rating, hike_rating, country, road_class | ||
| // graph.encoded_values: bike_priority, bike_access, bike_network, roundabout, bike_average_speed, bike_road_access, foot_road_access, average_slope, mtb_rating, hike_rating, country, road_class |
There was a problem hiding this comment.
I just tested this branch with my existing config and am a little bit confused now: adding of the bike_network to graph.encoded_values in config.yml is actually not needed. You also didn't add it to config-example.yml. Can you please explain why this is not needed? As it is not needed, would it be possible to just don't add bike_network here?
There was a problem hiding this comment.
This is strange, when you remove it you should get "Encoded values missing: bike_network." as we do not add it by default here. Are you sure you didn't add it via java by default in your code and you are using the latest bike.json from this branch?
For config-example.yml, we have enabled only car by default, and therefore I did not add it there and only in the documentation of bike.json
There was a problem hiding this comment.
Are you sure you didn't add it via java by default in your code and you are using the latest bike.json from this branch?
I seem to have tested with a wrong branch. Now I need to add bike_network to the graph.encoded_values. 😌
For config-example.yml, we have enabled only car by default, and therefore I did not add it there and only in the documentation of bike.json
I would prefer to list all available encoded value strings in the example file as it is nowhere documented that the example strings only contain those which are applicable for car. It actually says
# Possible values: road_class,road_class_link,road_environment,max_speed,road_access
...
There was a problem hiding this comment.
Ok, sounds indeed simpler. Should we include all necessary encoded values for car.json, bike.json and foot.json in config-example.yml by default? (I would do this in a separate code change)
There was a problem hiding this comment.
Should we include all necessary encoded values for car.json, bike.json and foot.json in config-example.yml by default?
Yes please!
Reading your answer carefully I get the impression that you intend to remove the documentation in the various custom profile files. I see the need for both as there are two use-cases:
- If one just wants to use one of the example default profiles: Then I need to look up the needed encoded values in the respective json file and make sure to configure these in my config.yml
- If one wants to learn what is possible with encoded values I need a list of the available ones. The best location for this list is in the config-example.yml
I would do this in a separate code change
Definitely! Maybe you can somehow structure the available encoded values somehow as the list is becoming longer and longer and there is currently no obvious order. One order method would be alphabetically, but maybe you have better ideas.
…was picked, not multiplied)
This moves the bike route handling (
bike_network) out of the priority parser into the custom models, like we already do forhike_networkandhike.json.The advantage is a bit less code and also that we can apply higher values necessary for a situation like this route. In general this area is a nice real world case to tune "bike route" and "bike designated" relevance. E.g. this route uses the local bike network and this route the international and this route the "middle" way that has a good & separated & designated highway=path.
But not too heavy boost is required to avoid local routes with rather big incline.