logo separator

R: [mkgmap-dev] [PATCH v4] - merge nodes to remove evil short arcs

From Marco Certelli marco_certelli at yahoo.it on Thu May 28 11:04:44 BST 2009

Hi Mark,

I tested the patch (V2) compiling Italy and I found that some problems are solved but others remain (maybe remain the ones coming form the exactly duplicated nodes, or some other "evil" configuration).

But I hope remaining problems will disappear with the pach correctring the utilization of right HASH. Unfortunately I cannot test both patches contemporary since I'd need the .jar of 1044 + evil arc patch...).

Anyway just a proposal for a V5: if it is feasible, instead of deleting arcs if lenght<3.5m, it whould be better to delete arcs 

if ((Utils.toMapUnits(latitude1)  == Utils.toMapUnits(latitude2)) &&
    (Utils.toMapUnits(longitude1) == Utils.toMapUnits(longitude2))) 

You would avoid to delete the arcs which ends will not really collapse in a single Garmin IMG point (you avoid the un-needed deletion of about 75% of arcs with respect to the simpler arc lenght test).

Ciao, Marco.


--- Gio 28/5/09, Mark Burton <markb at ordern.com> ha scritto:

> Da: Mark Burton <markb at ordern.com>
> Oggetto: [mkgmap-dev] [PATCH v4] - merge nodes to remove evil short arcs
> A: "Development list for mkgmap" <mkgmap-dev at lists.mkgmap.org.uk>
> Data: Giovedì 28 maggio 2009, 10:38
> 
> v4
> 
> based on r1044
> 
> ----------
> 
> v3
> 
> now requires the --remove-short-arcs option to enable this
> feature
> 
> now deletes consecutive identical points
> 
> ----------
> 
> v2
> 
> now reports OSM ids of merged/replaced nodes (at the cost
> of using more
> memory while the XML is being converted).
> 
> only does this stuff if route option enabled.
> 
> ----------
> 
> The attached patch is a first stab at a solution for this
> problem.
> 
> Please test.
> 
> It is implemented in an iterative fashion and it should
> terminate after
> a few passes. If 10 passes are executed it will give up,
> please report
> if you see it doing that.
> 
> It would be nice if the diagnostics reported the OSM id of
> the nodes
> rather than their coordinates but I haven't worked out the
> best way of
> achieving that yet. 
> 
> Cheers,
> 
> Mark
> 
> -----Segue allegato-----
> 
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


      



More information about the mkgmap-dev mailing list