logo separator

[mkgmap-dev] "Invalid rule expression" for expression in line file after upgrade from r3649 to r3693

From Steve Ratcliffe steve at parabola.me.uk on Fri Aug 12 14:35:56 BST 2016

Hi
> With newest release r3693 I'm having troubles creating a map with a
> style file 'line' containing the following expression (it worked with
> r3649 and earlier version):
>
>     maxspeed = * & ( maxspeedkmh()>120 | maxspeed = none ) & ( highway =
>     motorway | highway = trunk )  { set mkgmap:road-speed-class = 7 }

Thanks for reporting this.  I've prepared a patch attached and a
pre-built jar file here: http://files.mkgmap.org.uk/download/308/mkgmap.jar

It's possible that this fix will in turn fail on some expressions that
used to work.

> When just changing the order of the expressions (without changing the
> logic/result) as shown below it works properly also with release r3693:
>
>     maxspeed = * & ( highway = motorway | highway = trunk ) & (
>     maxspeedkmh()>120 | maxspeed = none )  { set mkgmap:road-speed-class
>     = 7 }

mkgmap is failing to re-arrange the expression properly, you can
always re-arrange it yourself by moving the more complex expressions
towards the end.

Or to find bugs move them to the beginning!

> Is it possible that the 'fixes' for r3667 or r3671 fixed some errors but
> brought a new one in ? Or do I completely misunderstand the concept of
> these expressions ?

Yes, there have been a few of these reported recently.  Each bug that
is fixed has a test, so we are gradually eliminating the problems,
even if new ones appear.

Cheers,
..Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Invalid_style_expression.patch
Type: text/x-patch
Size: 1557 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20160812/38a7797f/attachment.bin>


More information about the mkgmap-dev mailing list