From ab571f405a7aeac4f645c7d3301770bb4348d8e3 Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Tue, 11 Oct 2022 20:54:02 -0400 Subject: [PATCH] add optional numberMatched and numberReturned fields to ItemCollection --- CHANGELOG.md | 5 +++++ fragments/itemcollection/README.md | 12 +++++++----- .../examples/itemcollection-sample-full.json | 2 ++ fragments/itemcollection/openapi.yaml | 6 ++++++ 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6f21803..c8ade67e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - TBD +### Added + +- Added optional `numberMatched` and `numberReturned` fields to ItemCollection to align with OGC Commons + and OAFeat. + ### Changed - Browseable specification has been incorporated into the *STAC API - Core* specification. diff --git a/fragments/itemcollection/README.md b/fragments/itemcollection/README.md index 0af528f4..5dd9ebf5 100644 --- a/fragments/itemcollection/README.md +++ b/fragments/itemcollection/README.md @@ -19,11 +19,13 @@ required fields is a valid STAC ItemCollection. This object describes a STAC ItemCollection. The fields `type` and `features` are inherited from GeoJSON FeatureCollection. -| Field Name | Type | Description | -| ---------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| type | string | **REQUIRED.** Always "FeatureCollection" to provide compatibility with GeoJSON. | -| features | \[[STAC Item](../../stac-spec/item-spec/item-spec.md)] | **REQUIRED** A possibly-empty array of Item objects. | -| links | \[[Link Object](../../stac-spec/item-spec/item-spec.md#link-object)] | An array of Links related to this ItemCollection. | +| Field Name | Type | Description | +| -------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| type | string | **REQUIRED.** Always "FeatureCollection" to provide compatibility with GeoJSON. | +| features | \[[STAC Item](../../stac-spec/item-spec/item-spec.md)] | **REQUIRED.** A possibly-empty array of Item objects. | +| links | \[[Link Object](../../stac-spec/item-spec/item-spec.md#link-object)] | An array of Links related to this ItemCollection. | +| numberMatched | integer | The number of Items that meet the selection parameters, possibly estimated. | +| numberReturned | integer | The number of Items in the `features` array. | ## Extensions diff --git a/fragments/itemcollection/examples/itemcollection-sample-full.json b/fragments/itemcollection/examples/itemcollection-sample-full.json index f69dc930..8f18084d 100644 --- a/fragments/itemcollection/examples/itemcollection-sample-full.json +++ b/fragments/itemcollection/examples/itemcollection-sample-full.json @@ -1,5 +1,7 @@ { "type": "FeatureCollection", + "numberMatched": 10, + "numberReturned": 1, "features": [ { "stac_version": "1.0.0", diff --git a/fragments/itemcollection/openapi.yaml b/fragments/itemcollection/openapi.yaml index a072cd47..c30b2704 100644 --- a/fragments/itemcollection/openapi.yaml +++ b/fragments/itemcollection/openapi.yaml @@ -33,3 +33,9 @@ components: - rel: next href: >- http://api.cool-sat.com/search?next=ANsXtp9mrqN0yrKWhf-y2PUpHRLQb1GT-mtxNcXou8TwkXhi1Jbk + numberMatched: + type: integer + minimum: 0 + numberReturned: + type: integer + minimum: 0