logo separator

[mkgmap-dev] [Patch v0] fix sharp angles to optimise bicycle routing

From Gerd Petermann gpetermann_muenchen at hotmail.com on Sun Aug 23 08:29:37 BST 2015

Hi all,

attached is a first working version of the patch, please test it with your style.

I've also uploaded a binary:
http://files.mkgmap.org.uk/download/277/mkgmap.jar

It implements two new options:
--x-fix-sharp-angles  
(I plan to remove this option when the code is ready, I now think
the fixing should always be enabled)

Is needed to activate the new code.
--x-cycle-map
Should be used when the map is only usable for cycling and 
walking, means, all vehicles (except foot) are treated like bicycles.
(like with styles from Minko or Felix)

The patch also removes the code for the option --adjust-turn-headings.

The important code is in a new class AngleChecker, when you want to see what
it does you should enable logging on info level like this:
uk.me.parabola.imgfmt.app.net.AngleChecker.level=INFO

When you find a message like 
... sharp angle 28° at 38.343434,-0.770673 headings 40° 68° speeds 2 2 dest nodes 311 2103
followed by 
... sharp angle 28° at 38.343434,-0.770673 changing arc with heading 68° -> 85° angle is now 45°
you may want to compare the routing results for that location,
once with and once without the option. 
(In Basecamp and Mapsource you can use Ctrl+T to jump to the location
printed in the msg)

While testing the code I found one problem in OSM data:
Sometimes roads are duplicated, means, one road (or a part of it) 
hides the other. I consider this as a potential error in the OSM data,
so a warning like this is produced:
WARN: uk.me.parabola.imgfmt.app.net.AngleChecker  63240007.o5m: sharp angle < 1° at 38.355308,-0.483420 ,maybe duplicated OSM way with bearing 359°
The message doesn't contain any OSM Id because often the
available Ids are missleading due to the merging of roads.
I use JOSM to fix these errors:
Use Ctrl+J to jump to the given position (38.355308,-0.483420) and 
download a small area around the point. Next, use Alt+left mouse click 
multiple times on the node to see the connected roads.

Gerd





 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20150823/0bdf4a18/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sharp-angles-v0.patch
Type: application/octet-stream
Size: 23139 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20150823/0bdf4a18/attachment-0001.obj>


More information about the mkgmap-dev mailing list