Routing across the 180th meridian?

I am working on an experiment where I add custom highways (which don’t exist in reality) to the OSM dataset. Some of which will go across the 180th meridian. I want to use your routing engine to calculate routes along this custom data.

So my general question is:
Does GraphHopper support routing for routes which ‘leave the world’ on the left side and continue on the right? Google Maps apparently doesn’t.

Screenshot: Route from one end of Fiji’s Tavenui Island (on the left end of world map) to the other end (on the right end of map) indicates that GraphHopper can’t.

This is not fully tested yet and could fail when roads cross the line, a simple workaround would be to split them. See also this issue.

BTW: do you mean the open source routing engine or the Routing API?
BTW2: If you meant you edited the public OSM data you really shouldn’t :slight_smile: and just use e.g. JOSM for local experiments

Thanks for the link. This is very interesting. I didn’t come across it when I was googling.
And thank you very much for the quick reply!

RE BTW: I am sorry, I meant the open source routing engine – I switched category to ‘core’ instead.
RE BTW2: Obviously I am editing only locally :wink: but thanks for the heads-up!

1 Like

So as the issue is a bit complex to read (even for me ;)), I think if you insert artificial, very small distant edges whereever you cross the line this should already work (see ‘Recommendation how to adjust your import’ in the issue).

You could even work without any changes of the data, and GH already should avoid feeding all crossboundary edges, but as these edges have a distance you can get slightly incorrect results.

Also there are no integration tests for routing (just lookup tests) and so it could still break somewhere.