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

Support for collection "queryables" (metadata filters) #483

Open
soxofaan opened this issue Oct 11, 2023 · 0 comments
Open

Support for collection "queryables" (metadata filters) #483

soxofaan opened this issue Oct 11, 2023 · 0 comments

Comments

@soxofaan
Copy link
Member

openEO API 1.2 feature:

New endpoint for metadata filters (queryables): /collections/{collection_id}/queryables. Also adds a new rel type to the collection links. Open-EO/openeo-api#396

Lacking anything better, client now leverages "summaries" which is incomplete, and raises warning if there is no match

if properties:
summaries = metadata and metadata.get("summaries") or {}
undefined_properties = set(properties.keys()).difference(summaries.keys())
if undefined_properties:
warnings.warn(
f"{collection_id} property filtering with properties that are undefined "
f"in the collection metadata (summaries): {', '.join(undefined_properties)}.",
stacklevel=2,
)
arguments["properties"] = {
prop: build_child_callback(pred, parent_parameters=["value"]) for prop, pred in properties.items()
}

related: #424 Open-EO/openeo-geopyspark-driver#536 Open-EO/openeo-api#396

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

No branches or pull requests

1 participant