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

JSON filter expressions #283

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

tschaub
Copy link
Contributor

@tschaub tschaub commented Nov 6, 2019

Here is a proposed syntax for the JSON encoded filter expressions. Please see the readme for a starting point.

I've included valid and invalid fixtures for tests against the schema (run the tests with python test.py). The doc.py script extracts title, description, and examples for expressions in the schema. I've pasted this output in the readme linked above.

As mentioned in the sprint presentations, I was shooting for feature parity with CQL (which I hope I have demonstrated is straightforward - if there are missing operators, they can be added). I was also hoping to encourage some level of interoperability with expressions in the Mapbox Style Spec. If OGC is considering a general purpose "filter" extension, and will later potentially be reconsidering some sort of "style" extension, I think it makes sense to aim for interoperability with the Mapbox Style Spec where possible. The JSON filter expressions I've proposed here would fit nicely with a JSON encoding for styles that is interoperable with Mapbox.

The readme links to these as well, but here are few brave implementors:

extensions/cql/examples-array.txt Outdated Show resolved Hide resolved
extensions/cql/examples-array.txt Outdated Show resolved Hide resolved
extensions/cql/examples-array.txt Outdated Show resolved Hide resolved
@tschaub tschaub changed the title Examples formatted with JSON array expressions JSON filter expressions Nov 7, 2019
Copy link
Contributor

@pvretano pvretano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tim, why does the pull request say that the changed file(s) are under extensions/filter/languages/jfe ...? All this stuff should be under the extensions/cql directory. Having all this preliminary work, all related to the same topic, spread across multiple directories will -- in my opinion -- really confuse the work of of the SWG. Feel free to reorgnize the files under extensions/cql though (expect the standard) directory.

@tschaub
Copy link
Contributor Author

tschaub commented Nov 7, 2019

Will do @pvretano

I thought the extension was going to be called "filter" and that one of the supported languages would be CQL. I'll move it back under extensions/cql if that is less confusing though.

@pvretano
Copy link
Contributor

pvretano commented Nov 7, 2019

Thanks @tschaub . My feeling is that CQL -- although started in OAPIF -- will end up in OGC API - Common at which point that SWG will organize as they see fit. For now it probably best to keep everything CQL related in one place.

@tschaub tschaub force-pushed the json-array-expression branch 12 times, most recently from b056ed5 to 68e1148 Compare November 7, 2019 21:30
@tschaub tschaub marked this pull request as ready for review November 8, 2019 19:09
@tschaub tschaub force-pushed the json-array-expression branch 2 times, most recently from 7ad50a8 to 06657c0 Compare November 9, 2019 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants