logo separator

[mkgmap-dev] mp/hh / km/h m or other units in maxspeed or distance keys

From Marko Mäkelä marko.makela at iki.fi on Tue Aug 28 12:06:59 BST 2012

On Tue, Aug 28, 2012 at 10:36:59AM +0200, Felix Hartmann wrote:
>Well it's quite a long time, there has been no discussion about this, 
>however it's more and more common to put the unit into the main key.  
>Could mkgmap do a clean up on this?
>
>It would be great if mkgmap could do the following:
>Remove any non numeric keys (and not "." or "," )  and place them into 
>a new key called mkgmap:unit=....
>Do this for maxspeed, distance, height, width (propose other keys I may 
>have missed).

I think that this should be done in the (default) style file, not in the 
mkgmap core. We already have a regexp matching operator, and if I 
remember correctly, we should also have regexp replace in the action 
rules.

But, I would wait a bit until Steve has overhauled the include mechanism 
in the style file parser.

>As I'm sure this would take quite some time, it should be an option, 
>and there should be a style-file called units_removed where you can 
>specify the keys for which mkgmap should do this.

Hmm, parameterized style rules and actions? Sort of macro or template 
expansion in the style processor?

Best regards,

	Marko



More information about the mkgmap-dev mailing list