-
Notifications
You must be signed in to change notification settings - Fork 27
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 on associations (links) in CQL #28
Comments
Proposal for the extension to CQLWe need the following capabilities:
See the examples below. In addition, we need to clarify how links / associations are encoded in the JSON encoding. The general links of a resource that are specified in the OGC API standards are in a top level {
"links" : [ {
"rel" : "self",
"type" : "application/json",
"title" : "This document",
"href" : "https://example.com/path.json"
}, {
"rel" : "alternate",
"type" : "text/html",
"title" : "This document as HTML",
"hreflang" : "de",
"href" : "https://example.com/path.de.html"
}, {
"rel" : "alternate",
"type" : "text/html",
"title" : "This document as HTML",
"hreflang" : "de",
"href" : "https://example.com/path.en.html"
}, {
"rel" : "collection",
"type" : "text/html",
"title" : "The catalogue of this record",
"href" : "https://example.com/collection-path"
} ]
} We have not discussed yet how additional links / associations should be included in the records. I see three general options and I don't think we need to mandate one, except for the properties that are specified in the Core. Option 1Add them to the
Sample filter expression: Note that we need the sub-query for these cases as Option 2Add them as normal properties. The
Sample filter expression: Option 3Similar to option 2, but just the href value.
Sample filter expression: |
@cholmes @matthewhanson These kind of filters could be something we use in STAC for querying the bands etc, right? |
07-DEC-2020: The consensus seems to be with option 1 with the following caveats: (1) The key can be anything, "links", "associations", "assets". (2) The structure has to be an array of links with the structure displayed in option 1 (i.e. rel, title, href, etc.) as per features (and an IETF draft). |
You could check https://docs.opengeospatial.org/is/17-003r2/17-003r2.html#23 Example 4: GeoJSON encoding example
} |
28-DEC-2020: Peter: mostly documented both approaches in records specification. Mood of SWG however is to not allow that many degrees of freedom and so we should pick 1 and Option 1 is it because that is the linking style used is features and in common. Peter will leave both approach in the specification for now but segregate option 2 as an option to consider but clearly state that option 1 is the preferred approach. |
25-JAN-2021: @pvretano to add text to specification for review. Also related to CQL extension because CQL requires extensions for this too. |
…and/or associations. This is based on the content from issue #28.
SWG MEETING 08-FEB-2021: Don't have a clear description in the document yet and we need some extensions to CQL. We will define the necessary extensions here in Records in a separate conformance class with the understanding that the extension may eventually move to CQL or common if/when CQL moves to common. |
09-AUG-2021: There have been a lot of changes to the document recently. @cportele will review the recent changes to the document and determine if this issue needs to be addressed here or in CQL in Features and also the JSON-FG SWG. |
07-FEB-2022: Pausing work on this issue for now to allow the work on CQL2 to finish. This particular requirement would end up as either a revision or extension of CQL2. |
16-MAY-2022: Since the Sept. code sprint with be covering Records, JSON-FG, ISO19115 and STAC, it would be good to discuss this issues at the code sprint. |
OGC Code Sprint 2022-09-16:
|
Example for a filter on "themes" (using a live API):
This filter queries on the "theme.concept" values where the "scheme" is "profile". This uses the array operator A_CONTAINS since there are multiple values "theme.concept" ("theme" is an array of objects where each object has 0 or 1 "scheme" and an array of strings in "concept"). In the example, all records (in this case values of a code list with building functions) are matched that at least are part of the profiles "DLKM", "Basis-DLM" and "DLM50". |
A question that is highly relevant for STAC: Is this syntax also working for objects (i.e. STAC Assets)? I'd hope that it would be something like this: |
@m-mohr - Stay tuned, I will work on the asset example in the next days and a rough draft of the extension, but as we agreed in the discussion, it will/has to support objects. Maybe the example in Features Part 3 could be written an |
15-MAR-2023: Might be related to opengeospatial/ogcapi-features#740 |
30-OCT-2023: We need to revist this in light of the new Schema in OAFeat. We will do that and make a determination if this issue can be close or drafted based on the new work. |
08-JUL-2024: This is still a topic that needs to be addressed but since all the API elements of OAPIR are part of features it is a topic that should/will be handled there. Closing. |
As discussed in the 2020-03-04 meeting:
The queryables currently include links to related resources, but the CQL grammar does not support this or at least it has no explicit mechanism how property names should map to links. Either we just need additional guidance how this is represented in the queryables or we need an extension to CQL.
The predicates should probably be restricted to the information included in the link (in particular: title, rel, href).
As CQL has no mechanisms how to process properties with multiple values we probably also need to clarify the requirements how the predicates on links work for the standard case that there are multiple links.
The text was updated successfully, but these errors were encountered: