I have another question.
Are ways with traildifficulty > 4 ignored in building the graph?
Also it seems that waytype ferrata is ignored in building the graphs too.
Is it possible to activate both when building the graph by editing the options?
trail difficulty is generated from the sac scale:
sac scales abov 4 are considered rather difficult:
It is not possible to activate them during the build process. The information is saved in the graph, but the logic to use them is defined in the flagencoders:
Thanks for the information.
I read all these issues and threads before, but did not get an answer to my question from these.
So if i edit the file HikingFlagEncoder.java
and add lines to get:
suitableSacScales.addAll(Arrays.asList( "hiking", "mountain_hiking", "demanding_mountain_hiking", "alpine_hiking", "demanding_alpine_hiking", "difficult_alpine_hiking", )); preferredWayTags.addAll(Arrays.asList( "track", "path", "footway", "via_ferrata" ));
Does routing work for me after restart the web app or do i have to build graphs again?
I have tried it now.
Changed the HikingFlagEncoder.java.
Start the Docker via Compose.
But does still not route demanding_alpine_hiking ways.
Can you approve this?
Could you add the request that you tried?
Did you try it with the correct profile (foot-hiking)?
Another approach would be to adjust this function:
to always return false.
Then you should come to the same result as adding the remaining sac scales.
I have changed this function to return always false.
But routing still does not work on Ways >T4.
The file was in: var/lib/docker/overlay2/af6fe7d1ae1c37cb72c21c673c77b11cd5fbf7d90fd6fb50c0b52d5f619e87b9/diff/ors-core/openrouteservice/src/main/java/org/heigit/ors/routing/graphhopper/extensions/flagencoders/FootFlagEncoder.java
Is this the right path for the file? It is the only file on my server with this name.
Can i debug somehow if the change is working?
as far as I’m aware, the docker container doesn’t rebuild the code on restarting with docker-compose -
docker-compose build --no-cache ors-app to make sure it rebuilds.
I’m also unsure whether the graphs have to be rebuilt when changing stuff in the encoders…
As for testing whether it’s working, I’d suggest logging something in the function in question - that should at least give you some feedback to whether you are running the code you should be running