[PATCH v2] Fix Nuvi routing regression (rebloat Table A)

v2 - now does nothing more (or less) than revert commits 1228 and 1373. ------------ Way back in September, revision 1228 changed one of the routing data structures (Table A) to have one entry per road rather than one entry per arc (a road contains 1 or more arcs). This reduced the number of Table A entries required which made the maps smaller and, hopefully, improved the routing because the routing centres could be larger. However, I have been trying for some time now to find why the routing is partially broken on my Nuvi 255 for certain combinations of mkgmap version, extra patches and the options used when compiling the map. The same maps work fine (as far as I have tested them) on mapsource and the etrex. Not one routing failure occurred on those that could not be attributed to something else. So, after much dicking around with options, patches, etc., I think the Table A size reduction is the culprit. The attached patch essentially undoes the good work from September (although this code is simpler than what was there before). With this, the Nuvi barfs no more. The downside is that the map has grown again. Can't say whether the routing quality has changed. Rolled into this patch is another reversion. The value of MAX_ARC_LENGTH has been reverted to 75000. Never did believe that was the real solution. Please give it a go and report any findings. Mark PS - Marko, please try this and see if the routing problems you were experiencing still occur. Also, please try it on your Nuvi user and see if their problems go away. PPS - the one pleasing aspect of all this is that if it proves to be a sensible change, the node-reduction patch that I keep banging on about will see the light of day.

Hi Mark, On Thu, Nov 26, 2009 at 12:08:03AM +0000, Mark Burton wrote:
PS - Marko, please try this and see if the routing problems you were experiencing still occur. Also, please try it on your Nuvi user and see if their problems go away.
My Edge 705 calculates a 22.7 km route to Pasila railway station just fine, except that it now seems to favor smaller roads with more intersections. What do you think, would it be worthwhile to have some middle ground for Table A? Not one entry per arc nor one entry per way, but an entry per a configureable number or distance of arcs, perhaps? I will ask the Nüvi user to try out the same map. Marko

Hi Marko, Thanks for the report.
My Edge 705 calculates a 22.7 km route to Pasila railway station just fine, except that it now seems to favor smaller roads with more intersections. What do you think, would it be worthwhile to have some middle ground for Table A? Not one entry per arc nor one entry per way, but an entry per a configureable number or distance of arcs, perhaps?
Not sure about that but I do think that this warrants some more work to try and understand exactly what the constraint is. It's interesting that it doesn't appear to have any effect on mapsource (or the etrex, as far as I can tell). I don't favour making it configurable because then the map makers would need to say what units their maps are compatible with. Far simpler to take the hit on map size (and possibly routing performance) until we know what's really happening.
I will ask the Nüvi user to try out the same map.
Thanks, I reckon it will be OK for them now. Cheers, Mark

Hi Mark,
My Edge 705 calculates a 22.7 km route to Pasila railway station just fine, except that it now seems to favor smaller roads with more intersections. What do you think, would it be worthwhile to have some middle ground for Table A? Not one entry per arc nor one entry per way, but an entry per a configureable number or distance of arcs, perhaps?
Not sure about that but I do think that this warrants some more work to try and understand exactly what the constraint is. It's interesting that it doesn't appear to have any effect on mapsource (or the etrex, as far as I can tell). I don't favour making it configurable because then the map makers would need to say what units their maps are compatible with. Far simpler to take the hit on map size (and possibly routing performance) until we know what's really happening.
I did not really mean user-configurable but a compile-time parameter, similar to MAX_ARC_LENGTH. Marko

On Nov 26, 2009, at 1:08, Mark Burton wrote:
v2 - now does nothing more (or less) than revert commits 1228 and 1373.
I (casually) tested this patch on a Nuvi 255w today: I did not notice any harm done to the routing at least. Since I don't have a standard set of tests, I can't report if the patch has made any improvements. Cheers.

Hi Clinton,
I (casually) tested this patch on a Nuvi 255w today: I did not notice any harm done to the routing at least. Since I don't have a standard set of tests, I can't report if the patch has made any improvements.
Thanks for trying it. Unless any -ve reports appear in the next day or so, I think it's safe to commit. Cheers, Mark

Hi folks, Actually I'm working on a project for a little island. When I convert the .osm file in .img, I get a little road in the .img that doesn't appear on the .osm. I'm in trouble... Someone has an idea ? thx Steph. Mark Burton a écrit :
Hi Clinton,
I (casually) tested this patch on a Nuvi 255w today: I did not notice any harm done to the routing at least. Since I don't have a standard set of tests, I can't report if the patch has made any improvements.
Thanks for trying it. Unless any -ve reports appear in the next day or so, I think it's safe to commit.
Cheers,
Mark _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Stéphane
Actually I'm working on a project for a little island. When I convert the .osm file in .img, I get a little road in the .img that doesn't appear on the .osm. I'm in trouble... Someone has an idea ?
It might be a ghost road but we're not psychic, you need to tell us more. How about the OSM URL of the road and some info about the options you are using, etc. Cheers, Mark

Hi Stéphane
Actually I'm working on a project for a little island. When I convert the .osm file in .img, I get a little road in the .img that doesn't appear on the .osm. I'm in trouble... Someone has an idea ?
It might be a ghost road but we're not psychic, you need to tell us more. How about the OSM URL of the road and some info about the options you are using, etc.
Cheers,
Mark _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Thx for your reply Mark, The road doesn't appear in the .osm file, only in the .img. So I don't have everything more on it. Here are my command line : java -jar .\mkgmap\mkgmap.jar --gmapsupp --route .\map\mapTravail.osm Did I miss something? Steph

Hi Steph,
Thx for your reply Mark, The road doesn't appear in the .osm file, only in the .img. So I don't have everything more on it.
Yes, you do, tell us where it is. What are the OSM coodinates (permalink, OSM URL, whatever you care to call it.)
Here are my command line : java -jar .\mkgmap\mkgmap.jar --gmapsupp --route .\map\mapTravail.osm
OK, thanks.
Did I miss something?
Don't know yet. Cheers, Mark

Mark Burton a écrit :
Hi Steph,
Thx for your reply Mark, The road doesn't appear in the .osm file, only in the .img. So I don't have everything more on it.
Yes, you do, tell us where it is. What are the OSM coodinates (permalink, OSM URL, whatever you care to call it.)
Here are my command line : java -jar .\mkgmap\mkgmap.jar --gmapsupp --route .\map\mapTravail.osm
OK, thanks.
Did I miss something?
Don't know yet.
Cheers,
Mark _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Hi Mark, I've found what was going wrong. If it can help somenone... It was in the osm map, just a bug with JOSM, not with mkgmap : I think that the road has been created then deleted. So it doesn't apperar on JOSM but there still was some lines in the osm file : <way id='24552915' action='delete' timestamp='2008-05-26T14:10:17Z' user='encleadus' visible='true' version='1'> <nd ref='266966666' /> <nd ref='266967026' /> <tag k='highway' v='residential' /> </way> That was all... As I am a beginner with mkgmap, do you confirm that my command line is correct : java -jar .\mkgmap\mkgmap.jar --gmapsupp --route .\map\mapTravail.osm Thanks for your reactivity and your patience. ++

Stéphane ALLEMANDI wrote:
Mark Burton a écrit :
Hi Steph,
Thx for your reply Mark, The road doesn't appear in the .osm file, only in the .img. So I don't have everything more on it.
Yes, you do, tell us where it is. What are the OSM coodinates (permalink, OSM URL, whatever you care to call it.)
Here are my command line : java -jar .\mkgmap\mkgmap.jar --gmapsupp --route .\map\mapTravail.osm
OK, thanks.
Did I miss something?
Don't know yet.
Cheers,
Mark _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Hi Mark,
I've found what was going wrong. If it can help somenone... It was in the osm map, just a bug with JOSM, not with mkgmap : I think that the road has been created then deleted. So it doesn't apperar on JOSM but there still was some lines in the osm file :
<way id='24552915' action='delete' timestamp='2008-05-26T14:10:17Z' user='encleadus' visible='true' version='1'> <nd ref='266966666' /> <nd ref='266967026' /> <tag k='highway' v='residential' /> </way>
That was all...
As I am a beginner with mkgmap, do you confirm that my command line is correct : java -jar .\mkgmap\mkgmap.jar --gmapsupp --route .\map\mapTravail.osm
Thanks for your reactivity and your patience. ++ _______________________________________________
Velentijn Sessink mentioned this problem in a post on 21 July 09, but I think his solution will not help you because his patch was for the splitter, not mkgmap. If this is valid syntax, then I think mkgmap should not process the road. Your command-line is correct for test maps, but as you get things working you should start using other options so your maps have unique names and numbers. Observe the command lines used by others on this list when they post about problems, and read the documentation. This is just one example of a script file I used for a map I made. #!/bin/sh if [ "$1" != "" ]; then java -ea -jar ./mkgmap-1285/mkgmap.jar --mapname=55470011 --description=SouthAfrica --country-name=SouthAfrica --index --country-abbr=SA --family-id=5547 --family-name=SAfr --description=SA_RM --overview-mapname=55470010 --remove-short-arcs=5 --tdbfile --route "$1" else echo "Usage" echo "./buildsa.sh filename" fi Garvan
participants (5)
-
Clinton Gladstone
-
Garvan & maew
-
Mark Burton
-
Marko Mäkelä
-
Stéphane ALLEMANDI