Remove tertiary highways from preferred and increase speed on footways#3015
Conversation
|
I updated tests but not sure what to do with this one: https://github.com/graphhopper/graphhopper/blob/master/core/src/test/java/com/graphhopper/GraphHopperTest.java#L464 We probably need to find new example location? |
|
Thanks for this fix and the examples.
Can you import the test file into GH and show a screenshot of this route for master and your PR? I'm not yet sure if this is just cosmetics or if removing tertiary from preferHighwayTags has stronger consequences. |
|
@karussell profiles:
- name: bike
custom_model_files: [bike.json] |
|
This still looks like reasonable alternative. @ratrun isn't removing tertiary from the preferredTags a bit risky regarding other route choice? And should we test it more intense before merging? And if we do this, shouldn't it be done for all bike priority parsers for consistency reasons? |
I think that the only thing which might happen is that a
I think that you are right for the |
|
Yup, removing |
|
@ratrun @karussell How should I change test? Also, in test it returns 1 route (probably without any alternative). |
|
It is strange that it does not return an alternative in the integration test but returned one in maps (the screenshot you showed). It would be important to have some alternatives in this test - maybe you can achieve this by slightly moving e.g. the destination coordinate towards the other alternative? Or can you try maps again and use the config and file from the integration test? |
|
@karussell How should my profiles:
- name: bike
custom_model_files: [bike.json]EDIT: I tried this config which I guess it's what test is using: {
"priority": [
{ "if": "bike_access", "multiply_by": "bike_priority" },
{ "else": "", "multiply_by": "0" }
],
"speed": [
{ "if": "true", "limit_to": "bike_average_speed" }
]
}I also got alternative routes. I run it with: mvn clean install -DskipTests \
&& rm -rf graph-cache \
&& java -Xmx8g -Xms8g -Ddw.graphhopper.datareader.file=./core/files/north-bayreuth.osm.gz -jar web/target/graphhopper-web-*.jar server config-example.yml |
|
@caspg I could not find out what you are doing differently, but I cannot reproduce your screenshots about the alternatives. Here is my screenshot for the original code. It matches the test with 3 alternatives: I'm using the checked in With your branch there is no alternative found as indicated by the test, but by slightly changing the destination coordinates into Therefore my suggestion is to change the test into: |
|
@ratrun Thanks! I've just updated the test and PR is ready for review. |
|
Ok, thank you. Let's try this. |




Right now, GH preffers
tertiaryroads over footways withbicycle=yestags for bike profile.This leads to not opimial routing, especially when those footways are connecting cycleways.
@ratrun suggested that we should remove
tertiaryfrom preffered highways and bump speed in thefootway(only withbicycle=yes) #3014Example 1
Before:

After:

Example 2
Before:

After:
