Hello everyone, Please bear with me as I am completely new to maps and routing. The company I'm working for wants to determine routes for trucks. Primarily in the USA and have the ability to extend to the rest of the world. I've looked at OSM and it appears that the routing available is only for cars, walking and bicycling. Does anyone know if there's commercial truck routing data that we can use in conjunction with OSM maps? The desired behavior is to have a REST service in place that returns routes in response to requests. Thanks very much, Eugen asked 22 Apr '20, 21:46 eugen_nw |
To have routing for trucks you need three things: The data, the software, and someone who runs the software for you. The data is basically there in OpenStreetMap, though some restrictions that may be relevant to truck routing might be missing in OSM. Remember, the data is collected by volunteers, and perhaps not every volunteer will make it a priority to record bridge heights or maximum weight restrictions. The situation is slowly improving but as of today, commercial data might be more complete for truck routing than OSM is. The software is basically there as well; you can activate a truck routing profile in all popular OSM routing engines e.g. Graphhopper, OSRM, or Valhalla. They might differ in what attributes they look at in the OSM data, and if you are keen on doing stuff like routing for heavy or large vehicles where height or weight restrictions start playing a role, you might have to adapt the profiles to your needs. (That you don't find truck routing in available public offers e.g. on openstreetmap.org is mostly due to the fact that each additional routing type uses more resources, and the offers concentrate on frequent use cases.) Which brings us to the third issue, someone to run the server for you. Publicly available instances of OSM routing services are mostly for demo purposes or donation-financed offers for the community. They are not meant to be a free-of-charge resource that can be monetised by commercial users. For that reason alone - but also for reasons of flexibility and customisation - you will likely want to run your own instance of the routing software, which isn't a problem because both data and software are open and free to download and use. The alternative to doing it yourself is of course buying services, either from a commercial supplier of OSM-based routing services (most will use the same software listed above), or from someone who helps you set up the software for yourself. See https://wiki.openstreetmap.org/wiki/Commercial_OSM_Software_and_Services for an inoffical list maintainted by the suppliers themselves. answered 22 Apr '20, 22:16 Frederik Ramm ♦ Thanks very much for the info Frederik! The fact that the OSM data may not be complete enough for truck routing sounds scary. From what I've read there are more restrictions on trucks than tunnel/bridge heights and weight: https://www.developer.here.com/documentation/routing-api/dev_guide/topics/use-cases/truck-routing.html
(22 Apr '20, 23:07)
eugen_nw
"you might have to adapt the profiles to your needs": how do I do that please?
(22 Apr '20, 23:10)
eugen_nw
1
@eugen_nw, at least you know beforehand that OSM is not complete, but no map offering is complete (e.g. Google, TomTom and the like also have missing or wrong data).
(23 Apr '20, 04:37)
escada
Every routing engine has its own system to define routing profiles; some take configuration files in something that looks almost like a programming language, while for others you have write code in the actual programming language of the routing engine. In most cases you have to use the routing profile already during the data import step, because it can then find out which roads to omit entirely and how to preprocess the data. There are some routing engines - e.g. BRouter - that are so versatile that you can actually specify your routing profile when making a routing request instead of when loading the data, but the price for that flexibility is speed. -- This is the car profile for the OSRM routing engine: https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/car.lua someone has made a truck adaptation: https://github.com/Project-OSRM/osrm-profiles-contrib/tree/master/5/21/truck-soft -- In Graphhopper, the profiles are called "Flag Encoders" and they are here https://github.com/graphhopper/graphhopper/tree/master/core/src/main/java/com/graphhopper/routing/util; GraphHopper's paid service offers a ready-made truck profile but that seems not to be open source.
(23 Apr '20, 08:53)
Frederik Ramm ♦
|