Xtreme Route - .NET library for routing

I have developed a commercial library for routing, and thought I would inform you about it (in reality, this really is a shameless sales pitch) :wink:

Anyway, it works with OSM. Read more about it here: http://xtremeroute.com

/Magnus

Hello Magnus, welcome to the OpenStreetMap forum! I believe that announcing OSM-related software releases is perfectly acceptable, I’m always interested in hearing what others are developing.

Just out of curiosity: When you say “works with OSM”, does this mean that it could be used with OSM if someone converts OSM data into the formats used by your library, or do you already provide all software necessary for importing and routing on raw OSM data?

If the latter, which features of the OSM data model are supported by your library? In particular, does it support

  • access tagging on roads

  • turn restrictions

  • barrier nodes

  • any of the proposed models for access restrictions with conditions?

Hi, I am not very familiar with OSM, but I have tried importing a shapefile for highways that was in OSM format. I got that shapefile (and info) from the net somewhere, so I am not sure what version it was in. I only imported the road names, speeds, one-way info and the actual line geometries though.

Generally speaking, you configure an Import class and some optional classes to specify how the base data is to be imported (speeds, road names, one-way roads, etc), but there are also 32 bits that can be used for general purpose dynamic routing, which can be set when importing (or later) by the calling applications. The calling application can also override/modify the “Cost” method. Further, each Node and Link can contain generic user supplied data (object in .NET), which can be used for example when overriding the Cost method.

Read more abot it here: http://xtremeroute.com/#!products_path_route

So to sum it up, importing in Xtreme Route has preconfigured easy wasy to import base routing data, and more advanced features (like keeping some vehicles away from certain roads, turn restrictions, modify cost based on traffic stocking and much more) can be solved with the help of the library, but configured by the calling app (without changing the actual network ofcourse).

I know to little about OSM and the feature you mentioned to say for 100% that they are supported, I will get back to you on that!

/Magnus

Hi again, I had a look at the 4 points you mentioned.

Generally speaking, Xtreme Route is developed to give the tools to the calling application to solve specifics like the 4 points you mentioned. I feel this is the better way than to implement specific OSM features (or specific feature for other types of networks) in the library. The points you mentioned can all be solved pretty easily by what I call dynamic routing.

The 32bit dynamic routing I have mentioned is not that easy to explain, so here is a fictional example:
Assume we have these types of roads: 5 types of roads for normal vehicles (1 is highway, 5 is small road), bicycle roads, pedestrian, special roads for taxis, special roads for buses, special roads for emergency vehicles.

Now we set a 32bit value for each road in the network like this (a bitfield called class value):

  • 1-5 is for normal roads
  • 6 is for bicycle roads
  • 7 is for pedestrians
  • 8 is roads for taxi
  • 9 is roads for buses
  • 10 is roads for emergency vehicle

Before a route is calculated, a cost is assigned to each class value in a settings class. For example, a route for a taxi would have class values of zero for roads 1-5 and 8, and -1 (not allowed) for the other roads. The route for the taxi would then only use the roads a taxi is allowed to use. In a similar way, if we assume that road of type 5 can’t handle heavy traffic like a bus, a route for a bus would be 1-4 + 9, and a route for another heavy vehicle would be 1-4.

Further, each class value is a cost in themselves, and can be used to either multiply or add a value to the road cost. For example, a snowstorm might make roads 4-5 slower to travel on, so a multiplicative class value of 1.5 could be used to make them 50% slower.

Nodes can also have class values, for example a node with a traffic light might have an extra cost for all vehicles except emergency vehicles.

I hope this makes it more clear (its a pretty complicated feature in Xtreme Route, but very powerful).

/Magnus

Thank you for the detailed explanation. I have to admit that I imagined somewhat more OSM-specific capabilities or import tools based on your initial post, but your approach seems sensible for a dataset-neutral routing library.

Anyway, good luck with your project and company!

Yes, it is a general purpose library for routing and not specific for OSM. It can import OSM shape files directly though (road names, speed, one-way, road geometry), but if you want features like access restrictions and turn restrictions a little extra configuration code for the calling application is required.

By the way, I just downloaded a OSM highway shapefile from cloudmade, but that only contained basic data like road names, one way and geometry. Is there any OSM shapefiles that contains the more advanced features you mentioned above? I am thinking about putting together a OSM module (probably just as a free OpenSource C# file), to make it easier to use Xtreme Route with turn restrictions and access restrictions in OSM.

/Magnus

I don’t know whether such shapefiles exist. Programs that specialize in using OSM usually don’t read shapefiles, but use raw OSM XML data or one of the compressed variants. (To name one popular example, Navit includes a converter that can be used to process .osm or .osm.pbf files into Navit’s internal format.) This data is known as the “Planet”; current versions as well as regional extracts can be obtained from download sites such as Cloudemade’s and Geofabrik’s.

You might want to ask your question on help.openstreetmap.org. For straightforward questions, it usually produces better answers than this forum.

@Magnus: or consult the “Routing” OSM mailing list for more technical information:

http://wiki.openstreetmap.org/wiki/Mailing_lists

Thanks for your suggestions, I appreciate it and will look into it later (slightly to much to do right now) :slight_smile:

Thanks for sharing this! I could see how this could be extremely useful. I think something like this could be of great benefit to Long Distance Movers, as well as trucking and other types of transportation companies. I am actually going to check it out for my own personal use, it might be helpful when I go on vacation. I’ll be sure to update my post and let you know how it goes!