Improper Handling of Cul-De-Sacs

I’ve just started testing out the Graphhopper Route Optimization API, and while it’s working well in general, I’m finding the same problem that I’ve encountered with other route optimization APIs which is poor handling of cul-de-sacs.

In the optimized result below, you can see the first stop is in a cul-de-sac, then the route takes the driver out of that cul-de-sac and into another one, before returning to the original cul-de-sac on stop #4. Most of my work with this API will be in Houston, where a lot of our residential neighborhoods look like this, so it’s a big issue if there’s not some way to get better results on these sort of problems. Anyone have any suggestions on this?

This is done as a single vehicle route, and is part of a larger turf of about 40 addresses. I did not put any configurations, no start or stop times, no vehicle types, no pickup/deliveries… just a very bare bones route call.

Thank you!


To minimize this issue we resulted in snapping the GPS coordinates to roadside.
We completed this in SQL to ensure the dataset is suitable for use for all address points.

I would be interested in understanding how to do this natively in graphhopper as well.

If you have the street names you can send us them in the street_hint property to improve the snapping. Otherwise GraphHopper will always snap to the closest road.

The tricky thing in your case is that sometimes (like for “Ambergris Ct”) the location could be reached by foot on a shortcut (i.e. it could also snap to “Kenswick Forest Ln”). This is not something we can solve right now but we are working on it.

This worked!

I re-cut that same piece of turf with the street hints and it looks great. Tip for others who need this - because the documentation was unclear - the street_hint property has to just be the street name - I initially tried populating with the address line (i.e. 1234 Main St) and that did not do anything. I had to strip out just the street name from my address to get this to work.

Ah, ok. Thanks for the feedback. Have updated the documentation.