Thanks for reporting! It seems that starting from segment Way: A6 (330495947) | OpenStreetMap the A6 is missing in the routing graph. I haven’t found any obvious tagging error, so this needs more investigation.
I’ve just had a quick look, and in the Croatia example there are two lift gates on the motorway, which could be triggering the roads to be marked as innaccessible…
and the same for the spanish example:
though i do not see anything similar on the south direction highway which does the same redirect
More details on the lift gates from the original example can be found in the GitHub issue.
The example from Spain is just another reincarnation of the same underlying issue: barriers with unspecified access are considered as blocked (here the lift gates 10902022990 and 10973705305). This behavior is actually different from how GraphHopper handles such cases: there barriers with undefined access are considered as passable. However, the latter approach has the disadvantage of occasionally suggesting illegal or impossible routes due to physically closed barriers. Consider the following example where it is not legal to drive a private car on a forest track, which is enforced with (closed) lift gates.
Thanks for debugging! Out of curiosity, is there a way advanced user can try to enable some debug see what segments are considered or missing in route graph (or do you need to install your own instance or something?)
About the lift gates… it could make sense, since that stretch has like a 2km tunnel and that can be closed if the tunnel is inaccesible for whatever reason… but it’s always open
Nope, unfortunately not… However, if a given road segment is present in the routing graph the start-/endpoints of a route will typically snap to it. Not being able to position these points on it is a strong indication that for whatever reason the road segment is excluded from routing.
Thank you @mnalis for correcting the tagging of barrier nodes in openstreetmap After your edit to OSM data the routing on the Croatian A6 motorway works now as expected