diff --git a/.circleci/config.yml b/.circleci/config.yml index 9cf16918d..fd6087480 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,9 +35,34 @@ jobs: - run: name: validate command: npm run check-markdown + publish_schemas: + working_directory: ~/stac + docker: + - image: circleci/node:12 + steps: + - checkout + - run: + name: install + command: npm install + - add_ssh_keys: + fingerprints: + - "9b:0a:88:ff:12:d1:29:9a:ff:bb:72:ab:7d:81:df:59" + - run: + name: publish + command: npm run publish-schemas -- $CIRCLE_TAG workflows: version: 2 - test: + ci: jobs: - test_examples - - test_docs \ No newline at end of file + - test_docs + - publish_schemas: + requires: + - test_examples + filters: + tags: + # All (future) tags + only: /.+/ + branches: + # Only dev branch, not PRs + only: dev \ No newline at end of file diff --git a/.circleci/publish-schemas.js b/.circleci/publish-schemas.js new file mode 100644 index 000000000..824f88c22 --- /dev/null +++ b/.circleci/publish-schemas.js @@ -0,0 +1,40 @@ +const klaw = require('klaw-sync'); +const path = require('path'); +const fs = require('fs'); +const ghpages = require('gh-pages'); + +function filterFn (item) { + const basename = path.basename(item.path); + return basename === '.' || basename === 'node_modules' || basename[0] !== '.'; +} + +let args = process.argv.slice(2); +let tag = 'dev'; +if (args.length && args[0].trim().length > 0) { + tag = args[0]; +} + +var folder = '.'; +var jsonSchemaFolderPattern = path.sep + 'json-schema' + path.sep; +for (let file of klaw(folder, {filter: filterFn})) { + if (file.path.includes(jsonSchemaFolderPattern) && path.extname(file.path) === '.json') { + let source = file.path; + let target = 'schemas' + path.sep + tag + path.sep + path.relative(folder, file.path); + fs.mkdirSync(path.dirname(target), { recursive: true }); + fs.copyFileSync(source, target); + console.log(target); + } +} + +ghpages.publish('schemas/' + tag, { + src: '**', + dest: tag, + message: 'Publish JSON Schemas [ci skip]', + user: { + name: 'STAC CI', + email: 'ci@stacspec.org' + } +}, error => { + console.error(error ? error : 'Deployed to gh-pages'); + process.exit(error ? 1 : 0); +}); \ No newline at end of file diff --git a/.gitignore b/.gitignore index 0185ed467..ab3dafa33 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,6 @@ typings/ # IntelliJ IDEA files .idea/ *.iml + +# Folder created when CI puhlishes JSON Schemas +schemas/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fbdffc03..23a1fac5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,31 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added + +### Changed + +### Removed + +### Fixed + + +## [v1.0.0-beta.2] - 2020-07-08 + +### Added +- JSON-schema file in the Point Cloud extension. + +### Changed +- Clarification on null geometries, making bbox not required if a null geometry is used. +- Multiple extents (bounding boxes / intervals) are allowed per Collection + +### Removed +- Validation instructions + +### Fixed +- Fixed several JSON Schemas +- Fixed examples + ## [v1.0.0-beta.1] - 2020-05-29 ### Removed @@ -333,6 +358,7 @@ Thanks @hgs-msmith, @matthewhanson, @hgs-trutherford, @rouault, @joshfix, @alkam [Unreleased]: +[v1.0.0-beta.2]: [v1.0.0-beta.1]: [v0.9.0]: [v0.8.1]: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c909d76b3..eb7edfeb6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,6 +37,8 @@ system. Please use `check-markdown` locally, as described in the [next section]( to ensure that the checks on the pull request succeed. If it does not then you can look at the mistakes online, which are the same as running `check-markdown` locally would surface. +All pull requests that modify or create JSON schema files or examples should use [JSON formatter](https://jsonformatter.org/) to keep files consistent across the repo. + All pull requests additionally require a review of two STAC core team members. Releases are cut from dev to master (and require 3 approvals), see the [process](process.md) document for more details. diff --git a/README.md b/README.md index fb25ddd68..1a69c5daf 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,13 @@ in a 'beta' state, with no major changes anticipated, so implementors can expect at this point we don't anticipate any major changes, but reserve the right to make them if we get feedback that something just doesn't work. Which is to say the next couple months are a great time to implement STAC, as your changes will be head. After 1.0 our goal is to not change the core in any backwards incompatible way for a very long time, if ever, so that people can build on this until -JSON is no longer relevant. +JSON is no longer relevant. The STAC specification follows [Semantic Versioning](https://semver.org/), so once 1.0.0 is reached any breaking +change will require the spec to go to 2.0.0. ## Current version and branches The [master branch](https://github.com/radiantearth/stac-spec/tree/master) is the 'stable' version of the spec. It is currently version -**1.0.0-beta.1** of the specification. The +**1.0.0-beta.2** of the specification. The [dev](https://github.com/radiantearth/stac-spec/tree/dev) branch is where active development takes place, and may have inconsistent examples. Whenever dev stabilizes a release is cut and we merge dev in to master. So master should be stable at any given time. It is possible that there may be small releases in quick succession, especially if they are nice improvements that do @@ -44,7 +45,7 @@ the specification takes place in the [issue tracker](https://github.com/radiante ## In this Repository -This repository contains the core specifications plus examples and validation schemas and tools. Also included are a +This repository contains the core specifications plus examples and validation schemas. Also included are a few documents that provide more context and plans for the evolution of the specification. Each spec folder contains a README explaining the layout of the folder, the main specification document, examples, and validating schemas. And there is one more specification in the STAC 'family', which is diff --git a/best-practices.md b/best-practices.md index adc3859fb..cceece0e7 100644 --- a/best-practices.md +++ b/best-practices.md @@ -5,6 +5,7 @@ * [Field and ID formatting](#field-and-id-formatting) * [Field selection and Metadata Linking](#field-selection-and-metadata-linking) * [Datetime selection](#datetime-selection) +* [Unlocated Items](#unlocated-items) * [Representing Vector Layers in STAC](#representing-vector-layers-in-stac) * [Common Use Cases of Additional Fields for Assets](#common-use-cases-of-additional-fields-for-assets) * [Static and Dynamic Catalogs](#static-and-dynamic-catalogs) @@ -69,6 +70,45 @@ might choose to have `datetime` be the start. The key is to put in a date and ti the focus of STAC. If `datetime` is set to `null` then it is strongly recommended to use it in conjunction with a content extension that explains why it should not be set for that type of data. +## Unlocated Items + +Though the [GeoJSON standard](https://tools.ietf.org/html/rfc7946) allows null geometries, in STAC we strongly recommend +that every item have a geometry, since the general expectation of someone using a SpatioTemporal Catalog is to be able to query +all data by space and time. But there are some use cases where it can make sense to create a STAC Item before it gets +a geometry. The most common of these is 'level 1' satellite data, where an image is downlinked and cataloged before it has +been geospatially located. + +The recommendation for data that does not yet have a location is to follow the GeoJSON concept that it is an ['unlocated' +feature](https://tools.ietf.org/html/rfc7946#section-3.2). So if the catalog has data that is not located then it can follow +GeoJSON and set the geometry to null. Though normally required, in this case the `bbox` field should not be included. + +Note that this recommendation is only for cases where data does not yet have a geometry and it cannot be estimated. There +are further details on the two most commonly requested desired use cases for setting geometry to null: + +### Unrectified Satellite Data + +Most satellite data is downlinked without information that precisely describes where it is located on earth. A satellite +imagery processing pipeline will always attempt to locate it, but often that process takes a number of hours, or never +quite completes (like when it is too cloudy). It can be useful to start to populate the Item before it has a geometry. +In this case the recommendation is to use the 'estimated' position from the satellite, to populate at least the bounding box, +and use the same broad bounds for the geometry (or leaving it null) until there is precise ground lock. This estimation is +usually done by onboard equipment, like GPS or star trackers, but can be off by kilometers or more. But it is very useful for +STAC users to be able to at least find approximate area in their searches. A commonly used field for communicating ground lock +is not yet established, but likely should be (an extension proposal would be appreciated). If there is no way to provide an +estimate then the data then a null geometry with no `bbox` can be used, as described above. But the data will likely not +show up in STAC API searches, as most will at least implicitly use a geometry. Though this section is written with +satellite data in mind, one can easily imagine other data types that start with a less precise geometry but have it +refined after processing. + +### Data that is not spatial + +The other case that often comes up is people who love STAC and want to use it to catalog everything they have, even if it is +not spatial. This use case is not currently supported by STAC, as we are focused on data that is both temporal and spatial +in nature. The [OGC API - Records](https://github.com/opengeospatial/ogcapi-records) is an emerging standard that likely +will be able to handle a wider range of data to catalog than STAC. It builds on [OGC API - +Features](https://github.com/opengeospatial/ogcapi-features) just like [STAC API](https://github.com/radiantearth/stac-api-spec/) +does. The [collection assets extension](extensions/collection-assets) may also provide an option for some use cases. + ## Representing Vector Layers in STAC Many implementors are tempted to try to use STAC for 'everything', using it as a universal catalog of all their 'stuff'. diff --git a/catalog-spec/README.md b/catalog-spec/README.md index 9a2303a7c..41ee2ff40 100644 --- a/catalog-spec/README.md +++ b/catalog-spec/README.md @@ -26,10 +26,6 @@ contains a full sample catalog. **Schemas:** The schemas to validate the core Catalog definition are found in the *[json-schema/](json-schema/)* folder. The primary one is *[catalog.json](json-schema/catalog.json)*. -## Schema Validation - -Instruction on schema validation for STAC Catalog can be found in the [validation instructions](../validation/README.md). - ## Catalog Evolution The Catalog specification is maturing, but it is still relatively early days. The core of Catalog has been defined very diff --git a/catalog-spec/catalog-spec.md b/catalog-spec/catalog-spec.md index c1bd2341b..f67bf14b6 100644 --- a/catalog-spec/catalog-spec.md +++ b/catalog-spec/catalog-spec.md @@ -36,7 +36,7 @@ also a valid STAC Catalog. | description | string | **REQUIRED.** Detailed multi-line description to fully explain the catalog. [CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich text representation. | | links | [[Link Object](#link-object)] | **REQUIRED.** A list of references to other documents. | -**stac_extensions**: A list of extensions the Catalog implements. This does NOT declare the extensions of children or Items. The list contains URLs to the JSON Schema files it can be validated against. For official [content extensions](../extensions/README.md#list-of-content-extensions), a "shortcut" can be used. This means you can specify the folder name of the extension, for example `pointcloud` for the Point Cloud extension. This does *not* apply for API extensions. If the versions of the extension and the catalog diverge, you can specify the URL of the JSON schema file. +**stac_extensions**: A list of extensions the Catalog implements. This does NOT declare the extensions of children or Items. The list contains URLs to the JSON Schema files it can be validated against. For official [content extensions](../extensions/README.md#list-of-content-extensions), a "shortcut" can be used. This means you can specify the folder name of the extension, for example `single-file-stac` for the Point Cloud extension. If the versions of the extension and the catalog diverge, you can specify the URL of the JSON schema file. This list must only contain extensions that extend the Catalog itself, see the the 'Scope' column in the list of extensions. ### Link Object diff --git a/catalog-spec/examples/catalog-items.json b/catalog-spec/examples/catalog-items.json index a5fcfcfa5..3404d1363 100644 --- a/catalog-spec/examples/catalog-items.json +++ b/catalog-spec/examples/catalog-items.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "id": "hurricane-harvey-0831", "title": "Hurricane Harvey 08-31-2017", "description": "Planet Scenes and Composites for Hurricane Harvey on Aug 31, 2017", diff --git a/catalog-spec/examples/catalog.json b/catalog-spec/examples/catalog.json index 51188dce4..ef915b3ba 100644 --- a/catalog-spec/examples/catalog.json +++ b/catalog-spec/examples/catalog.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "id": "NAIP", "description": "Catalog of NAIP Imagery", "links": [ diff --git a/catalog-spec/json-schema/catalog.json b/catalog-spec/json-schema/catalog.json index 2f7d05c7f..48d32d469 100644 --- a/catalog-spec/json-schema/catalog.json +++ b/catalog-spec/json-schema/catalog.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "catalog.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/catalog-spec/json-schema/catalog.json#", "title": "STAC Catalog Specification", "description": "This object represents Catalogs in a SpatioTemporal Asset Catalog.", "allOf": [ @@ -22,7 +22,7 @@ "stac_version": { "title": "STAC version", "type": "string", - "const": "1.0.0-beta.1" + "const": "1.0.0-beta.2" }, "stac_extensions": { "title": "STAC extensions", diff --git a/collection-spec/README.md b/collection-spec/README.md index 841c15bd0..fa8d4c91c 100644 --- a/collection-spec/README.md +++ b/collection-spec/README.md @@ -25,10 +25,6 @@ structures and fields. **Schemas:** The schemas to validate the STAC Collection definition are found in the *[json-schema/](json-schema/)* folder. The primary one is *[collection.json](json-schema/collection.json)*. -## Schema Validation - -Instruction on schema validation for STAC Items can be found in the [validation instructions](../validation/README.md). - ## Collection Flexibility STAC Collections are defined for flexibility. They only require a handful of fields, and diff --git a/collection-spec/collection-spec.md b/collection-spec/collection-spec.md index ad16df730..c66a37734 100644 --- a/collection-spec/collection-spec.md +++ b/collection-spec/collection-spec.md @@ -11,7 +11,7 @@ STAC Collections are meant to be compatible with *OGC API - Features* Collection * [Examples](examples/): * Sentinel 2: A basic standalone example of a [Collection](examples/sentinel2.json) without items. * Landsat 8: A [Collection](examples/landsat-collection.json) with corresponding Item [Item](../item-spec/examples/landsat8-sample.json). -* [JSON Schema](json-schema/collection.json) - please see the [validation instructions](../validation/README.md) +* [JSON Schema](json-schema/collection.json) ## Collection fields @@ -29,7 +29,7 @@ STAC Collections are meant to be compatible with *OGC API - Features* Collection | summaries | Map | A map of property summaries, either a set of values or statistics such as a range. | | links | \[[Link Object](#link-object)] | **REQUIRED.** A list of references to other documents. | -**stac_extensions**: A list of extensions the Collection implements. This does NOT declare the extensions of child Catalogs or Items. The list contains URLs to the JSON Schema files it can be validated against. For official [content extensions](../extensions/README.md#list-of-content-extensions), a "shortcut" can be used. This means you can specify the folder name of the extension, for example `version` for the Versioning Indicators extension. This does *not* apply for API extensions. If the versions of the extension and the collection diverge, you can specify the URL of the JSON schema file. +**stac_extensions**: A list of extensions the Collection implements. This does NOT declare the extensions of child Catalogs or Items. The list contains URLs to the JSON Schema files it can be validated against. For official [content extensions](../extensions/README.md#list-of-content-extensions), a "shortcut" can be used. This means you can specify the folder name of the extension, for example `version` for the Versioning Indicators extension. If the versions of the extension and the collection diverge, you can specify the URL of the JSON schema file. This list must only contain extensions that extend the Collection itself, see the the 'Scope' column in the list of extensions. If an extension as the extension has influence on multiple parts of the whole catalog structure, it must be listed in all affected parts (e.g. Collection and Item for the `datacube` extension). If a structure such as the summaries extension provide fields in their JSON structure, these extensions must not be listed here as they don't extend the Collection itself. For example, if a Collection includes the field `sat:platform` in the summaries, the Collection still does not list the `sat` extension in the `stac_extensions` field. **license**: Collection'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. 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. @@ -47,22 +47,20 @@ It is recommended to list as many properties as reasonable so that consumers get The object describes the spatio-temporal extents of the Collection. Both spatial and temporal extents are required to be specified. -| Element | Type | Description | -| -------- | ------------------------------------------------- | ------------------------------------------------------------------- | -| spatial | [Spatial Extent Object](#spatial-extent-object) | **REQUIRED.** Potential *spatial extent* covered by the collection. | -| temporal | [Temporal Extent Object](#temporal-extent-object) | **REQUIRED.** Potential *temporal extent* covered by the collection. | +| Element | Type | Description | +| -------- | ------------------------------------------------- | --------------------------------------------------------------------- | +| spatial | [Spatial Extent Object](#spatial-extent-object) | **REQUIRED.** Potential *spatial extents* covered by the collection. | +| temporal | [Temporal Extent Object](#temporal-extent-object) | **REQUIRED.** Potential *temporal extents* covered by the collection. | #### Spatial Extent Object The object describes the spatial extents of the Collection. -| Element | Type | Description | -| ------- | ------------ | ------------------------------------------------------------------- | -| bbox | \[\[number]] | **REQUIRED.** Potential *spatial extent* covered by the collection. | +| Element | Type | Description | +| ------- | ------------ | -------------------------------------------------------------------- | +| bbox | \[\[number]] | **REQUIRED.** Potential *spatial extents* covered by the collection. | -**bbox**: Bounding Box of the assets represented by this collection using either 2D or 3D geometries. - -This is a single-element array containing an array representing a single bounding box. This is to potentially support multiple bounding boxes later or with an extension. +**bbox**: Bounding Boxes of the assets represented by this collection using either 2D or 3D geometries. Each outer array element can be a separate bounding box, but it is recommended to only use multiple bounding boxes if a union of them would then include a large uncovered area (e.g. the union of Germany and Chile). The length of the inner array must be 2*n where n is the number of dimensions. The array contains all axes of the southwesterly most extent followed by all axes of the northeasterly most extent specified in Longitude/Latitude or Longitude/Latitude/Elevation based on [WGS 84](http://www.opengis.net/def/crs/OGC/1.3/CRS84). When using 3D geometries, the elevation of the southwesterly most extent is the minimum depth/height in meters and the elevation of the northeasterly most extent is the maximum. @@ -72,11 +70,15 @@ The coordinate reference system of the values is WGS 84 longitude/latitude. Exam The object describes the temporal extents of the Collection. -| Element | Type | Description | -| -------- | ------------------ | -------------------------------------------------------------------- | -| interval | \[\[string\|null]] | **REQUIRED.** Potential *temporal extent* covered by the collection. | +| Element | Type | Description | +| -------- | ------------------ | --------------------------------------------------------------------- | +| interval | \[\[string\|null]] | **REQUIRED.** Potential *temporal extents* covered by the collection. | + +**interval**: Each outer array element can be a separate temporal extent, but it is recommended to only use multiple temporal extents if a union of them would then include a large uncovered time span (e.g. only having data for the years 2000, 2010 and 2020). + +Each inner array consists of exactly two dates and times. Each date and time MUST be formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). The temporal reference system is the Gregorian calendar. -**interval**: A list of a list of two datetimes. The wrapped list is to potentially support multiple extents later or with an extension. The datetimes MUST be formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6). Open date ranges are supported by setting either the start or the end time to `null`. Example for data from the beginning of 2019 until now: `[["2009-01-01T00:00:00Z", null]]`. The temporal reference system is the Gregorian calendar. +Open date ranges are supported by setting either the start or the end time to `null`. Example for data from the beginning of 2019 until now: `[["2009-01-01T00:00:00Z", null]]`. ### Provider Object @@ -144,7 +146,7 @@ Implementors are free to add other derived statistical values to the object, for STAC Collections which don't link to any Item are called **standalone Collections**. To describe them with more fields than the Collection fields has to offer, it is allowed to re-use the metadata fields defined by content extensions for Items in the `summaries` field. This makes much sense for fields such as `platform` or `proj:epsg`, which are often the same for a whole collection, but doesn't make much sense for `eo:cloud_cover`, which usually varies heavily across a Collection. -The data provider is free to decide, which fields are reasoable to be used. +The data provider is free to decide, which fields are reasonable to be used. ## Extensions diff --git a/collection-spec/examples/landsat-collection.json b/collection-spec/examples/landsat-collection.json index 641929909..a22bd42d2 100644 --- a/collection-spec/examples/landsat-collection.json +++ b/collection-spec/examples/landsat-collection.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [], "id": "landsat-8-l1", "title": "Landsat 8 L1", diff --git a/collection-spec/examples/sentinel2.json b/collection-spec/examples/sentinel2.json index c6cdd17e3..2bf752dde 100644 --- a/collection-spec/examples/sentinel2.json +++ b/collection-spec/examples/sentinel2.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [], "id": "COPERNICUS/S2", "title": "Sentinel-2 MSI: MultiSpectral Instrument, Level-1C", diff --git a/collection-spec/json-schema/collection.json b/collection-spec/json-schema/collection.json index b5ae730ea..34e7a64f6 100644 --- a/collection-spec/json-schema/collection.json +++ b/collection-spec/json-schema/collection.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "collection.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/collection-spec/json-schema/collection.json#", "title": "STAC Collection Specification", "description": "This object represents Collections in a SpatioTemporal Asset Catalog.", "allOf": [ @@ -106,8 +106,16 @@ "items": { "title": "Spatial extent", "type": "array", - "minItems": 4, - "maxItems": 6, + "oneOf": [ + { + "minItems":4, + "maxItems":4 + }, + { + "minItems":6, + "maxItems":6 + } + ], "items": { "type": "number" } diff --git a/extensions/checksum/examples/sentinel1.json b/extensions/checksum/examples/sentinel1.json index cea3e32ec..c843058b6 100644 --- a/extensions/checksum/examples/sentinel1.json +++ b/extensions/checksum/examples/sentinel1.json @@ -1,7 +1,7 @@ { "id": "S1A_EW_GRDM_1SSH_20181103T235855_20181103T235955_024430_02AD5D_5616", "type": "Feature", - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "checksum" ], diff --git a/extensions/checksum/json-schema/schema.json b/extensions/checksum/json-schema/schema.json index 096cf0d95..3d5222ca5 100644 --- a/extensions/checksum/json-schema/schema.json +++ b/extensions/checksum/json-schema/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/checksum/json-schema/schema.json#", "title": "Checksum Extension Specification", "description": "STAC Checksum Extension to a STAC Item", "oneOf": [ @@ -60,7 +60,10 @@ "stac_extensions": { "type": "array", "contains": { - "const": "checksum" + "enum": [ + "checksum", + "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/checksum/json-schema/schema.json" + ] } } } diff --git a/extensions/collection-assets/examples/example-esm.json b/extensions/collection-assets/examples/example-esm.json index 94037e239..777d3566d 100644 --- a/extensions/collection-assets/examples/example-esm.json +++ b/extensions/collection-assets/examples/example-esm.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "collection-assets", "https://github.com/NCAR/esm-collection-spec/tree/v0.2.0/schema.json" diff --git a/extensions/collection-assets/json-schema/schema.json b/extensions/collection-assets/json-schema/schema.json index 83d55e51c..17b0ae71d 100644 --- a/extensions/collection-assets/json-schema/schema.json +++ b/extensions/collection-assets/json-schema/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/collection-assets/json-schema/schema.json#", "title": "Collection Assets Extension Specification", "description": "STAC Collection-level assets Extension to a STAC Collection", "allOf": [ @@ -17,7 +17,10 @@ "stac_extensions": { "type": "array", "contains": { - "const": "collection-assets" + "enum": [ + "collection-assets", + "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/collection-assets/json-schema/schema.json" + ] } }, "assets": { diff --git a/extensions/datacube/examples/example-collection.json b/extensions/datacube/examples/example-collection.json index 066e51cf3..e26f2fa6a 100644 --- a/extensions/datacube/examples/example-collection.json +++ b/extensions/datacube/examples/example-collection.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "datacube" ], diff --git a/extensions/datacube/examples/example-item.json b/extensions/datacube/examples/example-item.json index 47406fe3b..ac5a60ccf 100644 --- a/extensions/datacube/examples/example-item.json +++ b/extensions/datacube/examples/example-item.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "datacube" ], diff --git a/extensions/datacube/json-schema/schema.json b/extensions/datacube/json-schema/schema.json index 89e875b35..e19d7bee5 100644 --- a/extensions/datacube/json-schema/schema.json +++ b/extensions/datacube/json-schema/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/datacube/json-schema/schema.json#", "title": "Data Cube Extension", "description": "STAC Data Cube Extension to STAC Items and STAC Collections", "oneOf": [ @@ -49,7 +49,10 @@ "stac_extensions": { "type": "array", "contains": { - "const": "datacube" + "enum": [ + "datacube", + "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/datacube/json-schema/schema.json" + ] } } } @@ -117,19 +120,19 @@ ] }, "description": { - "$ref": "#/definitions/fields/description" + "$ref": "#/definitions/description" }, "extent": { - "$ref": "#/definitions/fields/extent_open" + "$ref": "#/definitions/extent_open" }, "values": { - "$ref": "#/definitions/fields/values" + "$ref": "#/definitions/values" }, "step": { - "$ref": "#/definitions/fields/step" + "$ref": "#/definitions/step" }, "unit": { - "$ref": "#/definitions/fields/unit" + "$ref": "#/definitions/unit" }, "reference_system": { "type": "string" @@ -146,25 +149,25 @@ ], "properties": { "type": { - "$ref": "#/definitions/fields/type_spatial" + "$ref": "#/definitions/type_spatial" }, "axis": { - "$ref": "#/definitions/fields/axis_xy" + "$ref": "#/definitions/axis_xy" }, "description": { - "$ref": "#/definitions/fields/description" + "$ref": "#/definitions/description" }, "extent": { - "$ref": "#/definitions/fields/extent_closed" + "$ref": "#/definitions/extent_closed" }, "values": { - "$ref": "#/definitions/fields/values_numeric" + "$ref": "#/definitions/values_numeric" }, "step": { - "$ref": "#/definitions/fields/step" + "$ref": "#/definitions/step" }, "reference_system": { - "$ref": "#/definitions/fields/reference_system_spatial" + "$ref": "#/definitions/reference_system_spatial" } } }, @@ -189,28 +192,28 @@ ], "properties": { "type": { - "$ref": "#/definitions/fields/type_spatial" + "$ref": "#/definitions/type_spatial" }, "axis": { - "$ref": "#/definitions/fields/axis_z" + "$ref": "#/definitions/axis_z" }, "description": { - "$ref": "#/definitions/fields/description" + "$ref": "#/definitions/description" }, "extent": { - "$ref": "#/definitions/fields/extent_open" + "$ref": "#/definitions/extent_open" }, "values": { - "$ref": "#/definitions/fields/values" + "$ref": "#/definitions/values" }, "step": { - "$ref": "#/definitions/fields/step" + "$ref": "#/definitions/step" }, "unit": { - "$ref": "#/definitions/fields/unit" + "$ref": "#/definitions/unit" }, "reference_system": { - "$ref": "#/definitions/fields/reference_system_spatial" + "$ref": "#/definitions/reference_system_spatial" } } }, @@ -230,7 +233,7 @@ "const": "temporal" }, "description": { - "$ref": "#/definitions/fields/description" + "$ref": "#/definitions/description" }, "values": { "type": "array", @@ -259,82 +262,80 @@ } } }, - "fields": { - "type_spatial": { - "type": "string", - "const": "spatial" - }, - "axis_xy": { - "type": "string", - "enum": [ - "x", - "y" - ] - }, - "axis_z": { - "type": "string", - "const": "z" - }, - "extent_closed": { - "type": "array", - "minItems": 2, - "maxItems": 2, - "items": { - "type": "number" - } - }, - "extent_open": { - "type": "array", - "minItems": 2, - "maxItems": 2, - "items": { - "type": [ - "number", - "null" - ] - } - }, - "values_numeric": { - "type": "array", - "minItems": 1, - "items": { - "type": "number" - } - }, - "values": { - "type": "array", - "minItems": 1, - "items": { - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] - } - }, - "step": { + "type_spatial": { + "type": "string", + "const": "spatial" + }, + "axis_xy": { + "type": "string", + "enum": [ + "x", + "y" + ] + }, + "axis_z": { + "type": "string", + "const": "z" + }, + "extent_closed": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": { + "type": "number" + } + }, + "extent_open": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": { "type": [ "number", "null" ] - }, - "unit": { - "type": "string" - }, - "reference_system_spatial": { - "type": [ - "string", - "number", - "object" - ], - "default": 4326 - }, - "description": { - "type": "string" } + }, + "values_numeric": { + "type": "array", + "minItems": 1, + "items": { + "type": "number" + } + }, + "values": { + "type": "array", + "minItems": 1, + "items": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] + } + }, + "step": { + "type": [ + "number", + "null" + ] + }, + "unit": { + "type": "string" + }, + "reference_system_spatial": { + "type": [ + "string", + "number", + "object" + ], + "default": 4326 + }, + "description": { + "type": "string" } } } \ No newline at end of file diff --git a/extensions/eo/examples/example-landsat8.json b/extensions/eo/examples/example-landsat8.json index 406b69179..1d7606749 100644 --- a/extensions/eo/examples/example-landsat8.json +++ b/extensions/eo/examples/example-landsat8.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "eo", "view", diff --git a/extensions/eo/json-schema/schema.json b/extensions/eo/json-schema/schema.json index 7b88b8aef..5de839582 100644 --- a/extensions/eo/json-schema/schema.json +++ b/extensions/eo/json-schema/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/eo/json-schema/schema.json#", "title": "EO Extension", "description": "STAC EO Extension to a STAC Item.", "allOf": [ @@ -23,7 +23,10 @@ "stac_extensions": { "type": "array", "contains": { - "const": "eo" + "enum": [ + "eo", + "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/eo/json-schema/schema.json" + ] } }, "properties": { diff --git a/extensions/item-assets/examples/example-landsat8.json b/extensions/item-assets/examples/example-landsat8.json index a2ee1bcae..c600629e8 100644 --- a/extensions/item-assets/examples/example-landsat8.json +++ b/extensions/item-assets/examples/example-landsat8.json @@ -7,7 +7,7 @@ "earth observation", "usgs" ], - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "item-assets" ], diff --git a/extensions/item-assets/json-schema/schema.json b/extensions/item-assets/json-schema/schema.json index 9539532ac..fdb3bbc0a 100644 --- a/extensions/item-assets/json-schema/schema.json +++ b/extensions/item-assets/json-schema/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/item-assets/json-schema/schema.json#", "title": "Asset Definition Extension Specification", "description": "STAC Asset Definition Extension to a STAC Collection", "allOf": [ @@ -23,7 +23,10 @@ "stac_extensions": { "type": "array", "contains": { - "const": "item-assets" + "enum": [ + "item-assets", + "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/item-assets/json-schema/schema.json" + ] } }, "item_assets": { diff --git a/extensions/label/examples/multidataset/catalog.json b/extensions/label/examples/multidataset/catalog.json index f2cbb26d3..caf54e729 100644 --- a/extensions/label/examples/multidataset/catalog.json +++ b/extensions/label/examples/multidataset/catalog.json @@ -2,7 +2,7 @@ "id": "label_extension_demo", "title": "label extension demo", "description": "Sample ML training data labels in the STAC format", - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "links": [ { diff --git a/extensions/label/examples/multidataset/spacenet-buildings/AOI_2_Vegas_img2636.json b/extensions/label/examples/multidataset/spacenet-buildings/AOI_2_Vegas_img2636.json index af397108f..d3603245b 100644 --- a/extensions/label/examples/multidataset/spacenet-buildings/AOI_2_Vegas_img2636.json +++ b/extensions/label/examples/multidataset/spacenet-buildings/AOI_2_Vegas_img2636.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "label", "version" @@ -14,7 +14,7 @@ ], "geometry": { "type": "Polygon", - "coordinates": [ + "coordinates": [[ [ -115.23556259985658, 36.12654269972625 @@ -31,7 +31,7 @@ -115.23412932899998, 36.12654269972625 ] - ] + ]] }, "assets": { "labels": { diff --git a/extensions/label/examples/multidataset/spacenet-buildings/AOI_3_Paris_img1648.json b/extensions/label/examples/multidataset/spacenet-buildings/AOI_3_Paris_img1648.json index 548334a4d..19deca38b 100644 --- a/extensions/label/examples/multidataset/spacenet-buildings/AOI_3_Paris_img1648.json +++ b/extensions/label/examples/multidataset/spacenet-buildings/AOI_3_Paris_img1648.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "label", "version" @@ -14,7 +14,7 @@ ], "geometry": { "type": "Polygon", - "coordinates": [ + "coordinates": [[ [ 2.288201399928881, 49.00383090002822 @@ -31,7 +31,7 @@ 2.288201399928881, 49.00558590002751 ] - ] + ]] }, "assets": { "labels": { diff --git a/extensions/label/examples/multidataset/spacenet-buildings/AOI_4_Shanghai_img3344.json b/extensions/label/examples/multidataset/spacenet-buildings/AOI_4_Shanghai_img3344.json index ffde16bc1..e99edcc11 100644 --- a/extensions/label/examples/multidataset/spacenet-buildings/AOI_4_Shanghai_img3344.json +++ b/extensions/label/examples/multidataset/spacenet-buildings/AOI_4_Shanghai_img3344.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "label", "version" @@ -14,7 +14,7 @@ ], "geometry": { "type": "Polygon", - "coordinates": [ + "coordinates": [[ [ 121.66563419996653, 31.234725900085653 @@ -31,7 +31,7 @@ 121.66738919996575, 31.234725900085653 ] - ] + ]] }, "assets": { "labels": { diff --git a/extensions/label/examples/multidataset/spacenet-buildings/collection.json b/extensions/label/examples/multidataset/spacenet-buildings/collection.json index f4fc6da4e..119d4f41b 100644 --- a/extensions/label/examples/multidataset/spacenet-buildings/collection.json +++ b/extensions/label/examples/multidataset/spacenet-buildings/collection.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "id": "spacenet-buildings-collection", "title": "spacenet-buildings AoI", "description": "Collection of training labels for spacenet-buildings", diff --git a/extensions/label/examples/multidataset/zanzibar/collection.json b/extensions/label/examples/multidataset/zanzibar/collection.json index 6263b5a6c..b16f2e73b 100644 --- a/extensions/label/examples/multidataset/zanzibar/collection.json +++ b/extensions/label/examples/multidataset/zanzibar/collection.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "id": "zanzibar-collection", "title": "zanzibar AoI", "description": "Collection of training labels for zanzibar", diff --git a/extensions/label/examples/multidataset/zanzibar/znz001.json b/extensions/label/examples/multidataset/zanzibar/znz001.json index 1f202bdc6..9bec41ccf 100644 --- a/extensions/label/examples/multidataset/zanzibar/znz001.json +++ b/extensions/label/examples/multidataset/zanzibar/znz001.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "label", "version" @@ -14,7 +14,7 @@ ], "geometry": { "type": "Polygon", - "coordinates": [ + "coordinates": [[ [ 39.28919876472999, -5.743028283012867 @@ -31,7 +31,7 @@ 39.28919876472999, -5.722212794937691 ] - ] + ]] }, "assets": { "labels": { diff --git a/extensions/label/examples/multidataset/zanzibar/znz029.json b/extensions/label/examples/multidataset/zanzibar/znz029.json index 282f085f1..d922e8887 100644 --- a/extensions/label/examples/multidataset/zanzibar/znz029.json +++ b/extensions/label/examples/multidataset/zanzibar/znz029.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "label", "version" @@ -14,10 +14,10 @@ ], "geometry": { "type": "Polygon", - "coordinates": [ + "coordinates": [[ [ 39.3411063109548, - -5.878778696206506, + -5.878778696206506 ], [ 39.3411063109548, @@ -31,7 +31,7 @@ 39.356865475223195, -5.878778696206506 ] - ] + ]] }, "assets": { "labels": { diff --git a/extensions/label/examples/spacenet-roads/roads_collection.json b/extensions/label/examples/spacenet-roads/roads_collection.json index 849589a47..77128f816 100644 --- a/extensions/label/examples/spacenet-roads/roads_collection.json +++ b/extensions/label/examples/spacenet-roads/roads_collection.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "id": "spacenet-roads-sample", "description": "A sample of the SpaceNet Roads dataset built during STAC Sprint 4. The dataset contains hand-labeled roads.", "keywords": [ diff --git a/extensions/label/examples/spacenet-roads/roads_item.json b/extensions/label/examples/spacenet-roads/roads_item.json index 4cbb4ee4e..ef0db0b61 100644 --- a/extensions/label/examples/spacenet-roads/roads_item.json +++ b/extensions/label/examples/spacenet-roads/roads_item.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "label", "version" diff --git a/extensions/label/examples/spacenet-roads/roads_source.json b/extensions/label/examples/spacenet-roads/roads_source.json index 445a75e1e..9517e39f5 100644 --- a/extensions/label/examples/spacenet-roads/roads_source.json +++ b/extensions/label/examples/spacenet-roads/roads_source.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [], "type": "Feature", "bbox": [2.23379639995, 49.0178709, 2.23730639995, 49.0213809], diff --git a/extensions/label/json-schema/schema.json b/extensions/label/json-schema/schema.json index f6d1e50e1..951c76297 100644 --- a/extensions/label/json-schema/schema.json +++ b/extensions/label/json-schema/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/label/json-schema/schema.json#", "title": "Label Extension", "description": "STAC Label Data Item Extension Spec", "allOf": [ @@ -22,7 +22,10 @@ "stac_extensions": { "type": "array", "contains": { - "const": "label" + "enum": [ + "label", + "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/label/json-schema/schema.json" + ] } }, "properties": { diff --git a/extensions/pointcloud/README.md b/extensions/pointcloud/README.md index 3f6ca4dcd..c5c3df6fc 100644 --- a/extensions/pointcloud/README.md +++ b/extensions/pointcloud/README.md @@ -12,7 +12,7 @@ come from either active or passive sensors, and data is frequently acquired usin tools such as LiDAR or coincidence-matched imagery. - [Example](examples/example-autzen.json) -- JSON Schema is missing. PRs are welcome. +- [JSON Schema](json-schema/schema.json) ## Item Fields @@ -34,21 +34,20 @@ the point cloud, their types, and their sizes (in full bytes). | ---------- | ------- | -------------------------- | | name | string | **REQUIRED.** The name of the dimension. | | size | integer | **REQUIRED.** The size of the dimension in bytes. Whole bytes only are supported. | -| type | string | **REQUIRED.** Dimension type. Valid values include `floating`, `unsigned`, and `signed` | +| type | string | **REQUIRED.** Dimension type. Valid values are `floating`, `unsigned`, and `signed` | ### Stats Object -A sequential array of items mapping to `pc:schemas` defines per-channel statistics. All fields -are optional. +A sequential array of items mapping to `pc:schemas` defines per-channel statistics. The channel name is required and at least one statistic. | Field Name | Type | Description | | ---------- | ------- | ----------- | +| name | string | **REQUIRED.** The name of the channel. | +| position | integer | Position of the channel in the schema. | | average | number | The average of the channel. | | count | integer | The number of elements in the channel. | | maximum | number | The maximum value of the channel. | | minimum | number | The minimum value of the channel. | -| name | string | The name of the channel. | -| position | integer | Position of the channel in the schema. | | stddev | number | The standard deviation of the channel. | | variance | number | The variance of the channel. | diff --git a/extensions/pointcloud/examples/example-autzen.json b/extensions/pointcloud/examples/example-autzen.json index 70423287f..a9bfbf87e 100644 --- a/extensions/pointcloud/examples/example-autzen.json +++ b/extensions/pointcloud/examples/example-autzen.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "pointcloud" ], @@ -47,7 +47,7 @@ } ], "properties": { - "datetime": "2013-07-17T00:00:00-05:00Z", + "datetime": "2013-07-17T00:00:00Z", "pc:count": 10653336, "pc:density": 0, "pc:encoding": "LASzip", diff --git a/extensions/pointcloud/json-schema/schema.json b/extensions/pointcloud/json-schema/schema.json new file mode 100644 index 000000000..63029d8a3 --- /dev/null +++ b/extensions/pointcloud/json-schema/schema.json @@ -0,0 +1,130 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/pointcloud/json-schema/schema.json#", + "title": "Point Cloud Extension", + "description": "STAC Point Cloud Extension to a STAC Item", + "allOf": [ + { + "$ref": "../../../item-spec/json-schema/item.json" + }, + { + "$ref": "#/definitions/pointcloud" + } + ], + "definitions": { + "pointcloud": { + "type": "object", + "required": [ + "stac_extensions", + "properties" + ], + "properties": { + "stac_extensions": { + "type": "array", + "contains": { + "enum": [ + "pointcloud", + "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/pointcloud/json-schema/schema.json" + ] + } + }, + "properties": { + "type": "object", + "required": [ + "pc:count", + "pc:type", + "pc:encoding", + "pc:schemas" + ], + "properties": { + "pc:count": { + "type": "integer", + "minimum": 0 + }, + "pc:type": { + "type": "string" + }, + "pc:encoding": { + "type": "string" + }, + "pc:schemas": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "pc:density": { + "type": "number", + "minimum": 0 + }, + "pc:statistics": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/stats" + } + } + } + } + } + }, + "schema": { + "type": "object", + "required": [ + "name", + "size", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "size": { + "type": "integer" + }, + "type": { + "type": "string", + "enum": [ + "floating", + "unsigned", + "signed" + ] + } + } + }, + "stats": { + "type": "object", + "minProperties": 2, + "required": [ + "name", + ], + "properties": { + "name": { + "type": "string" + }, + "position": { + "type": "integer" + }, + "average": { + "type": "number" + }, + "count": { + "type": "integer" + }, + "maximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "stddev": { + "type": "number" + }, + "variance": { + "type": "number" + } + } + } + } +} diff --git a/extensions/projection/README.md b/extensions/projection/README.md index 2917aa0b1..a5494d650 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -56,7 +56,7 @@ a WKT2 string does not exist. 'projection') used by the asset data. This value is a [PROJJSON](https://proj.org/specifications/projjson.html) object. If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control Points, proj:projjson should be set to null. It should also be set to null if a CRS exists, but for which -a PROJJSON string does not exist. The schema for this object can be found [here](https://proj.org/schemas/v0.1/projjson.schema.json). +a PROJJSON string does not exist. The schema for this object can be found [here](https://proj.org/schemas/v0.2/projjson.schema.json). **proj:geometry** - A Polygon object representing the footprint of this item, formatted according the Polygon object format specified in [RFC 7946, sections 3.1.6](https://tools.ietf.org/html/rfc7946), except not necessarily diff --git a/extensions/projection/examples/example-landsat8.json b/extensions/projection/examples/example-landsat8.json index 644513f3a..582dad1d0 100644 --- a/extensions/projection/examples/example-landsat8.json +++ b/extensions/projection/examples/example-landsat8.json @@ -1,8 +1,8 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "eo", - "proj" + "projection" ], "id": "LC81530252014153LGN00", "type": "Feature", @@ -75,7 +75,7 @@ "proj:epsg": 32614, "proj:wkt2": "PROJCS[\"WGS 84 / UTM zone 14N\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",-99],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],AUTHORITY[\"EPSG\",\"32614\"],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]]", "proj:projjson": { - "$schema": "https://proj.org/schemas/v0.1/projjson.schema.json", + "$schema": "https://proj.org/schemas/v0.2/projjson.schema.json", "type": "ProjectedCRS", "name": "WGS 84 / UTM zone 14N", "base_crs": { diff --git a/extensions/projection/json-schema/schema.json b/extensions/projection/json-schema/schema.json index 01ba01a49..c55ed352d 100644 --- a/extensions/projection/json-schema/schema.json +++ b/extensions/projection/json-schema/schema.json @@ -1,6 +1,6 @@ { "$schema":"http://json-schema.org/draft-07/schema#", - "$id":"schema.json#", + "$id":"https://schemas.stacspec.org/v1.0.0-beta.2/extensions/projection/json-schema/schema.json#", "title":"Projection Extension", "description":"STAC Projection Extension to a STAC Item", "allOf":[ @@ -22,7 +22,10 @@ "stac_extensions": { "type": "array", "contains": { - "const": "projection" + "enum": [ + "projection", + "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/projection/json-schema/schema.json" + ] } }, "properties":{ @@ -49,7 +52,7 @@ "title":"Coordinate Reference System in PROJJSON format", "oneOf": [ { - "$ref": "https://proj.org/schemas/v0.1/projjson.schema.json" + "$ref": "https://proj.org/schemas/v0.2/projjson.schema.json" }, { "type": "null" @@ -67,8 +70,16 @@ "proj:bbox":{ "title":"Extent", "type":"array", - "minItems":4, - "maxItems":6, + "oneOf": [ + { + "minItems":4, + "maxItems":4 + }, + { + "minItems":6, + "maxItems":6 + } + ], "items":{ "type":"number" } @@ -105,8 +116,16 @@ "proj:transform":{ "title":"Transform", "type":"array", - "minItems":6, - "maxItems":9, + "oneOf": [ + { + "minItems":6, + "maxItems":6 + }, + { + "minItems":9, + "maxItems":9 + } + ], "items":{ "type":"number" } diff --git a/extensions/sar/examples/envisat.json b/extensions/sar/examples/envisat.json index 1aba03984..35f751859 100644 --- a/extensions/sar/examples/envisat.json +++ b/extensions/sar/examples/envisat.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "sat", "sar" @@ -26,7 +26,7 @@ "platform": "envisat", "constellation": "envisat", "instruments": ["asar"], - "sat_orbit_state": "descending", + "sat:orbit_state": "descending", "sar:instrument_mode": "GM", "sar:polarizations": ["HH"], "sar:resolution_range": 1000, diff --git a/extensions/sar/examples/sentinel1.json b/extensions/sar/examples/sentinel1.json index 1337ef306..fd1777bc2 100644 --- a/extensions/sar/examples/sentinel1.json +++ b/extensions/sar/examples/sentinel1.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "checksum", "sar", @@ -65,7 +65,7 @@ "href": "./measurement/s1a-ew-grd-hh-20181103t235855-20181103t235955-024430-02ad5d-001.tiff", "title": "Measurements", "type": "image/tiff", - "sar:bands": ["HH"], + "sar:polarizations": ["HH"], "checksum:multihash": "90e40210163700a8a6501eccd00b6d3b44ddaed0" }, "thumbnail": { diff --git a/extensions/sar/json-schema/schema.json b/extensions/sar/json-schema/schema.json index d80248a11..ff3b8629c 100644 --- a/extensions/sar/json-schema/schema.json +++ b/extensions/sar/json-schema/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/sar/json-schema/schema.json#", "title": "SAR Extension", "description": "STAC SAR Extension to a STAC Item", "allOf": [ @@ -23,7 +23,10 @@ "stac_extensions": { "type": "array", "contains": { - "const": "sar" + "enum": [ + "sar", + "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/sar/json-schema/schema.json" + ] } }, "properties": { diff --git a/extensions/sat/examples/example-landsat8.json b/extensions/sat/examples/example-landsat8.json index f0220170e..5c7ae8f6e 100644 --- a/extensions/sat/examples/example-landsat8.json +++ b/extensions/sat/examples/example-landsat8.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "sat", "view" diff --git a/extensions/sat/json-schema/schema.json b/extensions/sat/json-schema/schema.json index 697cd33b4..fc2bbf0c3 100644 --- a/extensions/sat/json-schema/schema.json +++ b/extensions/sat/json-schema/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/sat/json-schema/schema.json#", "title": "Sat Extension", "description": "STAC Sat Extension to a STAC Item.", "allOf": [ @@ -25,7 +25,10 @@ "stac_extensions": { "type": "array", "contains": { - "const": "sat" + "enum": [ + "sat", + "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/sat/json-schema/schema.json" + ] } }, "properties": { diff --git a/extensions/scientific/examples/collection.json b/extensions/scientific/examples/collection.json index e53427970..83a7bb56b 100644 --- a/extensions/scientific/examples/collection.json +++ b/extensions/scientific/examples/collection.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": ["scientific"], "id": "MERRAclim", "title": "MERRAclim, a high-resolution global dataset of remotely sensed bioclimatic variables for ecological modelling.", diff --git a/extensions/scientific/examples/item.json b/extensions/scientific/examples/item.json index e914c0058..2b4cbe0ff 100644 --- a/extensions/scientific/examples/item.json +++ b/extensions/scientific/examples/item.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "scientific", "checksum" diff --git a/extensions/scientific/json-schema/schema.json b/extensions/scientific/json-schema/schema.json index b1f7b583f..892670b32 100644 --- a/extensions/scientific/json-schema/schema.json +++ b/extensions/scientific/json-schema/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/scientific/json-schema/schema.json#", "title": "Scientific Extension", "description": "STAC Scientific Extension to STAC Items or STAC Collections.", "oneOf": [ @@ -49,7 +49,10 @@ "stac_extensions": { "type": "array", "contains": { - "const": "scientific" + "enum": [ + "scientific", + "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/scientific/json-schema/schema.json" + ] } } } diff --git a/extensions/single-file-stac/README.md b/extensions/single-file-stac/README.md index 6ed9c4c10..6f6583431 100644 --- a/extensions/single-file-stac/README.md +++ b/extensions/single-file-stac/README.md @@ -8,8 +8,6 @@ An extension to provide a set of Collections and Items within a single file catalog. The single file is a STAC catalog that contains everything that would normally be in a linked set of STAC files. This format is useful to save a portion of a catalog, or when creating a small catalog from derived data that should remain portable. It is most useful for saving the results of a search from a STAC API, as the Items, Collections, and optionally the search parameters are all saved within the single file. Hierarchical links have no meaning in a single file STAC, and so, if present, should be removed when creating a single file catalog. -The Items in the single file catalog should not be merged with the Collection properties (i.e., common properties). The Collections are all included in the file as well, so there is no need to duplicate the common properties for every Item in the catalog. - - [Example](examples/example-search.json) - [JSON Schema](json-schema/schema.json) diff --git a/extensions/single-file-stac/examples/example-search.json b/extensions/single-file-stac/examples/example-search.json index 4a8e00fd8..ba9892033 100644 --- a/extensions/single-file-stac/examples/example-search.json +++ b/extensions/single-file-stac/examples/example-search.json @@ -1,6 +1,6 @@ { "id": "mysearchresults", - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "single-file-stac" ], @@ -8,7 +8,7 @@ "type": "FeatureCollection", "features": [ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "projection", "view", @@ -145,7 +145,7 @@ "links": [] }, { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "projection", "view", @@ -292,21 +292,29 @@ "earth observation", "usgs" ], - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "item_assets" ], "extent": { - "spatial": [ - -180, - -90, - 180, - 90 - ], - "temporal": [ - "2013-06-01", - null - ] + "spatial": { + "bbox": [ + [ + -180, + -90, + 180, + 90 + ] + ] + }, + "temporal": { + "interval": [ + [ + "2013-06-01T00:00:00Z", + null + ] + ] + } }, "providers": [ { diff --git a/extensions/single-file-stac/json-schema/schema.json b/extensions/single-file-stac/json-schema/schema.json index 7a247d28e..0dd9086a7 100644 --- a/extensions/single-file-stac/json-schema/schema.json +++ b/extensions/single-file-stac/json-schema/schema.json @@ -1,11 +1,11 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/single-file-stac/json-schema/schema.json#", "title": "Single File STAC Extension", "description": "Single File STAC Extension to combine Collections and Items in single file catalog", "allOf": [ { - "$ref": "../../catalog-spec/json-schema/catalog.json" + "$ref": "../../../catalog-spec/json-schema/catalog.json" }, { "$ref": "https://geojson.org/schema/FeatureCollection.json" @@ -25,19 +25,22 @@ "stac_extensions": { "type": "array", "contains": { - "const": "single-file-stac" + "enum": [ + "single-file-stac", + "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/single-file-stac/json-schema/schema.json" + ] } }, "collections": { "type": "array", "items": { - "$ref": "../../collection-spec/json-schema/collection.json" + "$ref": "../../../collection-spec/json-schema/collection.json" } }, "features": { "type": "array", "items": { - "$ref": "../../item-spec/json-schema/item.json" + "$ref": "../../../item-spec/json-schema/item.json" } } } diff --git a/extensions/tiled-assets/README.md b/extensions/tiled-assets/README.md index ef8ebeae0..89b105726 100644 --- a/extensions/tiled-assets/README.md +++ b/extensions/tiled-assets/README.md @@ -83,7 +83,7 @@ This object allows to specify subset region of the source tileset. This concept | min_tile_row | number | Minimum tile row index valid for this layer. If not specified it uses the the one from the referenced tile matrix. | | max_tile_row | number | Maximum tile row index valid for this layer. If not specified it uses the the one from the referenced tile matrix. | | min_tile_col | number | Minimum tile column index valid for this layer. If not specified it uses the the one from the referenced tile matrix. | -| max_tile_rol | number | Maximum tile column index valid for this layer. If not specified it uses the the one from the referenced tile matrix. | +| max_tile_col | number | Maximum tile column index valid for this layer. If not specified it uses the the one from the referenced tile matrix. | ### Pixel Buffer Object diff --git a/extensions/tiled-assets/examples/example-dimension.json b/extensions/tiled-assets/examples/example-dimension.json index baad8ed62..842acfa70 100644 --- a/extensions/tiled-assets/examples/example-dimension.json +++ b/extensions/tiled-assets/examples/example-dimension.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "datacube", "eo", diff --git a/extensions/tiled-assets/examples/example-tiled.json b/extensions/tiled-assets/examples/example-tiled.json index 8bc58d53b..381b134ab 100644 --- a/extensions/tiled-assets/examples/example-tiled.json +++ b/extensions/tiled-assets/examples/example-tiled.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "eo", "tiled-assets" diff --git a/extensions/tiled-assets/json-schema/schema.json b/extensions/tiled-assets/json-schema/schema.json index ec5d83dd9..4f0e19bb0 100644 --- a/extensions/tiled-assets/json-schema/schema.json +++ b/extensions/tiled-assets/json-schema/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "stac-extension-tiled-assets.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/tiled-assets/json-schema/schema.json#", "title": "Tiled Assets Extension", "description": "Tiled Assets Extension to a STAC Item", "oneOf": [ @@ -52,7 +52,10 @@ "stac_extensions": { "type": "array", "contains": { - "const": "tiled-assets" + "enum": [ + "tiled-assets", + "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/tiled-assets/json-schema/schema.json" + ] } } } @@ -161,7 +164,7 @@ "type": "integer", "description": "Minimum tile column index valid for this layer. If not specified it uses the the one from the referenced tile matrix." }, - "max_tile_rol": { + "max_tile_col": { "type": "integer", "description": "Maximum tile column index valid for this layer. If not specified it uses the the one from the referenced tile matrix." } diff --git a/extensions/timestamps/examples/example-landsat8.json b/extensions/timestamps/examples/example-landsat8.json index 37c7180f2..3cdd5eac2 100644 --- a/extensions/timestamps/examples/example-landsat8.json +++ b/extensions/timestamps/examples/example-landsat8.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "timestamps" ], @@ -80,5 +80,6 @@ "created": "2018-10-02T00:00:02Z", "updated": "2020-05-20T12:13:01Z" } - } + }, + "links": [] } diff --git a/extensions/timestamps/json-schema/schema.json b/extensions/timestamps/json-schema/schema.json index 0dfc662f5..6d6723e0f 100644 --- a/extensions/timestamps/json-schema/schema.json +++ b/extensions/timestamps/json-schema/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/timestamps/json-schema/schema.json#", "title": "Timestamps Extension", "description": "STAC Timestamps Extension to a STAC Item.", "allOf": [ @@ -18,7 +18,10 @@ "stac_extensions": { "type": "array", "contains": { - "const": "timestamps" + "enum": [ + "timestamps", + "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/timestamps/json-schema/schema.json" + ] } }, "properties": { diff --git a/extensions/version/examples/collection.json b/extensions/version/examples/collection.json index fdb01b8a9..bb2168df1 100644 --- a/extensions/version/examples/collection.json +++ b/extensions/version/examples/collection.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": ["version"], "id": "merraclim", "title": "MERRAclim", diff --git a/extensions/version/examples/item.json b/extensions/version/examples/item.json index 10abc2886..f996aa77d 100644 --- a/extensions/version/examples/item.json +++ b/extensions/version/examples/item.json @@ -1,10 +1,9 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "version" ], "id": "MERRAclim.2_5m_min_80s", - "version": "1", "type": "Feature", "geometry": { "type": "Polygon", @@ -20,6 +19,7 @@ }, "bbox": [-180,-90,180,90], "properties": { + "version": "1", "title": "MERRAclim. 2_5m_min_80s", "description": "MERRAclim Dataset. 19 global bioclimatic variables from the 1980s decade at 2.5 arcminutes resolution in GEOtiff format. The humidity version used is the min. The variables have been built using the same protocol as WorldClim with data from MERRA. Temperature layers (BIO1-BIO11) are in degree Celsius multiplied by 10, humidity layers (BIO12-BIO19) are in kg of water/kg of air multiplied by 100000.", "datetime": "1985-07-01T00:00:00Z" diff --git a/extensions/version/json-schema/schema.json b/extensions/version/json-schema/schema.json index f665b2c30..59c246cb6 100644 --- a/extensions/version/json-schema/schema.json +++ b/extensions/version/json-schema/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/version/json-schema/schema.json#", "title": "Versioning Indicators Extension", "description": "STAC Versioning Indicators Extension for STAC Items or STAC Collections.", "oneOf": [ @@ -49,7 +49,10 @@ "stac_extensions": { "type": "array", "contains": { - "const": "version" + "enum": [ + "version", + "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/version/json-schema/schema.json" + ] } } } diff --git a/extensions/view/README.md b/extensions/view/README.md index 270e0bc64..328bd90a3 100644 --- a/extensions/view/README.md +++ b/extensions/view/README.md @@ -32,7 +32,7 @@ The angles `azimuth` and `sun_azimuth` indicate the position of the viewed scene Example: ```js { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "view", "sat" diff --git a/extensions/view/examples/example-landsat8.json b/extensions/view/examples/example-landsat8.json index 4b726e9b0..82ad8c6ba 100644 --- a/extensions/view/examples/example-landsat8.json +++ b/extensions/view/examples/example-landsat8.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "sat", "view" diff --git a/extensions/view/json-schema/schema.json b/extensions/view/json-schema/schema.json index 9d3bcfe8f..f0418ff17 100644 --- a/extensions/view/json-schema/schema.json +++ b/extensions/view/json-schema/schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/view/json-schema/schema.json#", "title": "View Geometry Extension", "description": "STAC View Geometry Extension to a STAC Item.", "allOf": [ @@ -22,7 +22,10 @@ "stac_extensions": { "type": "array", "contains": { - "const": "view" + "enum": [ + "view", + "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/view/json-schema/schema.json" + ] } }, "properties": { diff --git a/item-spec/README.md b/item-spec/README.md index 429a40b16..a56e801b8 100644 --- a/item-spec/README.md +++ b/item-spec/README.md @@ -3,9 +3,8 @@ The core of a SpatioTemporal Asset Catalog (STAC) is a set of JSON fields defined by the [STAC Item spec](item-spec.md). These fields define an Item - the atomic units that contain metadata for search as plus links to the actual assets that they represent. Their main function -is as the leaf nodes of a [Catalog](../catalog-spec/README.md), and are also returned from the search -endpoints of a `/search` endpoint. See the [overview](../overview.md) document for more information on how all the -pieces fit together. +is as the leaf nodes of a [Catalog](../catalog-spec/README.md). +See the [overview](../overview.md) document for more information on how all the pieces fit together. ## In this directory @@ -22,7 +21,3 @@ discussion of the examples. **Schemas:** The schemas to validate the core Item definitions are found in the *[json-schema/](json-schema/)* folder. The *[item.json](json-schema/item.json)* validates items overall and the additional schemas validate the various groups of *[Common Metadata](common-metadata.md)*. - -## Schema Validation - -Instruction on schema validation for STAC Items can be found in the [validation instructions](../validation/README.md). diff --git a/item-spec/common-metadata.md b/item-spec/common-metadata.md index 8969fcfd3..8df4c1153 100644 --- a/item-spec/common-metadata.md +++ b/item-spec/common-metadata.md @@ -1,6 +1,9 @@ # STAC Common Metadata -This document outlines all commonly used fields for STAC Item properties. These fields are -included by default in the core [Item schema](json-schema/item.json) but implementation is not required. + +This document outlines commonly used fields in STAC. +They are often used in [STAC Item properties](item-spec.md#properties-object), +but can also be used in other places, e.g. [Item Assets](item-spec.md#asset-object) +or [Collection Assets](../extensions/collection-assets/README.md). - [STAC Common Metadata](#stac-common-metadata) - [Basics](#basics) @@ -15,6 +18,11 @@ included by default in the core [Item schema](json-schema/item.json) but impleme Various *examples* are available in the folder [`examples`](examples/). *JSON Schemas* can be found in the folder [`json-schema`](json-schema/). +By default, these fields are only included and validated against in the core [Item schema](json-schema/item.json). +Implementation of any of the fields is not required, +if the specifications allowing these fields to be used don't say differently. +For example, `datetime` is required in STAC Items. + ## Basics Descriptive fields to give a basic overview of a STAC Item. @@ -49,7 +57,7 @@ There are more date and time related fields available in the [Timestamps extensi ### Date and Time Range While a STAC item can have a nominal datetime describing the capture, these properties allow 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/). +of capture dates and times. 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. Both fields are also REQUIRED if the `datetime` field is set to `null`. diff --git a/item-spec/examples/CBERS_4_MUX_20181029_177_106_L4.json b/item-spec/examples/CBERS_4_MUX_20181029_177_106_L4.json index f171bbd09..c041737fd 100755 --- a/item-spec/examples/CBERS_4_MUX_20181029_177_106_L4.json +++ b/item-spec/examples/CBERS_4_MUX_20181029_177_106_L4.json @@ -1,7 +1,7 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ - "proj", + "projection", "view", "https://example.com/stac/cbers-extension/1.0/schema.json" ], @@ -46,7 +46,7 @@ "datetime": "2018-10-29T14:24:54Z", "view:sun_azimuth": 111.113, "view:sun_elevation": 65.8018, - "view:off_nadir": -0.00751271, + "view:off_nadir": 0.00751271, "proj:epsg": 32763, "cbers:data_type": "L4", "cbers:path": 177, diff --git a/item-spec/examples/datetimerange.json b/item-spec/examples/datetimerange.json index 58aab5f8a..7e187eddd 100644 --- a/item-spec/examples/datetimerange.json +++ b/item-spec/examples/datetimerange.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [], "type":"Feature", "id":"half-moon-bay/video-2018-01-01-0001", diff --git a/item-spec/examples/digitalglobe-sample.json b/item-spec/examples/digitalglobe-sample.json index 583f41966..5396b0cb6 100644 --- a/item-spec/examples/digitalglobe-sample.json +++ b/item-spec/examples/digitalglobe-sample.json @@ -1,13 +1,19 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "eo", - "proj", + "projection", "view", "https://example.digitalglobe.com/stac/1.0/schema.json" ], "id": "103001004B316600_P002_MUL", "type": "Feature", + "bbox": [ + -105.161151214, + 39.0436821016, + -104.947574355, + 39.1750024943 + ], "geometry": { "type": "Polygon", "coordinates": [ @@ -62,7 +68,9 @@ }, "thumbnail": { "href": "https://15NOV09180446-M1BS-056823192010_01_P002.JPG", - "roles": [ "thumbnail" ] + "roles": [ + "thumbnail" + ] } }, "properties": { @@ -86,17 +94,17 @@ "dg:platform": "worldview02", "dg:product_level": "LV1B", "dg:product": "worldview02_lv1b", - "datetime": "2015-11-09T18:04:46.000Z" + "datetime": "2015-11-09T18:04:46Z" }, "collection": "dg_worldview02", - "links": [ - { - "rel": "self", - "href": "https://s3.amazonaws.com/digitalglobe-catalog-spec/collections/dg_worldview02_lv1b/103001004B316600_P002_MUL" - }, - { - "rel": "collection", - "href": "https://s3.amazonaws.com/digitalglobe-catalog-spec/collections/dg_worldview02_lv1b.json" - } - ] -} + "links": [ + { + "rel": "self", + "href": "https://s3.amazonaws.com/digitalglobe-catalog-spec/collections/dg_worldview02_lv1b/103001004B316600_P002_MUL" + }, + { + "rel": "collection", + "href": "https://s3.amazonaws.com/digitalglobe-catalog-spec/collections/dg_worldview02_lv1b.json" + } + ] +} \ No newline at end of file diff --git a/item-spec/examples/landsat8-sample.json b/item-spec/examples/landsat8-sample.json index e4bae230a..ace3f2bb6 100644 --- a/item-spec/examples/landsat8-sample.json +++ b/item-spec/examples/landsat8-sample.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "eo", "view", diff --git a/item-spec/examples/planet-sample.json b/item-spec/examples/planet-sample.json index 667da56f8..92c10375e 100644 --- a/item-spec/examples/planet-sample.json +++ b/item-spec/examples/planet-sample.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "eo", "view", diff --git a/item-spec/examples/sample-full.json b/item-spec/examples/sample-full.json index e5f3836df..4e3963d7b 100644 --- a/item-spec/examples/sample-full.json +++ b/item-spec/examples/sample-full.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "eo", "view", diff --git a/item-spec/examples/sample.json b/item-spec/examples/sample.json index 3c4be5c16..11f708f15 100644 --- a/item-spec/examples/sample.json +++ b/item-spec/examples/sample.json @@ -1,5 +1,5 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [], "type": "Feature", "id": "CS3-20160503_132130_04", diff --git a/item-spec/examples/sentinel2-sample.json b/item-spec/examples/sentinel2-sample.json index b92a2e967..3d0acfca2 100644 --- a/item-spec/examples/sentinel2-sample.json +++ b/item-spec/examples/sentinel2-sample.json @@ -1,8 +1,8 @@ { - "stac_version": "1.0.0-beta.1", + "stac_version": "1.0.0-beta.2", "stac_extensions": [ "view", - "proj" + "projection" ], "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 f8eb3560d..7c5fdb375 100644 --- a/item-spec/item-spec.md +++ b/item-spec/item-spec.md @@ -33,8 +33,8 @@ inherited from GeoJSON. | stac_extensions | \[string] | A list of extensions the Item implements. | | id | string | **REQUIRED.** Provider identifier. As most geospatial assets are already defined by some identification scheme by the data provider it is recommended to simply use that ID. Data providers are advised to include sufficient information to make their IDs globally unique, including things like unique satellite IDs. | | type | string | **REQUIRED.** Type of the GeoJSON Object. MUST be set to `Feature`. | -| geometry | [GeoJSON Geometry Object](https://tools.ietf.org/html/rfc7946#section-3.1) | **REQUIRED.** Defines the full footprint of the asset represented by this item, formatted according to [RFC 7946, section 3.1](https://tools.ietf.org/html/rfc7946#section-3.1). The footprint should be the default GeoJSON geometry, though additional geometries can be included. Coordinates are specified in Longitude/Latitude or Longitude/Latitude/Elevation based on [WGS 84](http://www.opengis.net/def/crs/OGC/1.3/CRS84). | -| bbox | \[number] | **REQUIRED.** Bounding Box of the asset represented by this item, formatted according to [RFC 7946, section 5](https://tools.ietf.org/html/rfc7946#section-5). | +| geometry | [GeoJSON Geometry Object](https://tools.ietf.org/html/rfc7946#section-3.1) \| [null](https://tools.ietf.org/html/rfc7946#section-3.2) | **REQUIRED.** Defines the full footprint of the asset represented by this item, formatted according to [RFC 7946, section 3.1](https://tools.ietf.org/html/rfc7946#section-3.1). The footprint should be the default GeoJSON geometry, though additional geometries can be included. Coordinates are specified in Longitude/Latitude or Longitude/Latitude/Elevation based on [WGS 84](http://www.opengis.net/def/crs/OGC/1.3/CRS84). | +| bbox | \[number] | **REQUIRED if `geometry` is not `null`.** Bounding Box of the asset represented by this item, formatted according to [RFC 7946, section 5](https://tools.ietf.org/html/rfc7946#section-5). | | properties | [Properties Object](#properties-object) | **REQUIRED.** A dictionary of additional metadata for the item. | | links | \[[Link Object](#link-object)] | **REQUIRED.** List of link objects to resources and related URLs. A link with the `rel` set to `self` is strongly recommended. | | assets | Map | **REQUIRED.** Dictionary of asset objects that can be downloaded, each with a unique key. | @@ -229,7 +229,7 @@ extensions can add further property fields as well. Any property that can be spe a specific asset. This can be used to override a property defined in the Item, or to specify fields for which there is no single value for all assets. -**It is important to note that the STAC API does not faciliate searching across Asset properties in this way, and this +**It is important to note that the STAC API does not facilitate searching across Asset properties in this way, and this should be used sparingly.** It is primarily used to define properties at the Asset level that may be used during use of the data instead of for searching. diff --git a/item-spec/json-schema/basics.json b/item-spec/json-schema/basics.json index 858fddb18..6dfed95a1 100644 --- a/item-spec/json-schema/basics.json +++ b/item-spec/json-schema/basics.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "basics.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/item-spec/json-schema/basics.json#", "title": "Basic Descriptive Fields", "type": "object", "properties": { diff --git a/item-spec/json-schema/datetime.json b/item-spec/json-schema/datetime.json index fe8dd55ae..85a45b042 100644 --- a/item-spec/json-schema/datetime.json +++ b/item-spec/json-schema/datetime.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/item-spec/json-schema/datetime.json#", "title": "Date and Time Fields", "type": "object", "allOf": [ @@ -22,7 +22,7 @@ ], "properties": { "datetime": { - "$ref": "#/definitions/datetime_string" + "$ref": "#/definitions/datetime" }, "start_datetime": { "$ref": "#/definitions/start_datetime" @@ -54,7 +54,7 @@ "datetime": { "oneOf": [ { - "$ref": "#/definitions/datetime_string" + "$ref": "#/definitions/datetime" }, { "type": ["null"], @@ -74,6 +74,24 @@ } ], "definitions": { + "datetime": { + "title": "Date and Time", + "description": "The searchable date/time of the assets, in UTC (Formatted in RFC 3339) ", + "type": "string", + "format": "date-time" + }, + "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" + }, "created": { "title": "Creation Time", "type": "string", diff --git a/item-spec/json-schema/instrument.json b/item-spec/json-schema/instrument.json index a42f22a28..a92cc9c68 100644 --- a/item-spec/json-schema/instrument.json +++ b/item-spec/json-schema/instrument.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "instrument.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/item-spec/json-schema/instrument.json#", "title": "Instrument Fields", "type": "object", "properties": { @@ -26,6 +26,6 @@ "gsd": { "title": "Ground Sample Distance", "type": "number" - }, + } } } \ No newline at end of file diff --git a/item-spec/json-schema/item.json b/item-spec/json-schema/item.json index 952e974aa..00496a76d 100644 --- a/item-spec/json-schema/item.json +++ b/item-spec/json-schema/item.json @@ -1,10 +1,9 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "item.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/item-spec/json-schema/item.json#", "title": "STAC Item", "type": "object", "description": "This object represents the metadata for an item in a SpatioTemporal Asset Catalog.", - "additionalProperties": true, "allOf": [ { "$ref": "#/definitions/core" @@ -35,6 +34,52 @@ { "$ref": "https://geojson.org/schema/Feature.json" }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "geometry", + "bbox" + ], + "properties": { + "geometry": { + "$ref": "https://geojson.org/schema/Geometry.json" + }, + "bbox": { + "type": "array", + "oneOf": [ + { + "minItems": 4, + "maxItems": 4 + }, + { + "minItems": 6, + "maxItems": 6 + } + ], + "items": { + "type": "number" + } + } + } + }, + { + "type": "object", + "required": [ + "geometry" + ], + "properties": { + "geometry": { + "type": "null" + }, + "bbox": { + "not": {} + } + } + } + ] + }, { "type": "object", "required": [ @@ -42,14 +87,13 @@ "id", "links", "assets", - "bbox", "properties" ], "properties": { "stac_version": { "title": "STAC version", "type": "string", - "const": "1.0.0-beta.1" + "const": "1.0.0-beta.2" }, "stac_extensions": { "title": "STAC extensions", @@ -74,13 +118,6 @@ "description": "Provider item ID", "type": "string" }, - "bbox": { - "type": "array", - "minItems": 4, - "items": { - "type": "number" - } - }, "links": { "title": "Item links", "description": "Links to item relations", diff --git a/item-spec/json-schema/licensing.json b/item-spec/json-schema/licensing.json index 15ee977c8..b06ea2f6a 100644 --- a/item-spec/json-schema/licensing.json +++ b/item-spec/json-schema/licensing.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "licensing.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/item-spec/json-schema/licensing.json#", "title": "Licensing Fields", "type": "object", "properties": { diff --git a/item-spec/json-schema/provider.json b/item-spec/json-schema/provider.json index 995d996ed..f061598b9 100644 --- a/item-spec/json-schema/provider.json +++ b/item-spec/json-schema/provider.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "provider.json#", + "$id": "https://schemas.stacspec.org/v1.0.0-beta.2/item-spec/json-schema/provider.json#", "title": "Provider Fields", "type": "object", "properties": { diff --git a/package.json b/package.json index 12f221a6d..eda64f958 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,16 @@ { "name": "stac-spec", - "version": "1.0.0-beta.1", + "version": "1.0.0-beta.2", "description": "STAC spec helpers to check the spec.", "repository": "https://github.com/radiantearth/stac-spec", "license": "Apache-2.0", "scripts": { - "check-markdown": "remark . -f -r .circleci/rc.yaml" + "check-markdown": "remark . -f -r .circleci/rc.yaml", + "publish-schemas": "node .circleci/publish-schemas.js" }, "dependencies": { + "gh-pages": "^3.0.0", + "klaw-sync": "^6.0.0", "remark-cli": "^8.0.0", "remark-lint": "^7.0.0", "remark-lint-no-html": "^2.0.0", diff --git a/process.md b/process.md index 464b550f4..e967b37ab 100644 --- a/process.md +++ b/process.md @@ -34,15 +34,13 @@ open issues against the milestone. * **Agreement from core team**: The core STAC team should meet (on phone or on gitter) and decided that the release is ready. This should include review of the issues, as well as looking at the spec holistically, to make sure the new changes keep with a coherent whole. -* **Validate Examples**: All examples given in the specification should be programmatically validated against their relevant -schema. For 0.6.0-RC1 and before this is a manual process, but with CirclCI in place this should happen automatically. But -someone should still review that all the schemas have been updated and align with the current state of the spec, as that -can not happen automatically. * **Final Spec Read Through**: There should be a final read through of the core specification to make sure it makes sense and there are no typos, errors, etc. -* **Update the version numbers**: There are several places in the spec that use the version number in text or a link. These -include the readme, and the openapi specs. Right now the best thing to do is just a search & replace. Hopefully in the future -there will be scripts or continuous integration to do this. +* **Update the version numbers**: There are several places in the spec that use the version number or a branch name in text +or a link. These include the markdown files and the JSON schemas. Right now the best thing to do is just a search & replace +for the last version number and `https://schemas.stacspec.org/dev/` with `https://schemas.stacspec.org//` +(in JSON Schemas, don't replace it here). `` must correspond with the tag on GitHub, usually including a leading `v`. +Hopefully in the future there will be scripts to do this. * **Update the Changelog**: The [changelog](CHANGELOG.md) should be reviewed to make sure it includes all major improvements in the release. And anything in 'unreleased' section should move to the version of the spec to be released. * **Merge dev to master**: As there is no 'build' process, since the specification *is* the markdown files in the github diff --git a/validation/README.md b/validation/README.md deleted file mode 100644 index f362d7ca7..000000000 --- a/validation/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# STAC Schema Validation - -Any JSON Schema validation tool can be used, just run the JSON data to test -against the various STAC schema, and be sure to include any remote schema -in the testing. - -This directory includes installation instructions for a Python validator and -a JavaScript validator. The python validator is more complete and the -recommnded tool for validation. The Javascript validator has been deprecated -and will be removed in the next release. - -## Python Validator - -Install the validator from the -[stac-validator](https://github.com/sparkgeo/stac-validator) repository and -follow the instructions. - -The validator can be run as a command line tool and will report on nested -catalogs as well as single items. There is no need to specifically identify -individual catalogs or items. - -### Usage - -```bash -Description: Validate a STAC item or catalog against the STAC specification. - -Usage: - stac_validator.py [-version] [--verbose] [--timer] - -Arguments: - stac_file Fully qualified path or url to a STAC file. - -Options: - -v, --version STAC_VERSION Version to validate against. [default: master] - -h, --help Show this screen. - --verbose Verbose output. [default: False] - --timer Reports time to validate the STAC (seconds) -``` - -E.g. - -```bash -stac_validator.py https://earth-stac.s3.amazonaws.com/eo/landsat-8-l1/catalog.json -v latest -{ - "catalogs": { - "valid": 1, - "invalid": 0 - }, - "collections": { - "valid": 0, - "invalid": 0 - }, - "items": { - "valid": 0, - "invalid": 0 - } -} -```