From 5be7a70062a6a2ed069d7caeb6eef16719ae15ef Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Tue, 30 Jul 2024 08:08:44 -0400 Subject: [PATCH 1/3] Add recipe for GDC queries --- cookbook/sections/data-consumers.adoc | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/cookbook/sections/data-consumers.adoc b/cookbook/sections/data-consumers.adoc index 04818be..de5d10f 100644 --- a/cookbook/sections/data-consumers.adoc +++ b/cookbook/sections/data-consumers.adoc @@ -1,2 +1,43 @@ == Recipes for data consumers +=== Search the Global Discovery Catalogue + +The 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` From 6424f246264ade15da611ee7e063cdaba17f49ce Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Tue, 30 Jul 2024 08:11:12 -0400 Subject: [PATCH 2/3] Update data-consumers.adoc --- cookbook/sections/data-consumers.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/sections/data-consumers.adoc b/cookbook/sections/data-consumers.adoc index de5d10f..a2d7405 100644 --- a/cookbook/sections/data-consumers.adoc +++ b/cookbook/sections/data-consumers.adoc @@ -2,7 +2,7 @@ === Search the Global Discovery Catalogue -The 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 [Global Discovery Catalogue (GDC)](https://wmo-im.github.io/wis2-guide/guide/wis2-guide-DRAFT.html#_2_4_4_global_discovery_catalogue) 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. From fcf157cb7c987883b23f40d79159fdbea845b91e Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Tue, 30 Jul 2024 08:14:56 -0400 Subject: [PATCH 3/3] asciidoc, not markdown --- cookbook/sections/data-consumers.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/sections/data-consumers.adoc b/cookbook/sections/data-consumers.adoc index a2d7405..669ebb2 100644 --- a/cookbook/sections/data-consumers.adoc +++ b/cookbook/sections/data-consumers.adoc @@ -2,7 +2,7 @@ === Search the Global Discovery Catalogue -The [Global Discovery Catalogue (GDC)](https://wmo-im.github.io/wis2-guide/guide/wis2-guide-DRAFT.html#_2_4_4_global_discovery_catalogue) 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 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.