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

Add recipe for GDC queries #3

Merged
merged 3 commits into from
Jul 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions cookbook/sections/data-consumers.adoc
Original file line number Diff line number Diff line change
@@ -1,2 +1,43 @@
== Recipes for data consumers

=== Search the Global Discovery Catalogue

The https://wmo-im.github.io/wis2-guide/guide/wis2-guide-DRAFT.html#_2_4_4_global_discovery_catalogue[Global Discovery Catalogue (GDC)] allows for a wide range of query predicates to search for data in WIS2 as per the OGC API - Records - Part 1: Core specification.

The GDC can be searched via the `/collections/wis2-discovery-metadata/items` endpoint. This endpoint provides a number query parameters as described in the examples below.

**NOTE**: examples below are not URL encoded for clarity / readability, but should be when interacting with the GDC.

=== Spatial queries

- search for metadata records of data in Canada: `bbox=-142,42.-52,84`

=== Temporal queries

- search for metadata records updated since 29 July 2024: `datetime=2024-07-29/..`
- search for metadata records updated before 29 July 2024: `datetime=../2024-07-29`
- search for metadata records updated on 29 July 2024: `datetime=2024-07-29`

=== Equality queries

- search for metadata records whose title contains the terms hourly observations: `title=hourly observations`
- search for metadata records whose title contains the terms hourly or observations: `title=hourly | observations`

=== Freetext search

- search metadata records for temperature: `q=temperature`
- search metadata records for GRIB2 data: `q=GRIB2`
- search metadata records for any GRIB data: `q=\*GRIB*`
- search for either GRIB data or data in Europe with subscriptions to the Météo-France Global Broker: `q=(\*GRIB* OR \*Europe*) AND \*globalbroker*`
- search for data from Belize with MQTT subscription capabilitiesi: `q="cache/a/wis2/bz-nms"`

=== Sorting

- sort search results by title, ascending: `sortby=title`
- sort search results by title, descending: `sortby=-title`

=== Paging

- present search results 1-10: `limit=10`
- present search results 11-20: `limit=10&offset=10`
- limit to 3 search results: `limit=3`
Loading