Hi Andrzej,
attached is v1 of the patch to implement new option:
--style-option
Provide a semicolon separated list of tags which can be used in the
style.
The intended use is to make a single style more flexible, e.g.
you may want to use a slightly different set of rules for a map of
a whole continent. The tags given will be prefixed with
"mkgmap:option:".
If no value is provided the default "true" is used.
This option allows to use rules like
mkgmap:option:light=true & landuse=farmland {remove landuse}
Example: -- style-option=light;routing=car
will add the tags mkgmap:option:light=true and mkgmap:option:routing=car
to each element before style processing happens.I've implement a simple check to report each tag prefixed with mkgmap:option: used in the style but not specified in the option. Maybe this is not needed, for example one can code mkgmap:option:light!=true & landuse=farm |landuse=farmland [0x4e resolution 20] or mkgmap:option:light=false & landuse=farm |landuse=farmland [0x4e resolution 20] I'd prefer the 1st version as it will work without style-option. The check is not (yet) performed with the style-check option, only when the style is acutally used to compile a tile. Please test and suggest improvements. Gerd ________________________________________ Von: mkgmap-dev <[email protected]> im Auftrag von Andrzej Popowski <[email protected]> Gesendet: Sonntag, 12. Februar 2017 14:09:29 An: [email protected] Betreff: Re: [mkgmap-dev] To do: If-Then-Else Hi Gerd, yes, I understand. The more capable options, the more problems could arise. But I'm not afraid, I think these options would be used in scripts, where they would be correct after first debugging. In case of style-option you could issue a warning if command line style-option is not used in style. -- Best regards, Andrzej _______________________________________________ mkgmap-dev mailing list [email protected] http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
style-option_v1.patch
Description: style-option_v1.patch
_______________________________________________ mkgmap-dev mailing list [email protected] http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
