logo separator

[mkgmap-dev] Possible maxspeed patch

From Mark Burton markb at ordern.com on Wed Aug 26 16:55:13 BST 2009

Hi Mark,

Thanks for the contribution - it sounds like a good idea.

One thought, how about using words and not numbers, words are easier to
interpret when you come back to them 3 months (5 minutes?) later. So
you could have something like:

ignore-maxspeeds (same meaning as now for compatibility but we could
retire it in the future)

but then have a new option that gives the flexibility you want:

maxspeed=ignore    (use speed defined in roadclass)
maxspeed=heed      (use maxspeed if defined, roadclass otherwise)
maxspeed=lowest    (use lowest of those speeds)
maxspeed=highest   (use highest of those speeds - why not?)

Cheers,

Mark

----------

> 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 !



More information about the mkgmap-dev mailing list