[mkgmap-dev] line rule not being triggered
From Steve Ratcliffe steve at parabola.me.uk on Sun Feb 25 13:43:01 GMT 2018
Hi Gerd Thanks Gerd, that should be commited. I tried adding a test for isSolved() at the end of the ExpressionArranger and several tests failed. So there may be other problems, but it seems to me that it is isSolved() that has the problem. Needs more investigation. The current problem was not caught by RuleTest as there were no tests of '=' with no-indexable functions. I have added terms like 'type()=way' which catches this error. I don't see how we can make is_closed() indexable. Steve > 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 >
- Previous message: [mkgmap-dev] line rule not being triggered
- Next message: [mkgmap-dev] line rule not being triggered
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list