[mkgmap-dev] Not-equal compare bug?
From Steve Ratcliffe steve at parabola.me.uk on Sat Jan 5 18:41:40 GMT 2019
Hi Gerd > yes, I think this is a bug. In opposite to the previously posted rules your rules should work. > @Steve: If I got that right the ExpressionArranger kicks in too early. It should only be called when the if-stack is empty (again). > Can you have a look at it? If you have: if (railway=*) then if (tunnel=no) then railway=rail [0x14 resolution 21] () { set tunnel = yes } railway=tram [0x15 resolution 21] end end This is converted (correctly) to: $tunnel=no {set mkgmap:if:2='true';} $tunnel=no & $railway=rail & $railway=* [0x14 level 2] $tunnel=no & $railway=* {set tunnel='yes';} $mkgmap:if:2=true & $railway=tram & $railway=* [0x15 level 2] But with tunnel!=no instead, this becomes: $tunnel!=no {set mkgmap:if:2='true';} $tunnel!=no & $railway=rail & $railway=* [0x14 level 2] $tunnel!=no & $railway=* {set tunnel='yes';} $mkgmap:if:2=true & $railway=tram & $railway=* [0x15 level 2] and so fails on the first statement. The only way to fix this that springs to mind is to instead convert this to: railway=* && $tunnel!=no {set mkgmap:if:2='true';} $tunnel!=no & $railway=rail & $railway=* [0x14 level 2] $tunnel!=no & $railway=* {set tunnel='yes';} $mkgmap:if:2=true & $railway=tram [0x15 level 2] Steve
- Previous message: [mkgmap-dev] Not-equal compare bug?
- Next message: [mkgmap-dev] Not-equal compare bug?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list