Route calculation - TomTom v OSM
  • Route calculations are different with TomTom maps and OSM maps.

    Using exactly the same configurations, vehicle profile etc... , the route calculated with TomTom is quite logical. It draws the route between waypoints they expected and the same way as Google maps.

    With OSM the route calculation is quite unexpected and annoying. It will reach the waypoint then do a U-turn to follow the route it considers to be the logical one. 

    I can appreciate TomTom maps are better but it gets quite expensive keeping them up to date. 

    Is there anyway to improve the route algorithm and make it more like Google's or CoPilot's algorithm and be the same whether TomTom or OSM maps are used.

    Please see the screenshots attached. 

    image

    image

    image

    image

  • 22 Comments sorted by
  • Mine routes like tom tom if I set route to shortest otherwise it's the same as your osm route.
    Difference in distance tomtom way 11km. osm way 12km
    Difference in time tomtom way 11 mins osm way 8mins 49 secs.
  • probably incorrect speed attributes in OSM maps then
  • Is there anything it can be done to resolve this?

    Overall I am a bit disappointed the way Mapfactor calculates routes whether is an OSM or a TomTom map being used. To be honest lately I tend to compare the route presented against Google maps if is possible or use CoPilot which I might add I do not want to do. I am not confident that Mapfactor will give me the most logical route.

    Mapfactor is great for my planned routes, although there are quite a few  "conveniences" I would like to see added, but after planning the route and after numerous simulations I can force it to follow my way. Bit time consuming and tiring but at least will do it the way I want to.

       
  • may be it is due to your settings
    let me have coordinates for departure and destination and then we can check

  • This is a very quick example but unfortunately I cannot recall the ones that demonstrate the issue better ie showing different routes from Google but I hope this can be useful (but I am keep looking :-B )

    In this example you can see OSM behaving incorrectly when Fastest profile is chosen - in effect although the fasted profile was chosen the route presented is the shortest and slower. 

    Have a quick test and let me know whether you get the same results ( knowing my luck you will prove that is only happening to me :)  )

    Please refer to the Google map screenshot. 

    Departure UK = 52.0472464,-0.7048569 -- postcode MK10 9AB 
    Destination UK = 52.5687589,-0.3890602 -- postcode PE8 6LR 

    Google Route A = Fastest route 
    Google Route B = Shortest route
    ========================================================= 
    TEST 1 This is a quick example using the Default Car profile – all 50%. 

    Mapfactor results:- 

    OSM – Profile Fastest = route B shortest = wrong 
    OSM – Profile Shortest = route B shortest = correct 

    TomTom – Profile Fastest = route A Fastest = correct 
    TomTom – Profile Shortest = route B shortest = correct
    ==========================================================

    Many Thanks for looking into it

    image



  • What I make out of it is that I do not get the purple fastest route as the one shown on your osm.jpg.

    Your TomTom.jpg shows the same routes as my TomTom map results.
     
    On mine the Fastest OSM route is not the same as the TomTom Fastest, Google Fastest or as per your OSM file. 

    As you can see from the screenshots the TomTom routes are very similar to Google's. 

    The OSM Fastest and Shortest are very similar to each other. 

    I have done a fresh installation to one my devices and get the same OSM routes. Therefore my conclusion is that OSM fastest route is not right.

    OSM Shortest route
    image

    TomTom Shortest route
    image

    OSM Fastest Route
    image

    TomTom Fastest route
    image
  • A long answer as it needs some explanation: 

    I think this is purely to roads not being tagged in OSM whereas they are correctly tagged with max speeds inside TomTom.
    If you look at the calculations you see that Tomtom is 53 min 26 secs and OSM is 53 min 45 secs. I would declare that as equal. So OSM is calculating the fastest route as well. 
    In practice we all know that via the motorway on such a distance, the motorway has to be (much) faster.

    If roads are not tagged, and considered as 50 or 60 mph, you will simply not be able to come close to that speed on average, but MNF calculates your route given that average speed for that type of road, going through cities (without tagging) etc.

    As we like England very much I have driven quite some kilometers in England. In England the allowed normal max speed on non-urban roads is a speed that doesn't even come close to the average speeds you can achieve as the roads simply don't allow it.
    I have a "myCar" profile which I use in NL, BE, GE, Fr (non mountainous), DK and I have a "myCarUK" profile for England with reduced average speeds for all those roads where you are allowed to drive 50 or 60 but in general you sometimes have an average speed of only 25, 30 or 35 mph (touristic routes).
    I have driven on roads with 50 or 60 mph where two cars couldn't pass each other conveniently, curling away "sunken" between walls: no way you can ever drive 50 or 60 mph there!
    So please create an adapted car profile with more realistic average speeds. 
    I think your "believe" in MNF calculating the correct routes will increase.
    You might consider this as an omission of MNF providing only one too optimistic car profile, but MNF gives you the ability to create your own profiles.
  • that is not surprising, OSM have probably different speed attributes
  • I know such "surprise" routes as well (Android, OSM). In most cases I could accept route calculations from MFN.

    Only when I was in southern England some weeks ago, I wondered why the time actually needed for the trip from Brighton to Hastings was nearly double the time calculated at Brighton.

    Sometimes calculation is even erratic. When we were in Brighton, I just wanted to check the distance to Dover, where we had booked a ferry to France. MFN calculated 439 km (fourhundredthirtynine). When I wondered about this long distance, I found out, that our target (selected from the search list, when arriving in England) was inside the section of the ferry-terminal, where cars leave the ferries from France and drive onto the english roads (a kind of oneway). If you want to go there, you maybe really have to go to Newhaven, take a ferry to Dieppe (France) drive to Calais, take a ferry to England, leave the ferry at Dover and there you are. That was also MFN's calculation. It took me some minutes to understand, that I have to select another target at Dover (it is threehundred km less then) ...

    Edit:

    @hvdwolf When I had finished my post, I found your's before mine. Actually when driving in England a couple of days ago and finding, that MFN's (=MNF ;-) ) calculation was very optimistic, I remembered at that time, that you had posted here before already, that you have your specific british car profile. Since I was just four days in England, I was to lazy to do it on my own.
  • I don't think the difference in speed attributes between OSM and TT as such is the biggest problem.
    I think that the implementation of max speeds versus average speeds is not valid in some situations.
    In flat countries like the Netherlands the average speed compared to the allowed max speed is closer to each other then in countries like England where the max speed for a road is no guarantee for the average speed, or compared to France, Italy, Spain, switzerland with a lot of mountainous roads where you will again never be able to get the average speed as set in the profile.

    In other words: I don't think the speed attributes per road between OSM en TT are the biggest problem (like also discussed in other threads),but I do think you need different speed profiles per country or maybe terrain. Like what I did with my myCar and myCarUK profile.
    I have no idea whether TT also takes that in consideration when calculating routes.

  • But MFN did something on the maps recently.

    When I travelled to Dresden from Chemnitz on tuesday (approx. 80km) I found out, that my existing car profile calculated lots of time too much. So I switched to a new empty car profile based on MFN's preset settings and voilà, time was more realistic and also in reality I reached my goal more or less at the calculated time. Whereas earlier time calculation was way to optimistic using the "factory" settings.

    By the way: I changed at one point the route MFN had calculated for me (because I feel that on another road into Dresden trafic is more fluent than on MFN's calculated route; but how can MFN know, that my feeling is correct or not?). Anyway calculated time needed on both routes were not much different.

    So I feel MF had done something to map files, so they may be able to do something to British map files too?
  • Indeed hvdwolf, average speeds should be calculated.

    One way to do it would be to use the GPS traces uploaded to OSM.
    MapFactor already has an option to store traces, but:
    • it's not enabled by default
    • NMEA is presented before GPX, the latter being the one used by OSM
    • they are not uploaded automatically (by example when updating maps)
    The upload currently requires to have an OSM account and to be logged in.
    However, I think OSM would allow anonymous traces upload if MapFactor suggested it. Because it's the only way to get enough data.

    With enough GPX traces, it would be possible to calculate average speeds and even average speeds per day of the week and hour of the day.

    You can request the implementation of an API for anonymous traces upload here: https://trac.openstreetmap.org/
    The traces would just be tagged with the MapFactor name.
  • Actually, you can just register a MapFactor or something username on OSM and then use the API to upload the traces: http://wiki.openstreetmap.org/wiki/API_v0.6#Uploading_traces
    For the Visibility of GPS traces, you can use Identifiable since they'll be uploaded under the MapFactor username.
    Public and Private should not be used since they make the traces useless for the purpose of speed calculation.
  • All, I appreciate and understand you comments (apart from mapper's as they are too deep and complex for me .. :-/).

    I tested it on - OsmAnd, CoPilot, Google maps, RouteConverter, Waze, Mapfactor TomTom maps and all show the same fastest route (also Tomas's OSM http://directions.ltd.uk/~download/forum/osm.jpg shows the same fastest route).

    From a layman's position the odd one out here is Mapfactor with OSM maps.

    I am not sure but I think OsmAnd is using OSM maps as well but it generates the same route as the others... Are they the same maps as the ones used in Mapfactor?

  • Actually it are not OSM maps but OSM based maps. MNF, Navit, OsmAnd, Navmii and the others all have their own map buildup and structure based on the OSM database. Based on their own vectorial maps all apps use some sort of "shortest path" algorithm like the A* shortest path algorithm (most apps) or Dijkstra algorithm. Some are using contraction hierarchies like osrm.

    Most apps use the A* algorithm with some tweaking left and right (heuristic coefficient for example) and priorities for some type of roads; and penalties for crossings, traffic lights, traffic calming etc. (MNF doesn't use penalties; hence the bad route time calculations in cities).

    So yes: most should calculate the same route and most indeed do calculate the same route.
    I assume MNF also uses the A* algorithm "with some tweaking left and right", but I don't know as it is a closed app. 
    And I do not know exactly why MNF is, in this case, different from the other apps apart from the already mentioned reasons/arguments a few topics above.
  • To all contributors .. 
    Thank you all - very good comments and most importantly I found them very educational and interesting - its proven to me that my knowledge is minute compare to yours :-)

    For sure the MNF OSM is the odd one out and its a bit of a shame. The difference between OSM and TomTom routes can be too much as the example from yesterday.  

    Well, I guess I will carry on using TomTom maps most of the time (although a bit expensive to have the latest maps at all times) and hope it will be sorted out one day.

    Many Thanks to all

    TomTom fastest
    image

    OSM Fastest
    image

  • please try default car settings, I get the same route with OSM as you get with TomTom maps
  • @stavrich: Just like Tomas already mentioned: there is nothing wrong with MNF and OSM based maps. Something is completely wrong with your settings.

    Your first "fastest" route from Wansford (or something in that neighbourhood) to Tongwell str, Milton Keynes:
    In MNF with OSM based maps I do get the exact same route as your TomTom example.

    Your latest/last example from Chicheley Road, North Crawley to Silverstone circuit, Silverstone does again give me the exact same route as TomTom in MNF with OSM based maps.

    Please check your settings!! Or otherwise: remove your UK maps and download again to see if something corrupted your local copy.

    Edit: One exception: I have my motorway preference to 60%, always.
  • I also get the same as tom tom maps with MFN and the OSM maps (fastest route) A413 , A5 30mins. Road preferences all set to 51% or thereabouts.
     Would be nice to be able to input a numeric value instead of messing about with sliders.
  • Right! Definitely something wrong with my vehicle profile settings then. 

    Although I have created my own profiles I used the default Car profile (all 50%) on both TomTom and OSM test.

    As favour and before I re-install everything from scratch can you please try out my vehicle profile file and let me know.

    Ignore my Motorcycle profiles and use the default Car profile - Fastest mode

    On mine TomTom is 22mls  & 00:32:20 and OSM is 24mls & 00:31:08


    Many Thanks



  • yes, the sliders can be awkward. The car parameter file can be edited. Here is how I have done it. I copied vehicle_profiles.xml from phone to PC (make a backup copy, if you want..), then I opened it with Internet Explorer ==> select all, ==> copy. Then I opened a free text editor, EditPad Lite 7 ==> paste. I deleted the blank lines (it's a feature of EditPad Lite), I made a change just as a test and saved. I copied the new file to the phone, started MFN and everything is ok..

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion