logo separator

[mkgmap-dev] Possible maxspeed patch

From MarkS OSM at redcake.co.uk on Wed Aug 26 16:37:37 BST 2009

Here is a possible patch for maxspeed.

Around here lots of roads have been tagged with their speed limit (which 
is 60mph). However, these are unclassified roads and you are unlikely to 
get above 40mph. At the moment the default behaviour of mkgmap is set 
overide the style file for these roads and set the road class 
appropriate to 60mph, which is too fast.

I could turn on ignore-maxspeeds which would fix these roads but in turn 
that would result in the trunk roads in town getting too high a speed.

The patch attempts to overcome this by offerring an extra option for 
ignore-maxspeed, so the options become

[Default] - Use maxspeed if it exists, otherwise Road Class from the style

"ignore-maxspeeds" - Use road class from the style file
"ignore-maxspeeds:0" - Use road class from the style file
"ignore-maxspeeds:1" - Use maxspeed from the style file
"ignore-maxspeeds:2" - Use the lower of road class and maxspeed

Effectively option 2 solves my problem. The other numbered options are 
there to reproduce existing behaviour using a number. The non-numbered 
option is to keep compatiblity with existing code.


Note:
- This is the first patch I've done so I might have gone about it 
completely the wrong way. If so I'm sorry and please give me some hints
- It is also the first Java code I've ever edited so I might have done 
something wrong! All I can say is that it worked for me !
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Maxspeed.patch
Url: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090826/5c7b26be/attachment.pl 


More information about the mkgmap-dev mailing list