Hi all,

while writing the documentation I noticed this possible problem case:
The lines file in the default style contains these rules:
boundary=administrative { name '${mkgmap:boundary_name}' }
boundary=administrative & admin_level<3 [0x1e resolution 12]
boundary=administrative & admin_level<5 [0x1d resolution 19]
boundary=administrative & admin_level<7 [0x1c resolution 21]
boundary=administrative & admin_level<9 [0x1c resolution 22]
boundary=administrative [0x1c resolution 22]

So, one may want to extract the clause boundary=administrative  like this:
if (boundary=administrative) then
        { name '${mkgmap:boundary_name}' }
        admin_level<3 [0x1e resolution 12]
        admin_level<5 [0x1d resolution 19]
        admin_level<7 [0x1c resolution 21]
        admin_level<9 [0x1c resolution 22]
        [0x1c resolution 22]
end

The problem: It doesn't work because the lines
        { name '${mkgmap:boundary_name}' }
and
        [0x1c resolution 22]
are not a valid rules and the rule parser "forgets" that the 
boundary=administrative expression will be added.

What do you think? Should mkgmap support this syntax?

Gerd
________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Gerd 
Petermann <[email protected]>
Gesendet: Dienstag, 7. März 2017 20:10:52
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] if-then-else in style and style options

Hi Andrzej,

thanks, so I'll try to document the new syntax next.

Gerd
________________________________________
Von: mkgmap-dev <[email protected]> im Auftrag von Andrzej 
Popowski <[email protected]>
Gesendet: Dienstag, 7. März 2017 17:40:16
An: [email protected]
Betreff: Re: [mkgmap-dev] if-then-else in style and style options

Hi Gerd,

I have run some tests with current code and spotted no problems. I have
tested both, if-then-else statement and style-option.

--
Best regards,
Andrzej
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to