Hi all,

during the last days I've tried to find a better algo for the WrongAngleFixer 
(WAF)
The WAF tries to fix problems caused by the rounding of 32 bit OSM coordinates 
to 24 bit Garmin coordinates.
Sometimes it removes points, sometimes it moves them to another Garmin point so 
that zig-zagging is reduced
and round ways look rounder and straight ways look straigther. 
I've found several places where the current code in trunk doesn't find the best 
compromise, esp.
at small roundabouts with flare roads. Unfortunately it is often impossible to 
render them as circular ways in 
24 bit resolution, so don't expect miracles. 
See also svn log [1].

Please test r4135 in the branch, you can download it here:
http://www.mkgmap.org.uk/download/mkgmap.html

If you find places where the code is worse compared to trunk or where it might 
need further improvements, please let me know. 

I am aware of some problems:
1) Sometimes the roundabout way is moved so that it overlaps the flare road, 
this happens here:
https://www.openstreetmap.org/node/1423014403
It is not visible in Basecamp but in GPSMapEdit.
2) It removes a sharp turn here:
https://www.openstreetmap.org/node/3851898316
where the old code keeps it.

The algo is more or less a try+error approach without a special order. In some 
cases I see better results when
wrong angles are treated in a different order, but I did not yet find a general 
rule.  :-(
The code checks what happens when a node is removed or when one or two nodes 
are moved. In a few cases it would probably be better
to check a combined move of more nodes or other combinations. I think I'll try 
to code that.

[1] http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=4135
 
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to