diff --git a/.circleci/config.yml b/.circleci/config.yml index 1ec9f7e07..9016b9244 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,4 +29,4 @@ jobs: stac_validator item-spec/examples/landsat8-sample.json stac_validator item-spec/examples/digitalglobe-sample.json stac_validator item-spec/examples/CBERS_4_MUX_20181029_177_106_L4.json - remark -u validate-links . \ No newline at end of file + remark -f -u validate-links . \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d01244cf1..332d1e0f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,15 +9,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Added - ItemCollection requires `stac_version` field, `stac_extensions` has also been added - A `description` field has been added to Item assets (also Asset definitions extension). +- Field `mission` to [Common Metadata fields](item-spec/common-metadata.md). - Extensions: - - [Version Indicators extension](extensions/version/README.md), adds `version` and `deprecated` fields to STAC Items and Collections - - Instrument extension, adds fields: `platform`, `instruments`, `constellation` (all moved from EO and SAR extensions), and `mission` - - Data Cube extension can be used in Collections, added new field `description` - - Added `description` and `roles` fields to the Asset in the [Asset Extension](extensions/asset/README.md) - - Projection Extension to describe Items with Assets that have an associated geospatial projection. + - [Version Indicators extension](extensions/version/README.md), adds `version` and `deprecated` fields to STAC Items and Collections + - Data Cube extension can be used in Collections, added new field `description` + - Added `description` and `roles` fields to the Asset in the [Asset Extension](extensions/asset/README.md) + - Projection Extension to describe Items with Assets that have an associated geospatial projection. - STAC API: - - Added the [Item and Collection API Version extension](api-spec/extensions/version/README.md) to support versioning in the API specification - - Run `npm run serve` or `npm run serve-ext` to quickly render development versions of the OpenAPI spec in the browser. + - Added the [Item and Collection API Version extension](api-spec/extensions/version/README.md) to support versioning in the API specification + - Run `npm run serve` or `npm run serve-ext` to quickly render development versions of the OpenAPI spec in the browser. ### Changed - Support for [CommonMark 0.29 instead of CommonMark 0.28](https://spec.commonmark.org/0.29/changes.html) @@ -25,8 +25,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added attribute `roles` to Item assets (also Asset definitions extension), to be used similarly to Link `rel`. - Updated API yaml to clarify bbox filter should be implemented without brackets. Example: `bbox=160.6,-55.95,-170,-25.89` - Collection `summaries` merge array fields now. +- Several fields have been moved from extensions or item fields to the [Common Metadata fields](item-spec/common-metadata.md): + - `eo:platform` / `sar:platform` => `platform` + - `eo:instrument` / `sar:instrument` => `instruments`, also changed from string to array of strings + - `eo:constellation` / `sar:constellation` => `constellation` + - `dtr:start_datetime` => `start_datetime` + - `dtr:end_datetime` => `end_datetime` - Extensions: - - [datetime-range extension](extensions/datetime-range/README.md): Removed extension prefix from example and schema - Data Cube extension: Changed allowed formats (removed PROJ string, added PROJJSON / WKT2) for reference systems - [Checksum extension](extensions/checksum/README.md) is now using self-identifiable hashes ([Multihash](https://github.com/multiformats/multihash)) - Changed `sar:type` to `sar:product_type` and `sar:polarization` to `sar:polarizations` in the [SAR extension](extensions/sar/README.md) @@ -42,17 +47,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Removed - `version` field in STAC Collections. Use [Version Extension](extensions/version/README.md) instead - `summaries` field from Catalogs. Use Collections instead +- Asset Types (pre-defined values for the keys of individual assets, *not* media types) in Items. Use the asset's `roles` instead. +- `license` field doesn't allow SPDX expressions any longer. Use `various` and links instead. - Extensions: - - `gsd` and `accuracy` from `eo:bands` in the [EO extension](extensions/eo/README.md) - `eo:platform`, `eo:instrument`, `eo:constellation` from EO extension, and `sar:platform`, `sar:instrument`, `sar:constellation` from the [SAR extension](extensions/sar/README.md) + - Removed from EO extension field `eo:epsg` in favor of `proj:epsg` + - `gsd` and `accuracy` from `eo:bands` in the [EO extension](extensions/eo/README.md) - `sar:absolute_orbit` and `sar:center_wavelength` fields from the [SAR extension](extensions/sar/README.md) - `data_type` and `unit` from the `sar:bands` object in the [SAR extension](extensions/sar/README.md) - - `dtr` extension prefix from example and schema in [datetime-range extension](extensions/datetime-range/README.md) -- Asset Types (pre-defined values for the keys of individual assets, *not* media types) in Items. Use the asset's `roles` instead. -- `license` field doesn't allow SPDX expressions any longer. Use `various` and links instead. + - Datetime Range (`dtr`) extension. Use the [Common Metadata fields](item-spec/common-metadata.md) instead. - STAC API: - `next` from the search metadata and query parameter, added POST body and headers to the links for paging support -- Removed from EO extension field `eo:epsg` in favor of `proj:epsg` ### Fixed diff --git a/collection-spec/collection-spec.md b/collection-spec/collection-spec.md index 1a50f65b7..95b4cfc03 100644 --- a/collection-spec/collection-spec.md +++ b/collection-spec/collection-spec.md @@ -88,7 +88,7 @@ The object describes the temporal extents of the Collection. ### Provider Object -The object provides information about a provider. A provider is any of the organizations that captured or processed the content of the collection and therefore influenced the data offered by this collection. May also include information about the final storage provider hosting the data. +The object provides information about a provider. A provider is any of the organizations that captures or processes the content of the collection and therefore influences the data offered by this collection. May also include information about the final storage provider hosting the data. | Field Name | Type | Description | | ----------- | --------- | ------------------------------------------------------------ | diff --git a/collection-spec/examples/landsat-item.json b/collection-spec/examples/landsat-item.json index aee45dc71..8259fa516 100644 --- a/collection-spec/examples/landsat-item.json +++ b/collection-spec/examples/landsat-item.json @@ -3,7 +3,6 @@ "stac_extensions": [ "commons", "eo", - "instrument", "https://example.com/stac/landsat-extension/1.0/schema.json" ], "id": "LC08_L1TP_107018_20181001_20181001_01_RT", diff --git a/collection-spec/json-schema/collection.json b/collection-spec/json-schema/collection.json index 6f0f62da3..7f97368b2 100644 --- a/collection-spec/json-schema/collection.json +++ b/collection-spec/json-schema/collection.json @@ -54,7 +54,8 @@ }, "license": { "title": "Collection License Name", - "type": "string" + "type": "string", + "pattern": "^[\\w\\-\\.\\+]+$" }, "providers": { "type": "array", @@ -65,7 +66,7 @@ "type": "string" }, "description": { - "title": "Provider description", + "title": "Organization description", "type": "string" }, "roles": { @@ -82,7 +83,7 @@ } }, "url": { - "title": "Homepage", + "title": "Organization homepage", "type": "string", "format": "url" } diff --git a/extensions/README.md b/extensions/README.md index ee3df450e..a36c45f33 100644 --- a/extensions/README.md +++ b/extensions/README.md @@ -51,9 +51,7 @@ An extension can add new fields to STAC entities (content extension), or can add | [Checksum](checksum/README.md) (`checksum`) | Item, Catalog, Collection | Provides a way to specify file checksums for assets and links in Items, Catalogs and Collections. | *Proposal* | | [Commons](commons/README.md) (-) | Item, Collection | Provides a way to specify data fields in a collection that are common across the STAC Items in that collection, so that each does not need to repeat all the same information. | *Proposal* | | [Data Cube](datacube/README.md) (`cube`) | Item, Collection | Data Cube related metadata, especially to describe their dimensions. | *Proposal* | -| [Datetime Range](datetime-range/README.md) (-) | Item | An extension to provide datetime ranges with a start and an end datetime stamp in a consistent way. | *Proposal* | | [EO](eo/README.md) (`eo`) | Item | Covers electro-optical data that represents a snapshot of the earth for a single date and time. It could consist of multiple spectral bands, for example visible bands, infrared bands, red edge bands and panchromatic bands. The extension provides common fields like bands, cloud cover, gsd and more. | *Pilot* | -| [Instrument](instrument/README.md) (-) | Item | Adds metadata specifying a platform and instrument used in a data collection mission. | *Proposal* | | [Label](label/README.md) (`label`) | Item | Items that relate labeled AOIs with source imagery | *Proposal* | | [Point Cloud](pointcloud/README.md) (`pc`) | Item | Provides a way to describe point cloud datasets. The point clouds can come from either active or passive sensors, and data is frequently acquired using tools such as LiDAR or coincidence-matched imagery. | *Proposal* | | [Projection](projection/README.md) (`proj`) | Item | Provides a way to describe items whose assets are in a geospatial projection. | *Proposal* | diff --git a/extensions/commons/README.md b/extensions/commons/README.md index edabb6d07..6b4b32ebc 100644 --- a/extensions/commons/README.md +++ b/extensions/commons/README.md @@ -75,7 +75,7 @@ An incomplete item: ``` { "stac_version": "0.8.1", - "stac_extensions": ["commons", "eo", "instrument", "sat"], + "stac_extensions": ["commons", "eo", "sat"], "type": "Feature", "id": "LC08_L1TP_107018_20181001_20181001_01_RT", "bbox": [...], @@ -97,7 +97,7 @@ The merged Item then looks like this: ``` { "stac_version": "0.8.1", - "stac_extensions": ["eo", "instrument", "sat"], + "stac_extensions": ["eo", "sat"], "type": "Feature", "id": "LC08_L1TP_107018_20181001_20181001_01_RT", "bbox": [...], diff --git a/extensions/commons/examples/landsat-item.json b/extensions/commons/examples/landsat-item.json index c0d7e8fbf..725f8c944 100644 --- a/extensions/commons/examples/landsat-item.json +++ b/extensions/commons/examples/landsat-item.json @@ -3,7 +3,6 @@ "stac_extensions": [ "commons", "eo", - "instrument", "sat", "https://example.com/stac/landsat-extension/1.0/schema.json" ], diff --git a/extensions/datetime-range/README.md b/extensions/datetime-range/README.md deleted file mode 100644 index 6d0068998..000000000 --- a/extensions/datetime-range/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Datetime Range Extension Specification (`-`) - -**Extension [Maturity Classification](../README.md#extension-maturity): Stable** - -An extension to provide datetime ranges with a start and an end datetime stamp in a consistent way. -While a STAC item can have a nominal datetime describing the capture, this extension allows an item to have a range of capture datetimes. An example of this is the [MODIS 16 day vegetation index product.](https://lpdaac.usgs.gov/products/mod13q1v006/). The datetime property in a STAC item and this extension are not mutually exclusive. - -This is a core extension and does not require a prefix when used. - -- [Example](examples/example-video.json) -- [JSON Schema](json-schema/schema.json) - -## Item fields - -| Field Name | Type | Description | -| ------------------ | ------ | ------------------------------------------------------------ | -| start_datetime | string | **REQUIRED.** The first or start date and time for the item, in UTC. It is formatted as `date-time` according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). | -| end_datetime | string | **REQUIRED.** The last or end date and time for the item, in UTC. It is formatted as `date-time` according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). | - -**Note:** All STAC Items that use this extension MUST include both fields, which enables a user to -search STAC records by the provided times. - -## Implementations - -3 proprietary implementations diff --git a/extensions/datetime-range/json-schema/schema.json b/extensions/datetime-range/json-schema/schema.json deleted file mode 100644 index 853cb8749..000000000 --- a/extensions/datetime-range/json-schema/schema.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", - "title": "Datetime Range Extension", - "description": "STAC Datetime Range Extension to a STAC Item.", - "allOf": [ - { - "$ref": "../../../master/item-spec/json-schema/item.json" - }, - { - "$ref": "#/definitions/datetime-range" - } - ], - "definitions": { - "datetime-range": { - "type": "object", - "required": [ - "properties" - ], - "properties": { - "properties": { - "type": "object", - "required": [ - "start_datetime", - "end_datetime" - ], - "properties": { - "start_datetime": { - "title": "Start Date and Time", - "description": "The searchable start date/time of the assets, in UTC (Formatted in RFC 3339) ", - "type": "string", - "format": "date-time", - }, - "end_datetime": { - "title": "End Date and Time", - "description": "The searchable end date/time of the assets, in UTC (Formatted in RFC 3339) ", - "type": "string", - "format": "date-time", - } - } - } - } - } - } -} \ No newline at end of file diff --git a/extensions/eo/README.md b/extensions/eo/README.md index d85e6ea5f..e6bc2d4b0 100644 --- a/extensions/eo/README.md +++ b/extensions/eo/README.md @@ -18,7 +18,7 @@ A lot of EO data will have common metadata across many Items. It is not necessary, but recommended to use the [Commons extension](../commons/README.md) (see chapter "Placing common fields in Collections"). -If the data has been collected by a satellite, it is strongly recommended to use the [`sat` extension](../sat/README.md), which in turn requires the [`instrument` extension](../instrument/README.md). If the data has been collected on an airborne platform is is strongly recommended to use the [`instrument` extension](../instrument/README.md). +If the data has been collected by a satellite, it is strongly recommended to use the [`sat` extension](../sat/README.md), which in turn requires the [Instrument Fields](../../item-spec/common-metadata.md#instrument). If the data has been collected on an airborne platform it is strongly recommended to use the [Instrument Fields](../../item-spec/common-metadata.md#instrument). - [Example (Landsat 8)](examples/example-landsat8.json) - [JSON Schema](json-schema/schema.json) @@ -204,7 +204,6 @@ the eo:bands portion is still being fleshed out. The [extensions page](../README.md) gives an overview about related extensions. Of particular relevance to EO data: * the [Sat Extension Specification](../sat/README.md) to describe SAR data collected from a satellite. -* the [Instrument Extension Specification](../instrument/README.md) is required when using the EO extension, which contains fields about the sensor and platform used to collect the data. It is required when using the Sat extension. ### Placing common fields in Collections A lot of EO data will have common metadata across many Items. It is not necessary, but recommended diff --git a/extensions/eo/examples/example-landsat8.json b/extensions/eo/examples/example-landsat8.json index a146fbf99..5f5993013 100644 --- a/extensions/eo/examples/example-landsat8.json +++ b/extensions/eo/examples/example-landsat8.json @@ -2,7 +2,6 @@ "stac_version": "0.9.0", "stac_extensions": [ "eo", - "instrument", "https://example.com/stac/landsat-extension/1.0/schema.json" ], "id": "LC08_L1TP_107018_20181001_20181001_01_RT", diff --git a/extensions/instrument/README.md b/extensions/instrument/README.md deleted file mode 100644 index 4c3af1d39..000000000 --- a/extensions/instrument/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# Instrument Extension Specification (-) - -**Extension [Maturity Classification](../README.md#extension-maturity): Proposal** - -This document explains the fields of the Instrument Extension to a STAC Item, which adds metadata specifying a platform and instrument used in a data collection mission. It will often be combined with other extensions that describe the actual data, such as the `eo` or `sar` extensions. In many instances, the instrument fields added here will share common properties across all of the Items. It is not necessary, but recommended to place common fields in [STAC Collections](../../collection-spec/collection-spec.md) using the [Commons extension](../commons/). - -- [Example (Landsat 8)](examples/example-landsat8.json) -- [JSON Schema](json-schema/schema.json) - -## Item fields - -| Field Name | Type | Description | -| ------------- | -------- | ----------- | -| platform | string | **REQUIRED.** Unique name of the specific platform to which the instrument is attached. | -| instruments | [string] | **REQUIRED.** Name of instrument or sensor used (e.g., MODIS, ASTER, OLI, Canon F-1). | -| constellation | string | Name of the constellation to which the platform belongs. | -| mission | string | Name of the mission for which data is collected. | - -**platform** is the unique name of the specific platform the instrument is attached to. For satellites this would -be the name of the satellite, whereas for drones this would be a unique name for the drone. Examples include -`landsat-8` (Landsat-8), `sentinel-2a` and `sentinel-2b` (Sentinel-2), `terra` and `aqua` (part of NASA EOS, -carrying the MODIS instruments), `mycorp-uav-034` (hypothetical drone name), and `worldview02` -(Maxar/DigitalGlobe WorldView-2). - -**instruments** is an array of all the sensors used in the creation of the data. For example, data from the Landsat-8 platform is collected with the OLI sensor as well as the TIRS sensor, but the data is distributed together so would be specified as `['oli', 'tirs']`. Other instrument examples include `msi` (Sentinel-2), `aster` (Terra), and `modis` (Terra and Aqua), `c-sar` (Sentinel-1) and `asar` (Envisat). - -**constellation** is the name of a logical collection one or more platforms that have similar payloads and have -their orbits arranged in a way to increase the temporal resolution of acquisitions of data with similar geometric and -radiometric characteristics. This field allows users to search for related data sets without needing to specify which -specific platform the data came from, for example, from either of the Sentinel-2 satellites. Examples include `landsat-8` -(Landsat-8, a constellation consisting of a single platform), `sentinel-2` ([Sentinel-2](https://www.esa.int/Our_Activities/Observing_the_Earth/Copernicus/Sentinel-2/Satellite_constellation)), -`rapideye` (operated by Planet Labs), and `modis` (NASA EOS satellites Aqua and Terra). In the case of `modis`, this -is technically referring to a pair of sensors on two different satellites, whose data is combined into a series of -related products. Additionally, the Aqua satellite is technically part of the A-Train constellation and Terra is not -part of a constellation, but these combine to form the logical collection referred to as MODIS. - -**mission** is the name of the mission or campaign for collecting data. This could be a discrete set of data collections over a period of time (such as collecting drone imagery), or could be a set of tasks of related tasks from a satellite data collection. - - -Example: -``` -{ - "stac_version": "0.9.0", - "stac_extensions": [ - "sat" - ], - "id": "20171110", - "type": "Feature", - ... - "properties": { - "platform": "mysatellite", - "instruments": ["mycamera1", "mycamera2"], - "constellation": "allmysatellites", - "mission": "mymission" - } -} -``` - -## Implementations - - - -## Extensions - -The [extensions page](../README.md) gives an overview about related extensions. \ No newline at end of file diff --git a/extensions/instrument/examples/example-landsat8.json b/extensions/instrument/examples/example-landsat8.json deleted file mode 100644 index b0af523bd..000000000 --- a/extensions/instrument/examples/example-landsat8.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "stac_version": "0.9.0", - "stac_extensions": [ - "instrument" - ], - "id": "LC08_L1TP_107018_20181001", - "collection": "landsat-8-l1", - "type": "Feature", - "bbox": [ - 148.13933, - 59.51584, - 152.52758, - 60.63437 - ], - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - 152.52758, - 60.63437 - ], - [ - 149.1755, - 61.19016 - ], - [ - 148.13933, - 59.51584 - ], - [ - 151.33786, - 58.97792 - ], - [ - 152.52758, - 60.63437 - ] - ] - ] - }, - "properties": { - "datetime": "2018-10-01T01:08:32.033Z", - "platform": "landsat-8", - "instruments": ["oli", "tirs"], - "constellation": "landsat", - "mission": "LDCM" - }, - "assets": { - "blue": { - "href": "https://landsat-pds.s3.amazonaws.com/c1/L8/107/018/LC08_L1TP_107018_20181001_20181001_01_RT/LC08_L1TP_107018_20181001_20181001_01_RT_B2.TIF", - "type": "image/tiff; application=geotiff", - "title": "Band 2 (blue)" - }, - "green": { - "href": "https://landsat-pds.s3.amazonaws.com/c1/L8/107/018/LC08_L1TP_107018_20181001_20181001_01_RT/LC08_L1TP_107018_20181001_20181001_01_RT_B3.TIF", - "type": "image/tiff; application=geotiff", - "title": "Band 3 (green)" - }, - "red": { - "href": "https://landsat-pds.s3.amazonaws.com/c1/L8/107/018/LC08_L1TP_107018_20181001_20181001_01_RT/LC08_L1TP_107018_20181001_20181001_01_RT_B4.TIF", - "type": "image/tiff; application=geotiff", - "title": "Band 4 (red)" - }, - "thumbnail": { - "href": "https://landsat-pds.s3.amazonaws.com/c1/L8/107/018/LC08_L1TP_107018_20181001_20181001_01_RT/LC08_L1TP_107018_20181001_20181001_01_RT_thumb_large.jpg", - "title": "Thumbnail image", - "type": "image/jpeg" - }, - "index": { - "href": "https://landsat-pds.s3.amazonaws.com/c1/L8/107/018/LC08_L1TP_107018_20181001_20181001_01_RT/index.html", - "type": "text/html", - "title": "HTML index page" - } - }, - "links": [ - { - "rel": "collection", - "href": "http://landsat-stac.s3.amazonaws.com/landsat-8-l1/catalog.json" - } - ] -} \ No newline at end of file diff --git a/extensions/instrument/json-schema/schema.json b/extensions/instrument/json-schema/schema.json deleted file mode 100644 index 4163aeff5..000000000 --- a/extensions/instrument/json-schema/schema.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", - "title": "Instrument Extension", - "description": "STAC Instrument Extension to a STAC Item.", - "allOf": [ - { - "$ref": "../../../item-spec/json-schema/item.json" - }, - { - "$ref": "#/definitions/instrument" - } - ], - "definitions": { - "instrument": { - "type": "object", - "required": [ - "properties" - ], - "properties": { - "properties": { - "type": "object", - "required": [ - "platform", - "instruments" - ], - "properties": { - "platform": { - "title": "Platform", - "type": "string" - }, - "instruments": { - "title": "Instruments", - "type": "array", - "items": { - "type": "string" - } - }, - "constellation": { - "title": "Constellation", - "type": "string" - }, - "mission": { - "title": "Mission", - "type": "string" - } - } - } - } - } - } -} \ No newline at end of file diff --git a/extensions/label/README.md b/extensions/label/README.md index bb456ac14..721d3b83a 100644 --- a/extensions/label/README.md +++ b/extensions/label/README.md @@ -40,7 +40,7 @@ Like other content extensions, the Label extension adds additional fields to a S Some additional notes are given here for some of the core STAC Item fields and what they represent for label. - **bbox** and **geometry**: The bounding box and the geometry of a Label Item represents the region for which the label(s) is/are valid. This could be the extent of all the AOIs in the dataset, or could be the region the provider believes the label is representative. -- **properties.datetime**: The datetime of a Label Item is the nominal datetime for which the label applies, typically this is the datetime of the source imagery used to generate the labels. If the label applies over a range of datetimes (e.g., generated from multiple source images) then use the datetime-range (dtr) extension to indicate start and end datetimes. +- **properties.datetime**: The datetime of a Label Item is the nominal datetime for which the label applies, typically this is the datetime of the source imagery used to generate the labels. If the label applies over a range of datetimes (e.g., generated from multiple source images) then use the [Date and Time Range fields](../../item-spec/common-metadata.md#date-and-time-range) to indicate start and end datetimes. - **assets**: The label assets are GeoJSON FeatureCollection assets containing the actual label features. As with the core STAC Item a thumbnail asset is also strongly encouraged. ### New Item properties @@ -163,4 +163,5 @@ The SpaceNet Challenge Round 2 dataset has a [STAC catalog](https://spacenet-dat [PySTAC](https://pystac.readthedocs.io/en/latest/) supports [reading/writing](https://pystac.readthedocs.io/en/latest/tutorials/how-to-create-stac-catalogs.html#Adding-label-items-to-the-Spacenet-5-catalog) STAC collections according to this extension. ## Extensions -Label Items may often use the `datetime-range` extension if the label set applies over a range of dates. While the EO extension doesn't make sense within a Label Item itself, most Label Items will link to source data which will frequently use the EO Extension. The [extensions page](../README.md) gives an overview about these and other extensions. +While the EO extension doesn't make sense within a Label Item itself, most Label Items will link to source data which will frequently use the EO Extension. +The [extensions page](../README.md) gives an overview about these and other extensions. diff --git a/extensions/sar/README.md b/extensions/sar/README.md index 4866e41d0..67faf3f6e 100644 --- a/extensions/sar/README.md +++ b/extensions/sar/README.md @@ -5,9 +5,11 @@ This document explains the fields of the STAC Synthetic-Aperture Radar (SAR) Extension to a STAC Item. SAR data is considered to be data that represents a snapshot of the earth for a single date and time taken by a synthetic-aperture radar system such as Sentinel-1, RADARSAT or EnviSAT. -It is not necessary, but recommended to use the [Commons extension](../commons/README.md) (see chapter "Placing common fields in Collections"). +If the data has been collected by a satellite, it is strongly recommended to use the [`sat` extension](../sat/README.md), which in turn requires the [Instrument Fields](../../item-spec/common-metadata.md#instrument). If the data has been collected on an airborne platform it is strongly recommended to use the [Instrument Fields](../../item-spec/common-metadata.md#instrument). + +To describe frame start and end times, use the [Date and Time Range fields](../../item-spec/common-metadata.md#date-and-time-range). -If the data has been collected by a satellite, it is strongly recommended to use the [`sat` extension](../sat/README.md), which in turn requires the [`instrument` extension](../instrument/README.md). If the data has been collected on an airborne platform is is strongly recommended to use the [`instrument` extension](../instrument/README.md). +It is not necessary, but recommended to use the [Commons extension](../commons/README.md) (see chapter "Placing common fields in Collections"). - [Examples](examples/) (for example [Sentinel-1](examples/sentinel1.json) and [Envisat](examples/envisat.json)) - [JSON Schema](json-schema/schema.json) @@ -68,7 +70,8 @@ properties. The table below shows the common name based on the wavelength and fr ### Date and Time -In SAR, you usually have frame start and end time. To describe this information it is recommended to use the [Datetime Range Extension Specification](../datetime-range/README.md). The center time of the frame should be specified with the `datetime` property for [STAC Items](../../item-spec/item-spec.md). +In SAR, you usually have frame start and end time. To describe this information it is recommended to use the [Date and Time Range fields](../../item-spec/common-metadata.md#date-and-time-range). +The center time of the frame should be specified with the `datetime` property for [STAC Items](../../item-spec/item-spec.md). ### Item [`Asset Object`](../../item-spec/item-spec.md#asset-object) fields | Field Name | Type | Description | @@ -79,9 +82,7 @@ In SAR, you usually have frame start and end time. To describe this information The [extensions page](../README.md) gives an overview about related extensions. Of particular relevance to SAR data: -* the [Datetime Range Extension Specification](../datetime-range/README.md) to describe frame start and end time. * the [Sat Extension Specification](../sat/README.md) to describe SAR data collected from a satellite. -* the [Instrument Extension Specification](../instrument/README.md) which contains fields about the sensor and platform used to collect the data. The Instrument extension is required when using the Sat extension. ### Placing common fields in Collections A lot of SAR data will have common metadata across many Items. It is not necessary, but recommended diff --git a/extensions/sar/examples/envisat.json b/extensions/sar/examples/envisat.json index 12dd6697b..069dc2541 100644 --- a/extensions/sar/examples/envisat.json +++ b/extensions/sar/examples/envisat.json @@ -1,10 +1,8 @@ { "stac_version": "0.9.0", "stac_extensions": [ - "datetime-range", "sat", - "sar", - "instrument" + "sar" ], "id": "ASA_GM1_1PNPDE20090520_023957_000001022079_00118_37747_3607", "type": "Feature", diff --git a/extensions/sar/examples/sentinel1.json b/extensions/sar/examples/sentinel1.json index 7e83c5dcf..273a10bb9 100644 --- a/extensions/sar/examples/sentinel1.json +++ b/extensions/sar/examples/sentinel1.json @@ -2,10 +2,8 @@ "stac_version": "0.9.0", "stac_extensions": [ "checksum", - "datetime-range", "sar", - "sat", - "instrument" + "sat" ], "id": "S1A_EW_GRDM_1SSH_20181103T235855_20181103T235955_024430_02AD5D_5616", "type": "Feature", diff --git a/extensions/sat/README.md b/extensions/sat/README.md index d34e6c531..2dd49c64f 100644 --- a/extensions/sat/README.md +++ b/extensions/sat/README.md @@ -4,7 +4,7 @@ This document explains the fields of the Satellite Extension to a STAC Item. Sat adds metadata related to a satellite that carries an instrument for collecting data. It will often be combined with other extensions that describe the actual data, such as the `eo` or `sar` extensions. In many instances, satellite data will share common properties about the spacecraft across all of the Items. It is not necessary, but recommended to place common fields in [STAC Collections](../../collection-spec/collection-spec.md) using the [Commons extension](../commons/). -The Satellite extension requires the (Instrument extension)[../instrument/README.md]. +The Satellite extension requires the [Instrument Fields](../../item-spec/common-metadata.md#instrument). - [Example (Landsat 8)](examples/example-landsat8.json) - [JSON Schema](json-schema/schema.json) @@ -39,8 +39,7 @@ Example: { "stac_version": "0.9.0", "stac_extensions": [ - "sat", - "instrument" + "sat" ], "id": "20171110", "type": "Feature", @@ -66,6 +65,4 @@ Example: ## Extensions -The [extensions page](../README.md) gives an overview about related extensions. Of particular relevance to sat data: - -* the [Instrument Extension Specification](../instrument/README.md), required when using the `sat` extension, which contains fields about the sensor and platform used to collect the data. \ No newline at end of file +The [extensions page](../README.md) gives an overview about related extensions. Of particular relevance to sat data. \ No newline at end of file diff --git a/extensions/sat/examples/example-landsat8.json b/extensions/sat/examples/example-landsat8.json index 7ade28245..1be6daee6 100644 --- a/extensions/sat/examples/example-landsat8.json +++ b/extensions/sat/examples/example-landsat8.json @@ -1,8 +1,7 @@ { "stac_version": "0.9.0", "stac_extensions": [ - "sat", - "instrument" + "sat" ], "id": "LC08_L1TP_107018_20181001", "collection": "landsat-8-l1", diff --git a/extensions/scientific/examples/item.json b/extensions/scientific/examples/item.json index e51f15426..d4c5a4f28 100644 --- a/extensions/scientific/examples/item.json +++ b/extensions/scientific/examples/item.json @@ -1,6 +1,9 @@ { "stac_version": "0.8.1", - "stac_extensions": ["scientific","datetime-range","checksum"], + "stac_extensions": [ + "scientific", + "checksum" + ], "id": "MERRAclim.2_5m_min_80s", "type": "Feature", "geometry": { diff --git a/item-spec/README.md b/item-spec/README.md index bca45fc52..7ee46d77a 100644 --- a/item-spec/README.md +++ b/item-spec/README.md @@ -11,6 +11,9 @@ endpoints of a `/search` endpoint. **Item Specification:** The main definition of the STAC Item specification is in *[item-spec.md](item-spec.md)*. It includes an overview and an in-depth explanation of the fields. +**Common Metadata:** A set of commonly used metadata fields for STAC Items is listed in +*[common-metadata.md](common-metadata.md)*. + **ItemCollection Specification:** The main definition of the STAC ItemCollection specification is in *[itemcollection-spec.md](itemcollection-spec.md)*. It includes an overview and an in-depth explanation of the fields. diff --git a/item-spec/common-metadata.md b/item-spec/common-metadata.md new file mode 100644 index 000000000..d7ee28319 --- /dev/null +++ b/item-spec/common-metadata.md @@ -0,0 +1,136 @@ +# STAC Common Metadata + +* [Date and Time](#date-and-time) +* [Licensing](#licensing) +* [Provider](#provider) +* [Instrument](#instrument) +* [Metadata](#metadata) + +Various *examples* are available in the folder [`examples`](examples/). +*JSON Schemas* can be found in the folder [`json-schema`](json-schema/). + +## Date and Time + +Fields to provide additional temporal information such as ranges with a start and an end datetime stamp. + +### Date and Time Range + +- [JSON Schema](json-schema/datetimerange.json) + +While a STAC item can have a nominal datetime describing the capture, this extension allows an item to have a range +of capture datetimes. An example of this is the [MODIS 16 day vegetation index product.](https://lpdaac.usgs.gov/products/mod13q1v006/). +The datetime property in a STAC item and these fields are not mutually exclusive. + +**Important:** Using one of the fields REQUIRES to include the other field as well to enable a user to search STAC records by the provided times. So if you use `start_datetime` you need to add `end_datetime` and vice-versa. + +| Field Name | Type | Description | +| -------------- | ------ | ------------------------------------------------------------ | +| start_datetime | string | The first or start date and time for the item, in UTC. It is formatted as `date-time` according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). | +| end_datetime | string | The last or end date and time for the item, in UTC. It is formatted as `date-time` according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). | + + +## Licensing + +Information about the license(s) of the data, which is not necessarily the same license that applies to the metadata. +**Licensing information should be defined at the Collection level if possible.** + +- [JSON Schema](json-schema/licensing.json) + +| Field Name | Type | Description | +| ---------- | ------ | ----------- | +| license | string | Item's license(s), either a SPDX [License identifier](https://spdx.org/licenses/), `various` if multiple licenses apply or `proprietary` for all other cases. Should be defined at the Collection level if possible. | + +**license**: Data license(s) as a SPDX [License identifier](https://spdx.org/licenses/). Alternatively, use +`proprietary` (see below) if the license is not on the SPDX license list or `various` if multiple licenses apply. +In all cases links to the license texts SHOULD be added, see the [`license` link relation type](#relation-types). +If no link to a license is included and the `license` field is set to `proprietary`, the collection is private, +and consumers have not been granted any explicit right to use the data. + +#### Relation types + +| Type | Description | +| ------------ | ------------------------------------------------------------ | +| license | The license URL(s) for the item SHOULD be specified if the `license` field is set to `proprietary` or `various`. If there is no public license URL available, it is RECOMMENDED to supplement the STAC Item with the license text in a separate file and link to this file. | + + +## Provider + +Information about the organizations capturing, producing, processing, hosting or publishing this data. +**Provider information should be defined at the Collection level if possible.** + +- [JSON Schema](json-schema/provider.json) + +| Field Name | Type | Description | +| ---------- | ------ | ----------- | +| providers | [[Provider Object](#provider-object)] | A list of providers, which may include all organizations capturing or processing the data or the hosting provider. Providers should be listed in chronological order with the most recent provider being the last element of the list. | + +#### Provider Object + +The object provides information about a provider. A provider is any of the organizations that captures or processes the content of the assets and therefore influences the data offered by the STAC catalog. May also include information about the final storage provider hosting the data. + +| Field Name | Type | Description | +| ----------- | --------- | ------------------------------------------------------------ | +| name | string | **REQUIRED.** The name of the organization or the individual. | +| description | string | Multi-line description to add further provider information such as processing details for processors and producers, hosting details for hosts or basic contact information. [CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich text representation. | +| roles | [string] | Roles of the provider. Any of `licensor`, `producer`, `processor` or `host`. | +| url | string | Homepage on which the provider describes the dataset and publishes contact information. | + +**roles**: The provider's role(s) can be one or more of the following elements: + +* *licensor*: The organization that is licensing the dataset under the license specified in the collection's `license` field. +* *producer*: The producer of the data is the provider that initially captured and processed the source data, e.g. ESA for Sentinel-2 data. +* *processor*: A processor is any provider who processed data to a derived product. +* *host*: The host is the actual provider offering the data on their storage. There should be no more than one host, specified as last element of the list. + + +## Instrument + +Adds metadata specifying a platform and instrument used in a data collection mission. It will often be combined with +other extensions that describe the actual data, such as the `eo` or `sar` extensions. + +- [JSON Schema](json-schema/instrument.json) + +| Field Name | Type | Description | +| ------------- | -------- | ----------- | +| platform | string | Unique name of the specific platform to which the instrument is attached. | +| instruments | [string] | Name of instrument or sensor used (e.g., MODIS, ASTER, OLI, Canon F-1). | +| constellation | string | Name of the constellation to which the platform belongs. | +| mission | string | Name of the mission for which data is collected. | + +**platform** is the unique name of the specific platform the instrument is attached to. For satellites this would +be the name of the satellite, whereas for drones this would be a unique name for the drone. Examples include +`landsat-8` (Landsat-8), `sentinel-2a` and `sentinel-2b` (Sentinel-2), `terra` and `aqua` (part of NASA EOS, +carrying the MODIS instruments), `mycorp-uav-034` (hypothetical drone name), and `worldview02` +(Maxar/DigitalGlobe WorldView-2). + +**instruments** is an array of all the sensors used in the creation of the data. For example, data from the Landsat-8 +platform is collected with the OLI sensor as well as the TIRS sensor, but the data is distributed together so would be +specified as `['oli', 'tirs']`. Other instrument examples include `msi` (Sentinel-2), `aster` (Terra), and `modis` +(Terra and Aqua), `c-sar` (Sentinel-1) and `asar` (Envisat). + +**constellation** is the name of a logical collection of one or more platforms that have similar payloads and have +their orbits arranged in a way to increase the temporal resolution of acquisitions of data with similar geometric and +radiometric characteristics. This field allows users to search for related data sets without the need to specify which +specific platform the data came from, for example, from either of the Sentinel-2 satellites. Examples include `landsat-8` +(Landsat-8, a constellation consisting of a single platform), `sentinel-2` +([Sentinel-2](https://www.esa.int/Our_Activities/Observing_the_Earth/Copernicus/Sentinel-2/Satellite_constellation)), +`rapideye` (operated by Planet Labs), and `modis` (NASA EOS satellites Aqua and Terra). In the case of `modis`, this +is technically referring to a pair of sensors on two different satellites, whose data is combined into a series of +related products. Additionally, the Aqua satellite is technically part of the A-Train constellation and Terra is not +part of a constellation, but these are combined to form the logical collection referred to as MODIS. + +**mission** is the name of the mission or campaign for collecting data. This could be a discrete set of data collections +over a period of time (such as collecting drone imagery), or could be a set of tasks of related tasks from a satellite +data collection. + + +## Metadata + +Fields to describe the metadata file itself. These fields do NOT describe the assets. + +- [JSON Schema](json-schema/metadata.json) + +| Field Name | Type | Description | +| ---------- | ------ | ----------- | +| created | string | Creation date and time of the metadata file. This is NOT the timestamp the asset was created. MUST be formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). | +| updated | string | Date and time the metadata file was updated last. This is NOT the timestamp the asset was updated last. MUST be formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). | \ No newline at end of file diff --git a/extensions/datetime-range/examples/example-video.json b/item-spec/examples/datetimerange.json similarity index 96% rename from extensions/datetime-range/examples/example-video.json rename to item-spec/examples/datetimerange.json index e1fbbc81c..c06efc06a 100644 --- a/extensions/datetime-range/examples/example-video.json +++ b/item-spec/examples/datetimerange.json @@ -1,8 +1,6 @@ { "stac_version": "0.8.1", - "stac_extensions": [ - "datetime-range" - ], + "stac_extensions": [], "type":"Feature", "id":"half-moon-bay/video-2018-01-01-0001", "bbox":[ diff --git a/item-spec/examples/digitalglobe-sample.json b/item-spec/examples/digitalglobe-sample.json index 0e092236d..f2c54684c 100644 --- a/item-spec/examples/digitalglobe-sample.json +++ b/item-spec/examples/digitalglobe-sample.json @@ -3,7 +3,6 @@ "stac_extensions": [ "eo", "proj", - "instrument", "https://example.digitalglobe.com/stac/1.0/schema.json" ], "id": "103001004B316600_P002_MUL", diff --git a/item-spec/examples/sample-full.json b/item-spec/examples/sample-full.json index 4ace8f308..f670882b8 100644 --- a/item-spec/examples/sample-full.json +++ b/item-spec/examples/sample-full.json @@ -20,7 +20,7 @@ ] }, "properties": { - "datetime": "2016-05-03T13:22:30.040Z", + "datetime": "2016-05-03T13:22:30Z", "title": "A CS3 item", "license": "PDDL-1.0", "providers": [ @@ -33,6 +33,8 @@ "url": "https://cool-sat.com/" } ], + "created": "2016-05-04T00:00:01Z", + "updated": "2017-01-01T00:30:55Z", "sat:sun_azimuth_angle": 168.7, "eo:cloud_cover": 0.12, "sat:off_nadir_angle": 1.4, diff --git a/item-spec/examples/sentinel2-sample.json b/item-spec/examples/sentinel2-sample.json index 3d33178fb..ca29306c3 100644 --- a/item-spec/examples/sentinel2-sample.json +++ b/item-spec/examples/sentinel2-sample.json @@ -2,8 +2,7 @@ "stac_version": "0.8.1", "stac_extensions": [ "eo", - "proj", - "instrument" + "proj" ], "type": "Feature", "id": "S2A_OPER_MSI_L2A_TL_SGS__20180524T190423_A015250_T26SKD_N02.08", diff --git a/item-spec/item-spec.md b/item-spec/item-spec.md index b018b6663..cccce45c9 100644 --- a/item-spec/item-spec.md +++ b/item-spec/item-spec.md @@ -74,11 +74,9 @@ It is recommended to add multiple attributes for related values instead of a nes | Field Name | Type | Description | | ---------- | ------ | ------------------------------------------------------------ | | datetime | string | **REQUIRED.** The searchable date and time of the assets, in UTC. It is formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). | -| license | string | Item's license(s), either a SPDX [License identifier](https://spdx.org/licenses/), `various` if multiple licenses apply or `proprietary` for all other cases. Should be defined at the Collection level if possible. | -| providers | [[Provider Object](#provider-object)] | A list of providers, which may include all organizations capturing or processing the data or the hosting provider. Providers should be listed in chronological order with the most recent provider being the last element of the list. Should be defined at the Collection level if possible. | | title | string | A human readable title describing the item. | -| created | string | Creation date and time of this metadata file. This is NOT the timestamp the asset was created. MUST be formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). | -| updated | string | Date and time this metadata file was updated last. This is NOT the timestamp the asset was updated last. MUST be formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). | + +**For more fields see the [STAC Common Metadata](common-metadata.md) and the [Content Extensions](../extensions/README.md#list-of-content-extensions).** **datetime** is likely the acquisition (in the case of single camera type captures) or the 'nominal' or representative time in the case of assets that are combined together. Though time can be a @@ -87,26 +85,6 @@ data, so use whatever single date and time is most useful for a user to search f extensions may further specify the meaning of the main `datetime` field, and many will also add more datetime fields. -**license**: Items's license(s) as a SPDX [License identifier](https://spdx.org/licenses/). Alternatively, use `proprietary` (see below) if the license is not on the SPDX license list or `various` if multiple licenses apply. In all cases links to the license texts SHOULD be added, see the [`license` link relation type](#relation-types). If no link to a license is included and the `license` field is set to `proprietary`, the collection is private, and consumers have not been granted any explicit right to use the data. - -### Provider Object - -The object provides information about a provider. A provider is any of the organizations that captured or processed the content of the collection and therefore influenced the data offered by this collection. May also include information about the final storage provider hosting the data. - -| Field Name | Type | Description | -| ----------- | --------- | ------------------------------------------------------------ | -| name | string | **REQUIRED.** The name of the organization or the individual. | -| description | string | Multi-line description to add further provider information such as processing details for processors and producers, hosting details for hosts or basic contact information. [CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich text representation. | -| roles | [string] | Roles of the provider. Any of `licensor`, `producer`, `processor` or `host`. | -| url | string | Homepage on which the provider describes the dataset and publishes contact information. | - -**roles**: The provider's role(s) can be one or more of the following elements: - -* *licensor*: The organization that is licensing the dataset under the license specified in the collection's `license` field. -* *producer*: The producer of the data is the provider that initially captured and processed the source data, e.g. ESA for Sentinel-2 data. -* *processor*: A processor is any provider who processed data to a derived product. -* *host*: The host is the actual provider offering the data on their storage. There should be no more than one host, specified as last element of the list. - ### Link Object This object describes a relationship with another entity. Data providers are advised to be liberal @@ -139,7 +117,6 @@ The following types are commonly used as `rel` types in the Link Object of an It | root | URL to the root STAC [Catalog](../catalog-spec/README.md) or [Collection](../collection-spec/README.md). | | parent | URL to the parent STAC [Catalog](../catalog-spec/README.md) or [Collection](../collection-spec/README.md). | | collection | STRONGLY RECOMMENDED. URL to a [Collection](../collection-spec/README.md), which may use the use the [Commons extension](../extensions/commons/README.md) to hold common fields of this and other Items (see chapter '[Collections](#Collections)' for more explanations). _Absolute_ URLs should be used whenever possible. The referenced Collection is STRONGLY RECOMMENDED to implement the same STAC version as the Item. | -| license | The license URL(s) for the item SHOULD be specified if the `license` field is set to `proprietary` or `various`. If there is no public license URL available, it is RECOMMENDED to supplement the STAC Item with the license text in a separate file and link to this file. | | derived_from | URL to a STAC Item that was used as input data in the creation of this Item. | A more complete list of possible 'rel' types can be seen at the [IANA page of Link Relation Types](https://www.iana.org/assignments/link-relations/link-relations.xhtml). diff --git a/item-spec/json-schema/datetimerange.json b/item-spec/json-schema/datetimerange.json new file mode 100644 index 000000000..6e1e5b88c --- /dev/null +++ b/item-spec/json-schema/datetimerange.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "schema.json#", + "title": "Date and Time Range Fields", + "type": "object", + "properties": { + "start_datetime": { + "title": "Start Date and Time", + "description": "The searchable start date/time of the assets, in UTC (Formatted in RFC 3339) ", + "type": "string", + "format": "date-time" + }, + "end_datetime": { + "title": "End Date and Time", + "description": "The searchable end date/time of the assets, in UTC (Formatted in RFC 3339) ", + "type": "string", + "format": "date-time" + } + }, + "dependencies": { + "start_datetime": { + "required": [ + "end_datetime" + ] + }, + "end_datetime": { + "required": [ + "start_datetime" + ] + } + } +} \ No newline at end of file diff --git a/item-spec/json-schema/instrument.json b/item-spec/json-schema/instrument.json new file mode 100644 index 000000000..02327d53d --- /dev/null +++ b/item-spec/json-schema/instrument.json @@ -0,0 +1,27 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "instrument.json#", + "title": "Instrument Fields", + "type": "object", + "properties": { + "platform": { + "title": "Platform", + "type": "string" + }, + "instruments": { + "title": "Instruments", + "type": "array", + "items": { + "type": "string" + } + }, + "constellation": { + "title": "Constellation", + "type": "string" + }, + "mission": { + "title": "Mission", + "type": "string" + } + } +} \ No newline at end of file diff --git a/item-spec/json-schema/item.json b/item-spec/json-schema/item.json index 4e3c31198..7070de66d 100644 --- a/item-spec/json-schema/item.json +++ b/item-spec/json-schema/item.json @@ -11,6 +11,25 @@ } ], "definitions": { + "common_metadata": { + "anyOf": [ + { + "$ref": "datetimerange.json" + }, + { + "$ref": "instrument.json" + }, + { + "$ref": "licensing.json" + }, + { + "$ref": "metadata.json" + }, + { + "$ref": "provider.json" + } + ] + }, "core": { "allOf": [ { @@ -50,7 +69,6 @@ "checksum", "commons", "cube", - "datetime-range", "eo", "label", "pointcloud", @@ -90,70 +108,30 @@ } }, "properties": { - "type": "object", - "required": [ - "datetime" - ], - "properties": { - "datetime": { - "title": "Date and Time", - "description": "The searchable date/time of the assets, in UTC (Formatted in RFC 3339) ", - "type": "string", - "format": "date-time" - }, - "title": { - "title": "Item Title", - "description": "A human-readable title describing the item.", - "type": "string" - }, - "license": { - "title": "Item Licenses", - "type": "string" - }, - "providers": { - "type": "array", - "items": { - "properties": { - "name": { - "title": "Organization name", - "type": "string" - }, - "description": { - "title": "Provider description", - "type": "string" - }, - "roles": { - "title": "Organization roles", - "type": "array", - "items": { - "type": "string", - "enum": [ - "producer", - "licensor", - "processor", - "host" - ] - } - }, - "url": { - "title": "Homepage", - "type": "string", - "format": "url" - } + "allOf": [ + { + "type": "object", + "required": [ + "datetime" + ], + "properties": { + "datetime": { + "title": "Date and Time", + "description": "The searchable date/time of the assets, in UTC (Formatted in RFC 3339) ", + "type": "string", + "format": "date-time" + }, + "title": { + "title": "Item Title", + "description": "A human-readable title describing the item.", + "type": "string" } } }, - "created": { - "title": "Metadata created at", - "type": "string", - "format": "date-time" - }, - "updated": { - "title": "Metadata updated at", - "type": "string", - "format": "date-time" + { + "$ref": "#/definitions/common_metadata" } - } + ] }, "collection": { "title": "Collection ID", diff --git a/item-spec/json-schema/licensing.json b/item-spec/json-schema/licensing.json new file mode 100644 index 000000000..15ee977c8 --- /dev/null +++ b/item-spec/json-schema/licensing.json @@ -0,0 +1,12 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "licensing.json#", + "title": "Licensing Fields", + "type": "object", + "properties": { + "license": { + "type": "string", + "pattern": "^[\\w\\-\\.\\+]+$" + } + } +} \ No newline at end of file diff --git a/item-spec/json-schema/metadata.json b/item-spec/json-schema/metadata.json new file mode 100644 index 000000000..c012c166b --- /dev/null +++ b/item-spec/json-schema/metadata.json @@ -0,0 +1,18 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "metadata.json#", + "title": "Metadata Fields", + "type": "object", + "properties": { + "created": { + "title": "Metadata Creation", + "type": "string", + "format": "date-time" + }, + "updated": { + "title": "Metadata Last Update", + "type": "string", + "format": "date-time" + } + } +} \ No newline at end of file diff --git a/item-spec/json-schema/provider.json b/item-spec/json-schema/provider.json new file mode 100644 index 000000000..995d996ed --- /dev/null +++ b/item-spec/json-schema/provider.json @@ -0,0 +1,42 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "provider.json#", + "title": "Provider Fields", + "type": "object", + "properties": { + "providers": { + "title": "Providers", + "type": "array", + "items": { + "properties": { + "name": { + "title": "Organization name", + "type": "string" + }, + "description": { + "title": "Organization description", + "type": "string" + }, + "roles": { + "title": "Organization roles", + "type": "array", + "items": { + "type": "string", + "enum": [ + "producer", + "licensor", + "processor", + "host" + ] + } + }, + "url": { + "title": "Organization homepage", + "type": "string", + "format": "url" + } + } + } + } + } +} \ No newline at end of file