I’m using GH framework routing engine and it worked great for me until a task emerged to route monitoring complexes, that monitor only the right side of the street. By default GH builds a route like this for smaller streets
Hiya, within your setup you need to force curbside.
I’m on mobile so cannot share specific code.
This can be applied per route/point if you know your requirement before hand. I’ve only ever done between short routes of two.
You can also set turn costs to all vehicles to be unable to do uturns on a dime, so your example #2, they are then required to find a junction to complete a uturn.
Check in github for some use examples. Sorry can’t be more help at the moment.
Thanks a lot, Gregws!
It worked for me fine, though it was not that straightforward for a novice to find that I need
and then delete graphhopper folder contents, took some digging, still lacks documentation a bit ))
One more question: if, for some reason, I need to work with a profile with turn restrictions (i.e. edge-based), and a profile without them simultaneously, is it possible with one GraphHopper instance and one preparation set, or should I use two different instances & two folders with independent data sets?
Can’t get it work yet, need more help, sorry
First, I create an EncodingManager
then I’m trying to set up two profiles
then preparation (with clean folder, of course)
but if I call hopper.route() with .setProfile(“car1”) it gives me
The requested profile ‘car1’ does not exist.
Available profiles: [car2]]
Thanks again! You folks really help a lot! However, real-world testing revealed one more problem: sometimes I get points that are on the left side of the one-way street (while I’m applying .setCurbsides(Arrays.asList(“right”, “right”))). Of course, I get Impossible curbside constraint: ‘curbside=right’ at point 0 … To avoid it, I need some pre-check if this curbside is really applicable, is there any nice way to do it except for parsing res.getErrors()?