| Forum | GitHub | Maps | Blog

Cannot route correctly in Route Optimization


When I optimize using Route Optimization API, some addresses are not optimizing correctly.
When I test in Graphhopper Map also, it’s not working correctly.
I attached Graphhopper Map result and Google Map result.


It seems as though it cannot connect the destination (red marker) to the nearest road. Would you mind to post the coordinates of the red marker here? Thanks.

EDIT: Ah ok, if I zoom into the images, I can see the coordinates. We ll let you know as soon as we can give you more info.


The network on Juron Island is not connected to the main network at all (e.g. 1.280831,103.713684).

EDIT: It is obviously a data problem: (mapzen cant find it either)


it is due to the gate barrier:


I tried from 1.326998,103.800238 to 1.282351,103.715583 in Openstreet Map, route is shown almost Jurong Island. But in Graphhopper Map, the route is showing totally incorrect. How can I try to show nearest place although there is gate barrier.

Thanks for all replies.


We basically snap coordinates to the nearest road elements and so most routers do:

Let me find out how gate barriers are handled internally. For the time being, I can only suggest you to map all points on Juron Island to 1.310306,103.710122 like this


Thanks for reply

We are not targeting only Singapore for Rout Optimization, trying to route globally. So how can we handle this kind of issue? Is there any way to notify user?


I assume that this is a special case (usually very rare). Additionally, I think that it does not influence the results of the optimization that much. When it comes to notification, you will only be notified if a coordinate cannot be connected at all.


@myominlin If you have customers there or have local knowledge you can directly change the map data to e.g. explicitely allow motor vehicles going through the mentioned gate. The good thing is that we update our data quickly and so this will be fixed in 1-3 days instead of months compared to some alternative providers.


Thanks all for answering my question. Currently, I will just inform to users that location is not available for optimization.