Hi Gerd
That fixes the problem
Thanks
Ticker
On Sun, 2018-02-25 at 07:11 +0000, Gerd Petermann wrote:
> Hi,
>
> the problem is in the ExpressionArranger, it changes the order of the
> terms in
> man_made=* & is_closed()=true {add area=yes; echotags 'mm'}
> to
> is_closed()=true & man_made=* {add area=yes; echotags 'mm'}
> and thus creates an invalid input for the RuleIndex.
> Attached patch fixes this problem, but I think we should add more
> code in ExpressionArranger
> to make sure that it never produces such an invalid input.
>
> @Steve: I think ExpressionArranger should call isSolved()
> and stop if that returns false. In that case it would be great to
> print an error message
> that shows the original expression and the file and line number of
> the rule file.
> When we add a check in RuleIndex we can only print the re-arranged
> rule and that will
> only confuse the user.
>
> BTW: Maybe we can also change the code so that is_closed() is
> indexable?
>
> Gerd
>
> ________________________________________
> Von: mkgmap-dev <[email protected]> im Auftrag
> von Gerd Petermann <[email protected]>
> Gesendet: Samstag, 24. Februar 2018 18:41:59
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] line rule not being triggered
>
> Hi Ticker,
>
> I can reproduce the error with other style functions as well.
> This pattern seems not to work:
> a=* & style_func()=val {...}
> This works fine
> a=* & style_func()!=val {...}
> or
> a=* & style_func()>val {...}
>
> @Steve: I assume that the problem is in the rule optimizer?
>
> Gerd
>
> ________________________________________
> Von: mkgmap-dev <[email protected]> im Auftrag
> von Ticker Berkin <[email protected]>
> Gesendet: Samstag, 24. Februar 2018 13:36:26
> An: mkgmap development
> Betreff: [mkgmap-dev] line rule not being triggered
>
> Hi
>
> I noticed that the default style was putting walkways around some
> piers
> because of the line rule:
>
> (man_made=pier | man_made=piste:halfpipe) & area!=yes
> {add highway=footway; name '${ref} ${name}' | '${ref}' | '${name}' }
>
> an example is:
> WAY: 469580183 (50.73379039764404/-1.2820744514465332)
> [man_made=pier,
> mkgmap:admin_level10=Whippingham, mkgmap:admin_level2=GBR,
> mkgmap:admin_level4=England, mkgmap:admin_level5=South East,
> mkgmap:admin_level6=Isle of Wight, name=Folly Pier]
>
> which is using a closed way to draw the pier (and also has a defined
> footpath along it)
>
> Earlier on in my lines file I have:
>
> # mark multipolygons as area
> mkgmap:mp_created=true {add area=yes}
>
> highway=* & area!=* & is_closed()=true {echotags 'closed() highway';
> add area=yes}
>
> and so added the following to fix the problem:
>
> man_made=* & is_closed()=true {add area=yes; echotags 'mm'}
>
> but this rule isn't being triggered by my example, but if I replace
> it
> with:
>
> name="Folly Pier" & is_closed()=true {add area=yes; echotags 'fp'}
>
> Then it behaves as expected
>
> I'm using the latest svn trunk (4127)
>
> Any ideas?
>
> Thanks
> Ticker
>
>
> _______________________________________________
> 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
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev