[GIS] Fast Offline OSM Routing Library to Replace MoNav (.NET)

openstreetmaprouting

I'm looking for a .NET replacement to MoNav. I'm currently calling a C++ MoNav DLL via COM and it works great–it's fast and memory efficient, and can both load itself and route across the country almost instantaneously. A pre-processed graph for a 5GB OSM file is only ~400MB, which is another plus as I do not need to distribute the source OSM files. However, the COM dependency is a slight issue with certain customers' setups. Its turn-by-turn directions leave a lot to be desired as well.

So I was wondering if anyone knows of a .NET replacement? One that preferably used Contraction Hierarchies, has a low memory footprint, and can reliably route across the United States in under a second. That may be asking a lot, I know.

My searches have only turned up OsmSharp thus far, and while it looked promising initially, in practice the load times were abysmal for even pre-processed CH graphs (though I am still playing with it and tweaking parameters to try and resolve this).

Just wanted to know if anyone knew of a suitable replacement before I attempt to write a C++/CLI wrapper for the original MoNav library and spend a few days (weeks?) on a better turn-by-turn system. So far I haven't found one.

Thanks!

Best Answer

Take a look at OSRM (Open Source Routing Machine). It uses contraction hierarchies, is VERY fast. It's written in C++ - but this is a small standalone server application. You could simply use a few network API calls and a JSON parser. So wouldn't add coupling to your C# application.