Small bug in mkgmap style handling on action rules

Hi, I just discovered a bug (this is happening on both trunk as well as style-speed). This rule is applied twice if both mtb:scale and mtb:scale:uphill are present: ( mtb:scale=* | mtb:scale:uphill=* ) { set name='${name} M${mtb:scale}${mtb:scale:uphill}' | '${name} M${mtb:scale}.' | '${name} Mx${mtb:scale:uphill}' | 'M${mtb:scale}${mtb:scale:uphill}' | 'M${mtb:scale}.' | 'Mx${mtb:scale:uphill}' } One can code around it like this which gives the result that would be expected from the single line above. I think this bug only affects action rules, not normal rules. mtb:scale=* & mtb:scale:uphill=* & extremecarvernameset!=* { set name='${name} M${mtb:scale}${mtb:scale:uphill}' | '${name} M${mtb:scale}.' | '${name} Mx${mtb:scale:uphill}' | 'M${mtb:scale}${mtb:scale:uphill}'; set extremecarvernameset=yes } mtb:scale=* & extremecarvernameset!=* { set name='${name} M${mtb:scale}.' | 'M${mtb:scale}.'; set extremecarvernameset=yes } mtb:scale:uphill=* & extremecarvernameset!=* { set name='${name} Mx${mtb:scale:uphill}' | '${name} Mx${mtb:scale:uphill}'; set extremecarvernameset=yes } This would not be noticed when action rules are used to work on access tags (acces tag set twice to the same value), but it can be confusing for setting the name. BTW is the --name-tag-list option still usefull. I think it can be better done directly from the style-file (or is it faster to do via name-tag-list??). Actually it would be great if for international names, we could have at least a second choice in the search index. Also the --no-sorted-roads option does not bring any speed improvements anymore. I think it can be removed.

On 04/02/10 16:32, Felix Hartmann wrote:
Hi, I just discovered a bug (this is happening on both trunk as well as style-speed).
Yes it sounds familiar. I'll add the following test. WAY highway=road mtb:scale=2 mtb:scale:uphill=yes <<<lines>>> ( mtb:scale=* | mtb:scale:uphill=* ) { set name='${name} M${mtb:scale}${mtb:scale:uphill}' | '${name} M${mtb:scale}.' | '${name} Mx${mtb:scale:uphill}' | 'M${mtb:scale}${mtb:scale:uphill}' | 'M${mtb:scale}.' | 'Mx${mtb:scale:uphill}' } highway=road [0x1] Style tester currently says: WAY 1: Line 0x1, name=<M2yes M2yes>, ref=<null>, res=24-24 (1/1),(2/2), ERROR expected result is: WAY 1: Line 0x1, name=<M2yes>, ref=<null>, res=24-24 (1/1),(2/2), ..Steve

for setting the name. BTW is the --name-tag-list option still usefull. I think it can be better done directly from the style-file (or is it faster to do via name-tag-list??).
I think it is useful. Obviously not so much for your style as it sets a constructed name on most things itself. But for the default style, the user can select the main language to use and change it for each map if they wish, without having to have a separate style.
Also the --no-sorted-roads option does not bring any speed improvements anymore. I think it can be removed.
I agree, in fact I never saw it make any difference. ..Steve
participants (2)
-
Felix Hartmann
-
Steve Ratcliffe