Different search radius for different profiles

I would like to have multiple profiles in my routing engine and use different point search radius for them. My scenario would be that “foot” would be normal walking with almost default parameters, but “hike” would use the network more freely and snap to the road network even if the queried point would be a bit further away from the network.

Based on this question the right way to change the radius which closest road segment seems to be to change the index.setMaxRegionSearch parameter.

Is this doable and if yes, can someone nudge me in the right direction?

This is not possible out of the box. But you can increase the max region search to some high value and then use a custom EdgeFilter used for the LocationIndex to limit the search on a per vehicle basis. To customize this you have to change some code in GH core or use the lower level API: https://github.com/graphhopper/graphhopper/blob/master/example/src/main/java/com/graphhopper/example/LowLevelAPIExample.java

Powered by Discourse