Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with NOT in filters #77

Closed
ianturton opened this issue Apr 18, 2019 · 4 comments
Closed

Problem with NOT in filters #77

ianturton opened this issue Apr 18, 2019 · 4 comments

Comments

@ianturton
Copy link
Contributor

Given a snippet like:

LAYER
TYPE POINT
NAME 'filters_test003'
FILTER (not("roadno" like 'C%') and not("roadno" like 'A%') and not("roadno" like 'B%') and (street_class = 8))
END
Throws this error:

E UnexpectedCharacters: No terminal defined for '=' at line 5 col 115
E
E t("roadno" like 'B%') and (street_class = 8))
E ^

local/lib/python2.7/site-packages/lark/lexer.py:167: UnexpectedCharacters

From my reading of the grammar this should be legal (and our existing mapfile works fine)

@geographika
Copy link
Owner

@ianturton - shouldn't street_class be in square brackets?
Does and ([street_class] = 8)) parse?

@ianturton
Copy link
Contributor Author

it does as in fact does "street_class" = 8 - is quoting or bracketing attributes required?

@geographika
Copy link
Owner

As far as I was aware it should do - https://mapserver.org/mapfile/expressions.html#using-attributes
If you load the Mapfile and then dump it out using MapScript what does the expression look like?

@geographika
Copy link
Owner

@ianturton - hopefully the NOT issue is fixed with #100 (see also #85)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants