[PATCH v1] - extend --replace-short-arcs option to take min arc length

As promised, here's a patch that will let you specify a min arc length like this --replace-short-arcs=3.5. If you don't specify a length, it will only remove zero-length arcs (as it does now). Cheers, Mark

Did this work for you on the example road? I tried it and it would not work for me. Road is still broken. I notice that on 0 I have the same filesizes as before - so nothing is broken. Increasing from 0- 6m filesize gets bigger, but nevertheless the street is missing 3m, attached a screenshot from gpsmapedit (don't mind the shopping symbol, that is 0x2f0f which I use for road-name-pois). Actually whether I specify 3 or 6 does not matter for austria.osm.bz2, filesize stays identiacal. Felix Mark Burton wrote:
As promised, here's a patch that will let you specify a min arc length like this --replace-short-arcs=3.5. If you don't specify a length, it will only remove zero-length arcs (as it does now).
Cheers,
Mark
------------------------------------------------------------------------
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Felix,
Did this work for you on the example road?
Yes, the small way gets zapped: 2009/06/04 13:08:43 INFO (Osm5XmlHandler): Way Thomas-Tamussino-Straße (OSM id 27174349) has short arc (2.87m) - removing it by merging node 371185471 into 286059582
I tried it and it would not work for me. Road is still broken.
I notice that on 0 I have the same filesizes as before - so nothing is broken. Increasing from 0- 6m filesize gets bigger, but nevertheless the street is missing 3m, attached a screenshot from gpsmapedit (don't mind the shopping symbol, that is 0x2f0f which I use for road-name-pois). Actually whether I specify 3 or 6 does not matter for austria.osm.bz2, filesize stays identiacal.
I attach a screenshot of what I get with gpsmapedit. Cheers, Mark

Shame on me, I had in my batch the call for the unpatched mkgmap version, which of course did not. What can I say about the patch? Get it into TRUNK!!!! Finally Routing over longer distances IS possible. Route calculation time decreased in mapsource by up to 50%, and possible route length increased about 20-25%. Also no single Mapsource Crash since!!!!!!!!!!!!! At least in Austria where because of the import, many roads are not connected, this patch is absolutely essential! On my Vista HCx also many destinations that previously took 2-3 minutes to calculate just calculated only 20-30 seconds! Maybe don't enable it by default, I have not really tested whether now there are any problems with roads connected that should not be connected, but so far it has been working great! Mark Burton wrote:
Hi Felix,
Did this work for you on the example road?
Yes, the small way gets zapped:
2009/06/04 13:08:43 INFO (Osm5XmlHandler): Way Thomas-Tamussino-Straße (OSM id 27174349) has short arc (2.87m) - removing it by merging node 371185471 into 286059582
I tried it and it would not work for me. Road is still broken.
I notice that on 0 I have the same filesizes as before - so nothing is broken. Increasing from 0- 6m filesize gets bigger, but nevertheless the street is missing 3m, attached a screenshot from gpsmapedit (don't mind the shopping symbol, that is 0x2f0f which I use for road-name-pois). Actually whether I specify 3 or 6 does not matter for austria.osm.bz2, filesize stays identiacal.
I attach a screenshot of what I get with gpsmapedit.
Cheers,
Mark
------------------------------------------------------------------------
------------------------------------------------------------------------
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Felix,
Shame on me, I had in my batch the call for the unpatched mkgmap version, which of course did not.
OK.
What can I say about the patch? Get it into TRUNK!!!!
I will commit it soon as it won't affect the default operation.
Finally Routing over longer distances IS possible. Route calculation time decreased in mapsource by up to 50%, and possible route length increased about 20-25%. Also no single Mapsource Crash since!!!!!!!!!!!!!
Good.
At least in Austria where because of the import, many roads are not connected, this patch is absolutely essential!
The patch only merges nodes that are close and already connected. It doesn't merge nodes that are close and not connected.
On my Vista HCx also many destinations that previously took 2-3 minutes to calculate just calculated only 20-30 seconds!
Great.
Maybe don't enable it by default, I have not really tested whether now there are any problems with roads connected that should not be connected, but so far it has been working great!
I will commit something that has the same effect as the patch you have tried. Cheers, Mark
participants (2)
-
Felix Hartmann
-
Mark Burton