Patch for better Autorouting

As announced yesterday - here is a patch against the default-style-file to heavily improve Autorouting for cars/motorcycles. Attached is a patch that should increase Autorouting distance without errors in Mapsource by 30-100% (distance as in number of turns). I am not sure how the maxspeed is currently handled in mkgmap code. In case that maxspeed can actually increase the road_speed, then it has to be used with --ignore maxspeed - Best would be if maxspeed (in case it is tagged) can only decrease road_speed, but not increase it - I am not sure whether this is current behaviour. This patch does blows up mapsize by up to 10% - depending how well mapped a country is (the better it is mapped, the smaller the increase). For Germany it is around 4% size increase. (only 3% if zipped by 7-zip). Using it I had no problems routing from South Spain to Northern Poland in Mapsource and several other as long distances, Map rendering time does not significantly increase. I additionally put add bicycle=no; add foot=no for trunk roads, as in 99% of cases you are not allowed to use them as a cyclist/foot (nor would you like to) - at least in Europe.

2009/12/1 Felix Hartmann <extremecarver@googlemail.com>:
As announced yesterday - here is a patch against the default-style-file to heavily improve Autorouting for cars/motorcycles.
So this patch, if I understand it correctly, creates duplicate ways at a higher resolution, but with a lower speed. Do you have any idea why this improves routing? Cheers.

On 01.12.2009 12:38, Clinton Gladstone wrote:
2009/12/1 Felix Hartmann<extremecarver@googlemail.com>:
As announced yesterday - here is a patch against the default-style-file to heavily improve Autorouting for cars/motorcycles.
So this patch, if I understand it correctly, creates duplicate ways at a higher resolution, but with a lower speed. Do you have any idea why this improves routing?
Yes because of the fuc**d up Turn time Restrictions AND Garmin GPS/Mapsource trying far too hard to avoid sharp turns at higher speeds (which is a good idea, but not well implemented). The resolution does not matter - I put it at 24 because there is no need for them to be visible, and routing only depends on resolution=24. This is a dirty hack, but the easiest to do, see below alternative solutions (wrote that in another thread here): "Actually I have found a method to increase routing distance in Mapsource by 30-100% -due to the functionality introduced yesterday, however it blows up the map size by at least 10%. Will test it a bit more, and then add a patch for mkgmap default style. Based on my findings, I think we would really have to use the dp filter already BEFORE doing anything to get smoother/straighter roads AND work on junctions. I'ld guesstimate the following increases in routing distance (each thing on it`s own): a) optimal - as discussed Junction Angle and creating additional (invisble via typfile) "turn roads" ~ 500% - Mapsize increase <5% b) "Modest" patch: Make a last 10m from each junction into any direction duplicate - decrease road_speed patch. >200% - Mapsize increase <5%, could even be used together with a) but will probably show no further improvements then. c)"dirty style-file patch" Add slower duplicate roads for primary/trunks/motorways/motorway_links. ~30-100%. - Drawback mapsize increase ~10%. The more duplicates, the better, but the mapsize increase will be even bigger. If either a) or b) is implemented this dirty hack will not be needed. However even in comparison with c) - all previous attempts to increase routing quality seem to be pretty basic and unnoticable.2
Cheers.

I changed some stuff to make routing a bit better. Anyone tried it out? On 01.12.2009 12:42, Felix Hartmann wrote:
On 01.12.2009 12:38, Clinton Gladstone wrote:
2009/12/1 Felix Hartmann<extremecarver@googlemail.com>:
As announced yesterday - here is a patch against the default-style-file to heavily improve Autorouting for cars/motorcycles. So this patch, if I understand it correctly, creates duplicate ways at a higher resolution, but with a lower speed. Do you have any idea why this improves routing? Yes because of the fuc**d up Turn time Restrictions AND Garmin GPS/Mapsource trying far too hard to avoid sharp turns at higher speeds (which is a good idea, but not well implemented). The resolution does not matter - I put it at 24 because there is no need for them to be visible, and routing only depends on resolution=24.
This is a dirty hack, but the easiest to do, see below alternative solutions (wrote that in another thread here):
"Actually I have found a method to increase routing distance in Mapsource by 30-100% -due to the functionality introduced yesterday, however it blows up the map size by at least 10%. Will test it a bit more, and then add a patch for mkgmap default style. Based on my findings, I think we would really have to use the dp filter already BEFORE doing anything to get smoother/straighter roads AND work on junctions. I'ld guesstimate the following increases in routing distance (each thing on it`s own):
a) optimal - as discussed Junction Angle and creating additional (invisble via typfile) "turn roads" ~ 500% - Mapsize increase <5%
b) "Modest" patch: Make a last 10m from each junction into any direction duplicate - decrease road_speed patch. >200% - Mapsize increase <5%, could even be used together with a) but will probably show no further improvements then.
c)"dirty style-file patch" Add slower duplicate roads for primary/trunks/motorways/motorway_links. ~30-100%. - Drawback mapsize increase ~10%. The more duplicates, the better, but the mapsize increase will be even bigger. If either a) or b) is implemented this dirty hack will not be needed.
However even in comparison with c) - all previous attempts to increase routing quality seem to be pretty basic and unnoticable.2
Cheers.

On Dec 2, 2009, at 0:45, Felix Hartmann wrote:
I changed some stuff to make routing a bit better. Anyone tried it out?
I tried the original patch, but found sadly (using Roadtrip on the Mac) that routing actually got worse. This was for a map of Germany. The directions were particularly unusual: on one ramp for onto the A7, I received the routing direction "Keep right on ramp" about 7 times. This may be because I use the DP filter set to 10, and the merge nodes options. Cheers.

On 02.12.2009 13:08, Clinton Gladstone wrote:
On Dec 2, 2009, at 0:45, Felix Hartmann wrote:
I changed some stuff to make routing a bit better. Anyone tried it out?
I tried the original patch, but found sadly (using Roadtrip on the Mac) that routing actually got worse. This was for a map of Germany. The directions were particularly unusual: on one ramp for onto the A7, I received the routing direction "Keep right on ramp" about 7 times.
This may be because I use the DP filter set to 10, and the merge nodes options.
Cheers. Well for Mapsource I also had no real improvement (somtimes a bit shorter, sometimes a bit more highways/big streets). But on my Vista HCx routing over very long distances really improved. On a Nuvi I tried I had no more routing errors no matter where in Europe I tried to route to. I think Mapsource/Roadtrip mainly suffer from inter tile routing problems, while routing over tile boarders on the GPS makes no difference. I also noted the "keep on .. ramp" things, I don't really understand why this happens here, with my mtb maps I don't have this problem.
I'm not using the merge-nodes option, never improved routing for me, only made it worse (both in Mapsource and on GPS).
participants (2)
-
Clinton Gladstone
-
Felix Hartmann