Is that possible? I think the shorted path cannot go through the same node twice.
I check the code and is accepting self loops
public boolean accept(RoutingCHEdgeIteratorState edgeState) {
int base = edgeState.getBaseNode();
int adj = edgeState.getAdjNode();
// always accept virtual edges, see #288
if (base >= maxNodes || adj >= maxNodes)
return true;
// minor performance improvement: shortcuts in wrong direction are disconnected, so no need to exclude them
if (edgeState.isShortcut())
return true;
return graph.getLevel(base) <= graph.getLevel(adj);
}
Why not exist the condition: if(base == adj) return false; ?
At the junction the red arrow is pointing to it does a right turn, because turning left is forbidden there. It then does a ‘p-turn’ to arrive at the same junction again and go straight to arrive at the destination. CH will represent this entire entire turn (going from the junction at the red arrow back to the same junction) as by a single shortcut edge, which is a loop in the CH graph (because it goes from one node to the same node).
I’m guessing node 2081 is the one the arrow is pointing to. You can check this by enabling the MVT layer in the layers menu and hovering the adjacent edges.
It only works when you run the GraphHopper server yourself. But I’m assuming you do? Make sure it is enabled in your config.yml: There needs to be a line: web.mvt.enabled: true
The only way to disable it seems to be setting with_tiles to false in options.js, but you probably did not do this so I’m surprised the mvt option is missing in your layers menu.