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

Filter Extension - Conformance classes realign #202

Merged
merged 18 commits into from
Oct 5, 2021

Conversation

philvarner
Copy link
Collaborator

@philvarner philvarner commented Aug 23, 2021

Related Issue(s):

Proposed Changes:

  1. Align Filter Extension conformance classes with OAFeat (details in changelog)

One difference with OAFeat CQL2 is that we do not require upper/lower as part of Advanced Comparison Ops, though I am reconsidering that. Now that IS NULL is part of the Basic CQL, LIKE is the only operator that can't otherwise be expressed in Basic CQL (e.g., IN and BETWEEN can be converted to more verbose clauses).

I would prefer that an implementor didn't need to implement function parsing to support this class, but I think, ultimately, it's not worth having this minor difference between STAC API and OAFeat CQL2, so I think we should defer to what OAFeat finalizes.

PR Checklist:

  • This PR is made against the dev branch (all proposed changes except releases should be against dev, not master).
  • This PR has no breaking changes.
  • This PR does not make any changes to the core spec in the stac-spec directory (these are included as a subtree and should be updated directly in radiantearth/stac-spec)
  • I have added my changes to the CHANGELOG or a CHANGELOG entry is not required.

@philvarner philvarner changed the base branch from master to dev August 23, 2021 21:03
@philvarner philvarner marked this pull request as ready for review August 24, 2021 13:48
extensions.md Outdated
@@ -69,10 +69,18 @@ the service supports. This are listed at the top of each extension description,
- <https://api.stacspec.org/v1.0.0-beta.4/item-search#fields>
- [Filter](item-search/README.md#filter)
- <https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:filter>
- <https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:simple-cql>
- <https://api.stacspec.org/v1.0.0-beta.4/item-search#filter:basic-cql>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

all of these names align with the OGAFeat CQL2 names.

@philvarner philvarner changed the title Conformance classes realign Filter Extension - Conformance classes realign Aug 24, 2021
@philvarner philvarner requested review from m-mohr, cholmes and jbants and removed request for cholmes, matthewhanson, lossyrob, m-mohr and jbants September 9, 2021 14:25
and dynamic content, so this behavior may be modified by setting the `additionalProperties` attribute in the
queryables definition to `true`. As such, any syntactically-valid term for a property will be accepted, and the
matching semantics are such that, if an Item does not have an attribute by that name, the value is assumed to be
`null`. It is recommended to use fully-qualified property names (e.g., `properties.eo:cloud_cover`).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we include something to explain that you can implement "simplified" access to complicated nested structures? So that you could add a queryable "common_band_name" that searches for a common name in eo:bands in assets?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

there's a section about that later in the doc, around line 300.

AND datetime ANYINTERACTS 2021-04-08T04:39:23Z/2021-05-07T12:27:57Z
AND INTERSECTS(geometry, POLYGON((43.5845 -79.5442, 43.6079 -79.4893, 43.5677 -79.4632, 43.6129 -79.3925, 43.6223 -79.3238, 43.6576 -79.3163, 43.7945 -79.1178, 43.8144 -79.1542, 43.8555 -79.1714, 43.7509 -79.6390, 43.5845 -79.5442))
AND eo:cloud_cover <= 10
AND datetime >= "2021-04-08T04:39:23Z"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't this usually be covered by a BETWEEN?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It would, but BETWEEN is in the Advanced Comparison Operators conformance class, and I wanted these first examples to only use the Basic operators.

### Example 8: Spatial Disjunction

One limitation of the `intersects` parameter is that only a single geometry may be provided. While most
GeoJSON geometries can be combined to form a composite (e.g., multiple Polygons can be combined to form a
Copy link
Collaborator

Choose a reason for hiding this comment

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

There's also the (discouraged?) GeometryCollection...


#### Example 9: cql-text (GET)

```javascript
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are these snippets JavaScript? I guess http is more correct? (you may also want to include GET in front of the call?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cut and paste. I'll change them to have no language.

implementation.md Outdated Show resolved Hide resolved
implementation.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@m-mohr m-mohr left a comment

Choose a reason for hiding this comment

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

Added some comments, but nothing really blocking I think.
I love that this is now fully aligned!

@philvarner philvarner merged commit 7206ae9 into radiantearth:dev Oct 5, 2021
@philvarner philvarner deleted the conformance-classes-realign branch October 5, 2021 16:27
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

Successfully merging this pull request may close these issues.

2 participants