[mkgmap-dev] New style branch
From Felix Hartmann extremecarver at gmail.com on Tue Aug 8 08:52:54 BST 2017
I ran into this bug many years ago - but back then I either assumed or got told that the first rule must not be != but has to be plain =. However I think it simply did not work instead of throwing a stack overflow. On 7 August 2017 at 22:43, Steve Ratcliffe <steve at parabola.me.uk> wrote: > Hi > > Every now and again, there is a bug report on a style rule that gives > an error when it shouldn't. The most recent from Mike Baggaley, > included a case where the rule was accepted but the result was > incorrect. > > I wrote a little program to generate random rules and test them using > the style tester. > > This showed that there were many rules that should be accepted that > are not and worse there are cases where the wrong result is given. > > Worst of all this simple rule: > > a>=1 & (a=1 | b~2) [0x2] > > (and many others) crash mkgmap with a StackOverflowError. I'm > surprised that no-one has found that. Perhaps they have and it just > hasn't been reported. > > An example of a rule that is accepted but doesn't work is: > > (a!=1 | b~2) & a<2 & a>=2 [0x2] > > This matches (with trunk) with a way with tags a=2 and b=2 > but it should not. > > So not very complex rules fail. There are also vast number of rules > that involve using not (!) such as !(highway=service & ...) that are > not accepted or do not work. Probably not many styles have many such > rules though. > > So I re-wrote and simplified the code and the result is > on the expr branch. > > There is also a new feature that was needed to help make it > work. There is now a not regex match operator !~. It is > probably not all that useful but it is now availabl. > > name !~ 'Main.*' > > is exactly the same as > > !(name ~ 'Main.*') > > > The latest branch build can be downloaded from: > > http://www.mkgmap.org.uk/download/mkgmap-expr-latest.zip > > It is important to test it, as although I believe that the branch is > now correct, some styles may have been relying on previous bugs. > > ..Steve > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > -- Felix Hartman - Openmtbmap.org & VeloMap.org Schusterbergweg 32/8 6020 Innsbruck Austria - Österreich -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20170808/6a2a4120/attachment.html>
- Previous message: [mkgmap-dev] New style branch
- Next message: [mkgmap-dev] New style branch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list