logo separator

[mkgmap-dev] To do: If-Then-Else

From Gerd Petermann GPetermann_muenchen at hotmail.com on Mon Feb 13 10:44:06 GMT 2017

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 <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Andrzej Popowski <popej at poczta.onet.pl>
Gesendet: Sonntag, 12. Februar 2017 14:09:29
An: mkgmap-dev at lists.mkgmap.org.uk
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
mkgmap-dev at lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: style-option_v1.patch
Type: application/octet-stream
Size: 7390 bytes
Desc: style-option_v1.patch
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20170213/890ccee9/attachment-0001.obj>


More information about the mkgmap-dev mailing list