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

Explicitly specify metadata filters for collections #396

Closed
m-mohr opened this issue May 26, 2021 · 7 comments · Fixed by #434 or #487
Closed

Explicitly specify metadata filters for collections #396

m-mohr opened this issue May 26, 2021 · 7 comments · Fixed by #434 or #487
Assignees
Labels
data discovery minor requires a minor-version (x.1.0 for example) platform stac / ogc
Milestone

Comments

@m-mohr
Copy link
Member

m-mohr commented May 26, 2021

Originates from Open-EO/openeo-python-client#141 (comment)

Initially the thought was that all (scalar) metadata properties could be queried. This seems not to be true and thus it's not really clear to users what they can query on (despite the limited implementations right now). It would probably good to add something that mentions what users can query on.

In STAC API this would be /queryables, but it may be enough to just add a list with properties to the collections, e.g. "openeo:properties": ["eo:cloud_cover", "proj:epsg"] for example.

@m-mohr
Copy link
Member Author

m-mohr commented Aug 30, 2021

It's actually possible to expose this via the process description, although it is pretty verbose:

{
  "type": "object",
  "subtype": "metadata-filter",
  "title": "Filters",
  "description": "A list of filters to check against. Specify key-value-pairs with the key being the name of the metadata property name and the value being a process evaluated against the metadata values.",
  "properties": {
    "eo:cloud_cover": {
      "type": "object",
      "subtype": "process-graph",
      "parameters": [
        {
          "name": "value",
          "description": "The cloud cover value to be checked against.",
          "schema": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100
          }
        }
      ]
    },
    "platform": {
      "type": "object",
      "subtype": "process-graph",
      "parameters": [
        {
          "name": "value",
          "description": "The property value to be checked against.",
          "schema": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      ]
    }
  }
}

@m-mohr m-mohr closed this as completed Aug 30, 2021
@m-mohr m-mohr removed this from the 1.2.0 milestone Aug 30, 2021
@m-mohr m-mohr reopened this Aug 30, 2021
@m-mohr
Copy link
Member Author

m-mohr commented Aug 30, 2021

Although it would likely also be interesting to expose this per collection...

@m-mohr m-mohr added this to the 1.2.0 milestone Aug 30, 2021
@sophieherrmann
Copy link

I think it would make a lot more sense to expose this per collections. Thinking about radar and optical data the two will provide very different queryable properties. Depending on the specific datasets it could even be that on radar collection provides a specific queryable and another radar collection does not.

I do like the idea of just adding an additional key which lists non standard queryable properties.

@m-mohr m-mohr changed the title Queryables in load_collection properties Explicitly specify metadata filters for collections Nov 30, 2021
@m-mohr m-mohr self-assigned this Nov 30, 2021
@m-mohr m-mohr linked a pull request Nov 30, 2021 that will close this issue
@m-mohr m-mohr closed this as completed Dec 8, 2021
@m-mohr m-mohr reopened this Aug 8, 2022
@m-mohr
Copy link
Member Author

m-mohr commented Aug 8, 2022

We may want to consider collection-specific queryables instead of openeo:property_filters. Came up in #447 (comment)

When I spec'ed the PR above, I wasn't aware collection-specific queryables is a thing, but it exists and could be the approach that is better aligned with STAC API.

@m-mohr
Copy link
Member Author

m-mohr commented Nov 2, 2022

Removed openeo:property_filters again. Instead add queryables once working on #469 and the underlying specs are stable (OGC API and STAC API).

@m-mohr
Copy link
Member Author

m-mohr commented Mar 28, 2023

I'll prepare a PR based on the STAC API - Filter extension.

@m-mohr
Copy link
Member Author

m-mohr commented Apr 6, 2023

Please review PR #487

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data discovery minor requires a minor-version (x.1.0 for example) platform stac / ogc
Projects
None yet
2 participants