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

ENVELOPE() in CQL #334

Closed
cportele opened this issue Feb 19, 2020 · 4 comments · Fixed by #443
Closed

ENVELOPE() in CQL #334

cportele opened this issue Feb 19, 2020 · 4 comments · Fixed by #443

Comments

@cportele
Copy link
Member

The definition of ENVELOPE in the CQL BNF is

envelopeText = leftParen westBoundLon comma eastBoundLon comma northBoundLat comma southBoundLat [comma minElev comma maxElev] rightParen;

This is a pretty weird sequence with a convention that I haven't seen yet: west, east, north, south, low, high (low/high optional). I checked CSW and it is the same there.

@pvretano @aaime: Is this really what has been implemented in the existing CQL implementations?

I would have expected west, south, low, east, north, high (same as bbox). Or at least west, east, south, north, low, high.

@cportele cportele added the CQL2 label Feb 19, 2020
@pvretano
Copy link
Contributor

@cportele I picked it up from trom CSW but I would not be opposed to aligning it with bbox since it would be consistent across APIs and encodings.

@aaime
Copy link
Contributor

aaime commented Feb 20, 2020

@cportele in GeoTools we don't have a BNF but a javacc grammar, here it is, with specific reference to the ENVELOPE support:

https://github.com/geotools/geotools/blob/74c043ac69918ac4d7c3a6498f287fc66d223a97/modules/library/cql/src/main/jjtree/ECQLGrammar.jjt#L1272

TBH I have never used ENVELOPE before, to do bounding box intersection tests we have a dedicated BBOX operator.

@cportele
Copy link
Member Author

@aaime - I see, the grammar has also west/east/north/south, but the test at

https://github.com/geotools/geotools/blob/master/modules/library/cql/src/test/java/org/geotools/filter/text/cql2/CQLLiteralTest.java#L155

seems to imply west, east, south, north and the text in

https://docs.geoserver.org/latest/en/user/filter/ecql_reference.html

also states ENVELOPE ( x1 x2 y1 y2 ).

I see the BBOX() predicate in your ECQL, but I don't think that is in CQL.

@cportele
Copy link
Member Author

2020-07-20: Change to west, south, [low], east, north, [high], consistent with bbox in Features Part 1.

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

Successfully merging a pull request may close this issue.

3 participants