From 6ba491119826c7b9ab3692ead0ce4e31714b6981 Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Fri, 7 Jun 2019 13:41:23 -0700 Subject: [PATCH 01/32] projection extension --- extensions/eo/README.md | 9 +-- extensions/projection/README.md | 119 ++++++++++++++++++++++++++++++ extensions/projection/schema.json | 52 +++++++++++++ 3 files changed, 172 insertions(+), 8 deletions(-) create mode 100644 extensions/projection/README.md create mode 100644 extensions/projection/schema.json diff --git a/extensions/eo/README.md b/extensions/eo/README.md index fd73e8966..a3d66b9ee 100644 --- a/extensions/eo/README.md +++ b/extensions/eo/README.md @@ -25,12 +25,11 @@ The exact metadata that would appear in a STAC Collection record will vary depen | Field Name | Type | Description | | ---------------- | ------------------------ | ----------- | -| eo:gsd | number | **REQUIRED.** Ground Sample distance. The nominal distance between pixel centers available, in meters. | +| eo:gsd | number | **REQUIRED.** Ground Sample Distance. The nominal distance between pixel centers available, in meters. | | eo:platform | string | **REQUIRED.** Unique name of the specific platform the instrument is attached to. For satellites this would be the name of the satellite (e.g., landsat-8, sentinel-2A), whereas for drones this would be a unique name for the drone. | | eo:constellation | string | Name of the constellation that the platform belongs to. See below for details. | | eo:instrument | string | **REQUIRED.** Name of instrument or sensor used (e.g., MODIS, ASTER, OLI, Canon F-1). | | eo:bands | [Band Object] | **REQUIRED.** This is a list of the available bands where each item is a Band Object. | -| eo:epsg | integer\|null | [EPSG code](http://www.epsg-registry.org/) of the datasource, `null` if no EPSG code. | | eo:cloud_cover | number | Estimate of cloud cover as a percentage (0-100) of the entire scene. If not available the field should not be provided. | | eo:off_nadir | number | Viewing angle. The angle from the sensor between nadir (straight down) and the scene center. Measured in degrees (0-90). | | eo:azimuth | number | Viewing azimuth angle. The angle measured from the sub-satellite point (point on the ground below the platform) between the scene center and true north. Measured clockwise from north in degrees (0-360). | @@ -51,12 +50,6 @@ multiple sensors this could also name multiple sensors. For example, data from t platform is collected with the OLI sensor as well as the TIRS sensor, but the data is distributed together and commonly referred to as OLI_TIRS. -**eo:epsg** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a -'projection') used by the data, and can usually be referenced using an [EPSG code](http://epsg.io). -If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control -Points, eo:epsg should be set to null. It should also be set to null if a CRS exists, but for which -there is no valid EPSG code. - ### Band Object | Field Name | Type | Description | diff --git a/extensions/projection/README.md b/extensions/projection/README.md new file mode 100644 index 000000000..f1a86921d --- /dev/null +++ b/extensions/projection/README.md @@ -0,0 +1,119 @@ +# Projection Extension Specification (`proj`) + +**Extension [Maturity Classification](../README.md#extension-maturity): Proposal** + +This document explains the fields of the STAC Projection (`proj`) Extension to a STAC Item or Asset. + +When specified on an Item, the values apply to all Assets in that Item, unless otherwise explicitly defined within an Item. For example, an Item may have several related Assets each representing a band for the Item, all of which are in the same native CRS, e.g., a UTM Zone. However, there may also be assets intended for display, like a preview image or thumbnail, that have been reprojected to a different CRS, e.g., Web Mercator, to better accommodate that use case. + +## Item or Asset fields + +| Field Name | Type | Description | +| ---------------- | ------------------------ | ----------- | +| proj:epsg | integer\|null | [EPSG code](http://www.epsg-registry.org/) of the datasource | +| proj:crs | string \|null | Proj4 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:extent` fields represent | +| proj:geometry | [GeoJSON Polygon Object](https://tools.ietf.org/html/rfc7946#section-3.1.6) | Recommended. Defines the footprint of this item, formatted according to [RFC 7946, sections 3.1.6](https://tools.ietf.org/html/rfc7946), except not necessarily in EPSG:4326 as required by RFC7946 | +| proj:extent | [number] | Bounding box of the asset represented by this item in the native CRS | +| proj:centroid | [number] | Coordinates representing the centroid of the item in the native CRS | + +**proj:epsg** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a +'projection') used by the data, and can usually be referenced using an [EPSG code](http://epsg.io). +If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control +Points, eo:epsg should be set to null. It should also be set to null if a CRS exists, but for which +there is no valid EPSG code. + +**proj:crs** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a +'projection') used by the data. This value is a Proj4 string. +If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control +Points, eo:crs should be set to null. It should also be set to null if a CRS exists, but for which +a Proj4 string does not exist (tbd: is that possible?). + +**proj:geometry** - A [GeoJSON Polygon Object](https://tools.ietf.org/html/rfc7946#section-3.1.6) representing the footprint of this item, formatted according to [RFC 7946, sections 3.1.6](https://tools.ietf.org/html/rfc7946), except not necessarily in EPSG:4326 as required by RFC7946. Specified based on the `proj:crs` field (not necessarily EPSG:4326). Ideally, this will be represented by a Polygon with five coordinates, as the item in the native CRS should be a square aligned to the CRS grid. + +**proj:extent** - Bounding box of the asset represented by this item in the native CRS. Specified as four coordinates based on the CRS defined in the eo:crs field. First two numbers are coordinates of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north] + +**proj:centroid** - Coordinates representing the centroid of the item in the native coordinate system. Coordinates defined as \[lat,lon], even if the native coordinate system does not use lat/long. + +## Examples + +``` +{ + "id": "LC81530252014153LGN00", + "type": "Feature", + ... + "proj:crs": "+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs ", + "proj:epsg": 32614, + "proj:geometry": { + "coordinates": [ + [ + [ + 169200.0, + 3712800.0 + ], + [ + 403200.0, + 3712800.0 + ], + [ + 403200.0, + 3951000.0 + ], + [ + 169200.0, + 3951000.0 + ], + [ + 169200.0, + 3712800.0 + ] + ] + ], + "type": "Polygon" + }, + "proj:extent": [ 169200.0, 3712800.0 403200.0, 3951000.0 ], + "proj:centroid": [ 34.595302781575604, -101.34448382627504 ], + "assets" :{ + "B1": { + "href": "http://example.com/L8/153/025/LC81530252014153LGN00/LC81530252014153LGN00_B1.TIF", + "type": "image/vnd.stac.geotiff", + "eo:bands": [0] + }, + "thumbnail": { + "href": "http://example.com/L8/153/025/LC81530252014153LGN00/LC81530252014153LGN00_thumbnail.jpg", + "type": "image/jpeg", + "proj:crs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs ", + "proj:epsg": 3857, + "proj:geometry": { + "coordinates": [ + [ + [ + 169200.0, + 3712800.0 + ], + [ + 403200.0, + 3712800.0 + ], + [ + 403200.0, + 3951000.0 + ], + [ + 169200.0, + 3951000.0 + ], + [ + 169200.0, + 3712800.0 + ] + ] + ], + "type": "Polygon" + }, + "proj:extent": [ 169200.0, 3712800.0 403200.0, 3951000.0 ], + "proj:centroid": [ 34.595302781575604, -101.34448382627504 ], + }, + ... + } + } +``` diff --git a/extensions/projection/schema.json b/extensions/projection/schema.json new file mode 100644 index 000000000..fa933f420 --- /dev/null +++ b/extensions/projection/schema.json @@ -0,0 +1,52 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "schema.json#", + "title": "Projection Extension", + "type": "object", + "description": "STAC Projection Extension", + "additionalProperties": true, + "properties": { + "properties": { + "type": "object", + "required": [ + "proj:epsg", + "proj:crs", + "proj:geometry", + "proj:extent", + "proj:centroid" + ], + "properties": { + "proj:epsg": { + "title": "EPSG code", + "type": "integer" + }, + "proj:crs": { + "title": "Coordinate Reference System", + "type": "string" + }, + "proj:geometry": { + "title": "Geometry", + "type": "object" + }, + "proj:extent": { + "title": "Extent", + "type": "array", + "minItems": 4, + "maxItems": 4, + "items": { + "type": "number" + } + }, + "proj:centroid": { + "title": "Centroid", + "type": "array", + "minItems": 2, + "maxItems": 2, + "items": { + "type": "number" + } + } + } + } + } +} \ No newline at end of file From 13c5a759f80e860a56f62fc998338a15b262f702 Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Sat, 8 Jun 2019 22:21:37 -0400 Subject: [PATCH 02/32] add recommended This reverts commit 6ba491119826c7b9ab3692ead0ce4e31714b6981. --- extensions/eo/README.md | 9 ++++++++- extensions/projection/README.md | 12 ++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/extensions/eo/README.md b/extensions/eo/README.md index f15460738..fba1f4c35 100644 --- a/extensions/eo/README.md +++ b/extensions/eo/README.md @@ -25,11 +25,12 @@ The exact metadata that would appear in a STAC Collection record will vary depen | Field Name | Type | Description | | ---------------- | ------------------------ | ----------- | -| eo:gsd | number | **REQUIRED.** Ground Sample Distance. The nominal distance between pixel centers available, in meters. | +| eo:gsd | number | **REQUIRED.** Ground Sample distance. The nominal distance between pixel centers available, in meters. | | eo:platform | string | **REQUIRED.** Unique name of the specific platform the instrument is attached to. For satellites this would be the name of the satellite (e.g., landsat-8, sentinel-2A), whereas for drones this would be a unique name for the drone. | | eo:constellation | string | Name of the constellation that the platform belongs to. See below for details. | | eo:instrument | string | **REQUIRED.** Name of instrument or sensor used (e.g., MODIS, ASTER, OLI, Canon F-1). | | eo:bands | [Band Object] | **REQUIRED.** This is a list of the available bands where each item is a Band Object. | +| eo:epsg | integer\|null | [EPSG code](http://www.epsg-registry.org/) of the datasource, `null` if no EPSG code. | | eo:cloud_cover | number | Estimate of cloud cover as a percentage (0-100) of the entire scene. If not available the field should not be provided. | | eo:off_nadir | number | Viewing angle. The angle from the sensor between nadir (straight down) and the scene center. Measured in degrees (0-90). | | eo:azimuth | number | Viewing azimuth angle. The angle measured from the sub-satellite point (point on the ground below the platform) between the scene center and true north. Measured clockwise from north in degrees (0-360). | @@ -50,6 +51,12 @@ multiple sensors this could also name multiple sensors. For example, data from t platform is collected with the OLI sensor as well as the TIRS sensor, but the data is distributed together and commonly referred to as OLI_TIRS. +**eo:epsg** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a +'projection') used by the data, and can usually be referenced using an [EPSG code](http://epsg.io). +If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control +Points, eo:epsg should be set to null. It should also be set to null if a CRS exists, but for which +there is no valid EPSG code. + ### Band Object | Field Name | Type | Description | diff --git a/extensions/projection/README.md b/extensions/projection/README.md index f1a86921d..5b7e9357a 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -10,11 +10,11 @@ When specified on an Item, the values apply to all Assets in that Item, unless o | Field Name | Type | Description | | ---------------- | ------------------------ | ----------- | -| proj:epsg | integer\|null | [EPSG code](http://www.epsg-registry.org/) of the datasource | -| proj:crs | string \|null | Proj4 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:extent` fields represent | -| proj:geometry | [GeoJSON Polygon Object](https://tools.ietf.org/html/rfc7946#section-3.1.6) | Recommended. Defines the footprint of this item, formatted according to [RFC 7946, sections 3.1.6](https://tools.ietf.org/html/rfc7946), except not necessarily in EPSG:4326 as required by RFC7946 | -| proj:extent | [number] | Bounding box of the asset represented by this item in the native CRS | -| proj:centroid | [number] | Coordinates representing the centroid of the item in the native CRS | +| proj:epsg | integer\|null | **Required** [EPSG code](http://www.epsg-registry.org/) of the datasource | +| proj:crs | string \|null | **Required** Proj4 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:extent` fields represent | +| proj:geometry | Polygon Object | Recommended. Defines the footprint of this item. | +| proj:extent | [number] | Recommended. Bounding box of the item or asset in the native CRS | +| proj:centroid | [number] | Recommended. Coordinates representing the centroid of the item or asset in the native CRS | **proj:epsg** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a 'projection') used by the data, and can usually be referenced using an [EPSG code](http://epsg.io). @@ -28,7 +28,7 @@ If the data does not have a CRS, such as in the case of non-rectified imagery wi Points, eo:crs should be set to null. It should also be set to null if a CRS exists, but for which a Proj4 string does not exist (tbd: is that possible?). -**proj:geometry** - A [GeoJSON Polygon Object](https://tools.ietf.org/html/rfc7946#section-3.1.6) representing the footprint of this item, formatted according to [RFC 7946, sections 3.1.6](https://tools.ietf.org/html/rfc7946), except not necessarily in EPSG:4326 as required by RFC7946. Specified based on the `proj:crs` field (not necessarily EPSG:4326). Ideally, this will be represented by a Polygon with five coordinates, as the item in the native CRS should be a square aligned to the CRS grid. +**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 in EPSG:4326 as required by RFC7946. Specified based on the `proj:crs` field (not necessarily EPSG:4326). Ideally, this will be represented by a Polygon with five coordinates, as the item in the native CRS should be a square aligned to the CRS grid. **proj:extent** - Bounding box of the asset represented by this item in the native CRS. Specified as four coordinates based on the CRS defined in the eo:crs field. First two numbers are coordinates of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north] From dbc6eefa241f4f8942a2adc3fe878ebd1e9e8017 Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Sun, 9 Jun 2019 18:31:09 -0400 Subject: [PATCH 03/32] update crs fields --- extensions/projection/README.md | 15 ++++++++------- extensions/projection/schema.json | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/extensions/projection/README.md b/extensions/projection/README.md index 5b7e9357a..e2a00591b 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -2,7 +2,8 @@ **Extension [Maturity Classification](../README.md#extension-maturity): Proposal** -This document explains the fields of the STAC Projection (`proj`) Extension to a STAC Item or Asset. +This document explains the fields of the STAC Projection (`proj`) Extension to a STAC Item or Asset. Here `proj` is short +for "projection", and not a reference to the use of the PROJ format for the CRS attribute. When specified on an Item, the values apply to all Assets in that Item, unless otherwise explicitly defined within an Item. For example, an Item may have several related Assets each representing a band for the Item, all of which are in the same native CRS, e.g., a UTM Zone. However, there may also be assets intended for display, like a preview image or thumbnail, that have been reprojected to a different CRS, e.g., Web Mercator, to better accommodate that use case. @@ -11,7 +12,7 @@ When specified on an Item, the values apply to all Assets in that Item, unless o | Field Name | Type | Description | | ---------------- | ------------------------ | ----------- | | proj:epsg | integer\|null | **Required** [EPSG code](http://www.epsg-registry.org/) of the datasource | -| proj:crs | string \|null | **Required** Proj4 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:extent` fields represent | +| proj:crs | string \|null | **Required** PROJ string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:extent` fields represent | | proj:geometry | Polygon Object | Recommended. Defines the footprint of this item. | | proj:extent | [number] | Recommended. Bounding box of the item or asset in the native CRS | | proj:centroid | [number] | Recommended. Coordinates representing the centroid of the item or asset in the native CRS | @@ -19,18 +20,18 @@ When specified on an Item, the values apply to all Assets in that Item, unless o **proj:epsg** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a 'projection') used by the data, and can usually be referenced using an [EPSG code](http://epsg.io). If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control -Points, eo:epsg should be set to null. It should also be set to null if a CRS exists, but for which +Points, proj:epsg should be set to null. It should also be set to null if a CRS exists, but for which there is no valid EPSG code. **proj:crs** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a -'projection') used by the data. This value is a Proj4 string. +'projection') used by the data. This value is a PROJ string. If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control -Points, eo:crs should be set to null. It should also be set to null if a CRS exists, but for which -a Proj4 string does not exist (tbd: is that possible?). +Points, proj:crs should be set to null. It should also be set to null if a CRS exists, but for which +a PROJ string does not exist. **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 in EPSG:4326 as required by RFC7946. Specified based on the `proj:crs` field (not necessarily EPSG:4326). Ideally, this will be represented by a Polygon with five coordinates, as the item in the native CRS should be a square aligned to the CRS grid. -**proj:extent** - Bounding box of the asset represented by this item in the native CRS. Specified as four coordinates based on the CRS defined in the eo:crs field. First two numbers are coordinates of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north] +**proj:extent** - Bounding box of the asset represented by this item in the native CRS. Specified as four coordinates based on the CRS defined in the `proj:epsg` and `proj:crs` fields. First two numbers are coordinates of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north] **proj:centroid** - Coordinates representing the centroid of the item in the native coordinate system. Coordinates defined as \[lat,lon], even if the native coordinate system does not use lat/long. diff --git a/extensions/projection/schema.json b/extensions/projection/schema.json index fa933f420..3fff76b8b 100644 --- a/extensions/projection/schema.json +++ b/extensions/projection/schema.json @@ -21,7 +21,7 @@ "type": "integer" }, "proj:crs": { - "title": "Coordinate Reference System", + "title": "Coordinate Reference System in PROJ format", "type": "string" }, "proj:geometry": { From b38733181fa9c572deb138f10a22468cb6e8563c Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Tue, 11 Jun 2019 11:52:53 -0400 Subject: [PATCH 04/32] change proj required fields --- extensions/projection/README.md | 6 +++--- extensions/projection/schema.json | 6 +----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/extensions/projection/README.md b/extensions/projection/README.md index e2a00591b..77ec6b176 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -12,7 +12,7 @@ When specified on an Item, the values apply to all Assets in that Item, unless o | Field Name | Type | Description | | ---------------- | ------------------------ | ----------- | | proj:epsg | integer\|null | **Required** [EPSG code](http://www.epsg-registry.org/) of the datasource | -| proj:crs | string \|null | **Required** PROJ string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:extent` fields represent | +| proj:crs | string \|null | Recommended. PROJ string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:extent` fields represent | | proj:geometry | Polygon Object | Recommended. Defines the footprint of this item. | | proj:extent | [number] | Recommended. Bounding box of the item or asset in the native CRS | | proj:centroid | [number] | Recommended. Coordinates representing the centroid of the item or asset in the native CRS | @@ -29,9 +29,9 @@ If the data does not have a CRS, such as in the case of non-rectified imagery wi Points, proj:crs should be set to null. It should also be set to null if a CRS exists, but for which a PROJ string does not exist. -**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 in EPSG:4326 as required by RFC7946. Specified based on the `proj:crs` field (not necessarily EPSG:4326). Ideally, this will be represented by a Polygon with five coordinates, as the item in the native CRS should be a square aligned to the CRS grid. +**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 in EPSG:4326 as required by RFC7946. Specified based on the `proj:crs` field (not necessarily EPSG:4326). Ideally, this will be represented by a Polygon with five coordinates, as the item in the native CRS should be a square aligned to the CRS grid. It is recommended that either or both of `proj:geometry` and `proj:extent` be defined. -**proj:extent** - Bounding box of the asset represented by this item in the native CRS. Specified as four coordinates based on the CRS defined in the `proj:epsg` and `proj:crs` fields. First two numbers are coordinates of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north] +**proj:extent** - Bounding box of the asset represented by this item in the native CRS. Specified as four coordinates based on the CRS defined in the `proj:epsg` and `proj:crs` fields. First two numbers are coordinates of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north]. It is recommended that either or both of `proj:geometry` and `proj:extent` be defined. **proj:centroid** - Coordinates representing the centroid of the item in the native coordinate system. Coordinates defined as \[lat,lon], even if the native coordinate system does not use lat/long. diff --git a/extensions/projection/schema.json b/extensions/projection/schema.json index 3fff76b8b..11c455da7 100644 --- a/extensions/projection/schema.json +++ b/extensions/projection/schema.json @@ -9,11 +9,7 @@ "properties": { "type": "object", "required": [ - "proj:epsg", - "proj:crs", - "proj:geometry", - "proj:extent", - "proj:centroid" + "proj:epsg" ], "properties": { "proj:epsg": { From 7a9a1f9d78140db32ecde9d194fea5de125aa6ef Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Tue, 11 Jun 2019 11:59:54 -0400 Subject: [PATCH 05/32] attributes on in Item Properties --- extensions/projection/README.md | 66 +++++++++++++++++---------------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/extensions/projection/README.md b/extensions/projection/README.md index 77ec6b176..bc493b217 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -2,12 +2,14 @@ **Extension [Maturity Classification](../README.md#extension-maturity): Proposal** -This document explains the fields of the STAC Projection (`proj`) Extension to a STAC Item or Asset. Here `proj` is short +This document explains the fields of the STAC Projection (`proj`) Extension to a STAC Item. Here `proj` is short for "projection", and not a reference to the use of the PROJ format for the CRS attribute. -When specified on an Item, the values apply to all Assets in that Item, unless otherwise explicitly defined within an Item. For example, an Item may have several related Assets each representing a band for the Item, all of which are in the same native CRS, e.g., a UTM Zone. However, there may also be assets intended for display, like a preview image or thumbnail, that have been reprojected to a different CRS, e.g., Web Mercator, to better accommodate that use case. +The field names defined herein should be added as fields in the Item's Properties object. -## Item or Asset fields +When specified on an Item, the values are assumed to apply to all Assets in that Item. For example, an Item may have several related Assets each representing a band for the Item, all of which are in the same native CRS, e.g., a UTM Zone. However, there may also be assets intended for display, like a preview image or thumbnail, that have been reprojected to a different CRS, e.g., Web Mercator, to better accommodate that use case. This case of differing projections per Asset is not currently handled by this extension. + +## Item Properties fields | Field Name | Type | Description | | ---------------- | ------------------------ | ----------- | @@ -42,37 +44,39 @@ a PROJ string does not exist. "id": "LC81530252014153LGN00", "type": "Feature", ... - "proj:crs": "+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs ", - "proj:epsg": 32614, - "proj:geometry": { - "coordinates": [ - [ - [ - 169200.0, - 3712800.0 - ], - [ - 403200.0, - 3712800.0 - ], - [ - 403200.0, - 3951000.0 - ], - [ - 169200.0, - 3951000.0 - ], + "properties": { + "proj:epsg": 32614, + "proj:crs": "+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs ", + "proj:geometry": { + "coordinates": [ [ - 169200.0, - 3712800.0 + [ + 169200.0, + 3712800.0 + ], + [ + 403200.0, + 3712800.0 + ], + [ + 403200.0, + 3951000.0 + ], + [ + 169200.0, + 3951000.0 + ], + [ + 169200.0, + 3712800.0 + ] ] - ] - ], - "type": "Polygon" + ], + "type": "Polygon" + }, + "proj:extent": [ 169200.0, 3712800.0, 403200.0, 3951000.0 ], + "proj:centroid": [ 34.595302781575604, -101.34448382627504 ] }, - "proj:extent": [ 169200.0, 3712800.0 403200.0, 3951000.0 ], - "proj:centroid": [ 34.595302781575604, -101.34448382627504 ], "assets" :{ "B1": { "href": "http://example.com/L8/153/025/LC81530252014153LGN00/LC81530252014153LGN00_B1.TIF", From 7d235423004f3caf1474eeb8ef5b5783b8ed5b5a Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Mon, 17 Jun 2019 12:09:09 -0400 Subject: [PATCH 06/32] add constraint to -180 180 --- extensions/projection/schema.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/extensions/projection/schema.json b/extensions/projection/schema.json index 11c455da7..58b489248 100644 --- a/extensions/projection/schema.json +++ b/extensions/projection/schema.json @@ -30,7 +30,9 @@ "minItems": 4, "maxItems": 4, "items": { - "type": "number" + "type": "number", + "minimum": -180, + "maximum": 180 } }, "proj:centroid": { @@ -39,7 +41,9 @@ "minItems": 2, "maxItems": 2, "items": { - "type": "number" + "type": "number", + "minimum": -180, + "maximum": 180 } } } From bf32ab4f1d537b6752992f3cf51e6b5f605e5370 Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Thu, 20 Jun 2019 11:57:10 -0400 Subject: [PATCH 07/32] fix constraints on extent and centroid values --- extensions/projection/schema.json | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/extensions/projection/schema.json b/extensions/projection/schema.json index 58b489248..594eab16a 100644 --- a/extensions/projection/schema.json +++ b/extensions/projection/schema.json @@ -28,22 +28,18 @@ "title": "Extent", "type": "array", "minItems": 4, - "maxItems": 4, + "maxItems": 6, "items": { - "type": "number", - "minimum": -180, - "maximum": 180 + "type": "number" } }, "proj:centroid": { "title": "Centroid", "type": "array", "minItems": 2, - "maxItems": 2, + "maxItems": 3, "items": { - "type": "number", - "minimum": -180, - "maximum": 180 + "type": "number" } } } From 51a622ac48ecb3ed669d9d37f3f3cd5e53a5eb3e Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Thu, 20 Jun 2019 17:20:22 -0400 Subject: [PATCH 08/32] rename extent to bbox --- extensions/projection/README.md | 14 +++++++------- extensions/projection/schema.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/extensions/projection/README.md b/extensions/projection/README.md index bc493b217..f83008219 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -14,10 +14,10 @@ When specified on an Item, the values are assumed to apply to all Assets in that | Field Name | Type | Description | | ---------------- | ------------------------ | ----------- | | proj:epsg | integer\|null | **Required** [EPSG code](http://www.epsg-registry.org/) of the datasource | -| proj:crs | string \|null | Recommended. PROJ string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:extent` fields represent | +| proj:crs | string \|null | Recommended. PROJ string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | | proj:geometry | Polygon Object | Recommended. Defines the footprint of this item. | -| proj:extent | [number] | Recommended. Bounding box of the item or asset in the native CRS | -| proj:centroid | [number] | Recommended. Coordinates representing the centroid of the item or asset in the native CRS | +| proj:bbox | [number] | Recommended. Bounding box of the item in the native CRS | +| proj:centroid | [number] | Recommended. Coordinates representing the centroid of the item in the native CRS | **proj:epsg** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a 'projection') used by the data, and can usually be referenced using an [EPSG code](http://epsg.io). @@ -31,9 +31,9 @@ If the data does not have a CRS, such as in the case of non-rectified imagery wi Points, proj:crs should be set to null. It should also be set to null if a CRS exists, but for which a PROJ string does not exist. -**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 in EPSG:4326 as required by RFC7946. Specified based on the `proj:crs` field (not necessarily EPSG:4326). Ideally, this will be represented by a Polygon with five coordinates, as the item in the native CRS should be a square aligned to the CRS grid. It is recommended that either or both of `proj:geometry` and `proj:extent` be defined. +**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 in EPSG:4326 as required by RFC7946. Specified based on the `proj:crs` field (not necessarily EPSG:4326). Ideally, this will be represented by a Polygon with five coordinates, as the item in the native CRS should be a square aligned to the CRS grid. It is recommended that either or both of `proj:geometry` and `proj:bbox` be defined. -**proj:extent** - Bounding box of the asset represented by this item in the native CRS. Specified as four coordinates based on the CRS defined in the `proj:epsg` and `proj:crs` fields. First two numbers are coordinates of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north]. It is recommended that either or both of `proj:geometry` and `proj:extent` be defined. +**proj:bbox** - Bounding box of the asset represented by this item in the native CRS. Specified as four coordinates based on the CRS defined in the `proj:epsg` and `proj:crs` fields. First two numbers are coordinates of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north], \[xmin, ymin, xmax, ymax], \[left, down, right, up]. It is recommended that either or both of `proj:geometry` and `proj:bbox` be defined. **proj:centroid** - Coordinates representing the centroid of the item in the native coordinate system. Coordinates defined as \[lat,lon], even if the native coordinate system does not use lat/long. @@ -74,7 +74,7 @@ a PROJ string does not exist. ], "type": "Polygon" }, - "proj:extent": [ 169200.0, 3712800.0, 403200.0, 3951000.0 ], + "proj:bbox": [ 169200.0, 3712800.0, 403200.0, 3951000.0 ], "proj:centroid": [ 34.595302781575604, -101.34448382627504 ] }, "assets" :{ @@ -115,7 +115,7 @@ a PROJ string does not exist. ], "type": "Polygon" }, - "proj:extent": [ 169200.0, 3712800.0 403200.0, 3951000.0 ], + "proj:bbox": [ 169200.0, 3712800.0 403200.0, 3951000.0 ], "proj:centroid": [ 34.595302781575604, -101.34448382627504 ], }, ... diff --git a/extensions/projection/schema.json b/extensions/projection/schema.json index 594eab16a..525d1dc63 100644 --- a/extensions/projection/schema.json +++ b/extensions/projection/schema.json @@ -24,7 +24,7 @@ "title": "Geometry", "type": "object" }, - "proj:extent": { + "proj:bbox": { "title": "Extent", "type": "array", "minItems": 4, From eaff656849d7e640e7fa3f8324e78bc98f9d35cf Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Wed, 24 Jul 2019 13:37:47 -0400 Subject: [PATCH 09/32] update changelog and add extension to list in readme --- CHANGELOG.md | 2 ++ extensions/README.md | 21 +++++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1879be86d..6f1a12e5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## Unreleased +- Added Projection Extension to describe Items with Assets that have an associated geospatial projection. + ### Changed - Moved Single Item Extension to core (`license` and `providers` properties for Items) diff --git a/extensions/README.md b/extensions/README.md index 01ac93862..91b5b5e00 100644 --- a/extensions/README.md +++ b/extensions/README.md @@ -45,16 +45,17 @@ stable for over a year and are used in twenty or more implementations. An extension can add new fields to STAC entities (content extension), or can add new endpoints or behavior to the API (API extension). Below is a list of content extensions, while API extensions given under [api-spec](../api-spec/) in a folder for [API extensions](../api-spec/extensions/). -| Extension Name (Prefix) | Scope | Description | Maturity | -| ------------------------------------------------------------ | ---------------- | ------------------------------------------------------------ | -------- | -| [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* | -| [Data Cube](datacube/README.md) (`cube`) | Item | Data Cube related metadata, especially to describe their dimensions. | *Proposal* | -| [Datetime Range](datetime-range//README.md) (`dtr`) | 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, off nadir, sun angle + elevation, gsd and more. | *Pilot* | -| [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* | -| [SAR](sar/README.md) (`sar`) | Item | Covers synthetic-aperture radar data that represents a snapshot of the earth for a single date and time. | *Proposal* | -| [Scientific](scientific/README.md) (`sci`) | Item | Scientific metadata is considered to be data that indicate from which publication data originates and how the data itself should be cited or referenced. | *Proposal* | +| Extension Name (Prefix) | Scope | Description | Maturity | +| ----------------------------------------------------| ---------------- | ------------------------------------------------------------ | -------- | +| [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* | +| [Data Cube](datacube/README.md) (`cube`) | Item | Data Cube related metadata, especially to describe their dimensions. | *Proposal* | +| [Datetime Range](datetime-range//README.md) (`dtr`) | 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, off nadir, sun angle + elevation, gsd and more. | *Pilot* | +| [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* | +| [SAR](sar/README.md) (`sar`) | Item | Covers synthetic-aperture radar data that represents a snapshot of the earth for a single date and time. | *Proposal* | +| [Scientific](scientific/README.md) (`sci`) | Item | Scientific metadata is considered to be data that indicate from which publication data originates and how the data itself should be cited or referenced. | *Proposal* | ## Third-party / vendor extensions From 2a939bda97b67b97dd025e3adda3b21916ce0846 Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Wed, 24 Jul 2019 13:48:55 -0400 Subject: [PATCH 10/32] move projection entry in changelog --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f1a12e5c..6a87f6761 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## Unreleased -- Added Projection Extension to describe Items with Assets that have an associated geospatial projection. - ### Changed - Moved Single Item Extension to core (`license` and `providers` properties for Items) +- Added Projection Extension to describe Items with Assets that have an associated geospatial projection. ## [v0.7.0] - 2019-05-06 From 7b0452a93cc03a5a7f38d27a64e5ecbed119952b Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Tue, 30 Jul 2019 10:20:31 -0400 Subject: [PATCH 11/32] redefine centroid --- extensions/projection/README.md | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/extensions/projection/README.md b/extensions/projection/README.md index f83008219..77c1feced 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -13,11 +13,11 @@ When specified on an Item, the values are assumed to apply to all Assets in that | Field Name | Type | Description | | ---------------- | ------------------------ | ----------- | -| proj:epsg | integer\|null | **Required** [EPSG code](http://www.epsg-registry.org/) of the datasource | -| proj:crs | string \|null | Recommended. PROJ string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | -| proj:geometry | Polygon Object | Recommended. Defines the footprint of this item. | -| proj:bbox | [number] | Recommended. Bounding box of the item in the native CRS | -| proj:centroid | [number] | Recommended. Coordinates representing the centroid of the item in the native CRS | +| proj:epsg | integer\|null | **Required** [EPSG code](http://www.epsg-registry.org/) of the datasource | +| proj:crs | string \|null | Recommended. PROJ string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | +| proj:geometry | Polygon Object | Recommended. Defines the footprint of this item. | +| proj:bbox | [number] | Recommended. Bounding box of the item in the native CRS | +| proj:centroid | Centroid Object | Recommended. Coordinates representing the centroid of the item in the native CRS | **proj:epsg** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a 'projection') used by the data, and can usually be referenced using an [EPSG code](http://epsg.io). @@ -35,7 +35,16 @@ a PROJ string does not exist. **proj:bbox** - Bounding box of the asset represented by this item in the native CRS. Specified as four coordinates based on the CRS defined in the `proj:epsg` and `proj:crs` fields. First two numbers are coordinates of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north], \[xmin, ymin, xmax, ymax], \[left, down, right, up]. It is recommended that either or both of `proj:geometry` and `proj:bbox` be defined. -**proj:centroid** - Coordinates representing the centroid of the item in the native coordinate system. Coordinates defined as \[lat,lon], even if the native coordinate system does not use lat/long. +**proj:centroid** - Coordinates representing the centroid of the item in the native coordinate system. Coordinates are defined in latitude and longitude, even if the native coordinate system does not use lat/long. + +## Centroid Object + +This object represents the centroid of an asset's geometry. + +| Field Name | Type | Description | +| ------------------- | ------ | ------------------------------------------------------------ | +| lat | number | The latitude of the centroid. | +| lon | number | The longitude of the centroid. | ## Examples @@ -75,7 +84,10 @@ a PROJ string does not exist. "type": "Polygon" }, "proj:bbox": [ 169200.0, 3712800.0, 403200.0, 3951000.0 ], - "proj:centroid": [ 34.595302781575604, -101.34448382627504 ] + "proj:centroid": { + "lat": 34.595302781575604, + "lon": -101.34448382627504 + } }, "assets" :{ "B1": { @@ -116,7 +128,10 @@ a PROJ string does not exist. "type": "Polygon" }, "proj:bbox": [ 169200.0, 3712800.0 403200.0, 3951000.0 ], - "proj:centroid": [ 34.595302781575604, -101.34448382627504 ], + "proj:centroid": { + "lat": 34.595302781575604, + "lon": -101.34448382627504 + }, }, ... } From a0b93c9c9b4446deb3a85c6c859968bfbba56369 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 31 Jul 2019 11:05:15 +0200 Subject: [PATCH 12/32] Inherit from Item JSON Schema --- extensions/projection/schema.json | 94 +++++++++++++++++-------------- 1 file changed, 52 insertions(+), 42 deletions(-) diff --git a/extensions/projection/schema.json b/extensions/projection/schema.json index 525d1dc63..b9721b353 100644 --- a/extensions/projection/schema.json +++ b/extensions/projection/schema.json @@ -1,48 +1,58 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "schema.json#", - "title": "Projection Extension", - "type": "object", - "description": "STAC Projection Extension", - "additionalProperties": true, - "properties": { - "properties": { - "type": "object", - "required": [ - "proj:epsg" - ], - "properties": { - "proj:epsg": { - "title": "EPSG code", - "type": "integer" - }, - "proj:crs": { - "title": "Coordinate Reference System in PROJ format", - "type": "string" - }, - "proj:geometry": { - "title": "Geometry", - "type": "object" - }, - "proj:bbox": { - "title": "Extent", - "type": "array", - "minItems": 4, - "maxItems": 6, - "items": { - "type": "number" - } - }, - "proj:centroid": { - "title": "Centroid", - "type": "array", - "minItems": 2, - "maxItems": 3, - "items": { - "type": "number" + "$schema":"http://json-schema.org/draft-07/schema#", + "$id":"schema.json#", + "title":"Projection Extension", + "description":"STAC Projection Extension to a STAC Item", + "allOf":[ + { + "$ref": "https://raw.githubusercontent.com/radiantearth/stac-spec/master/item-spec/json-schema/item.json#/definitions/core" + }, + { + "$ref":"#/definitions/proj" + } + ], + "definitions":{ + "proj":{ + "properties":{ + "properties":{ + "type":"object", + "required":[ + "proj:epsg" + ], + "properties":{ + "proj:epsg":{ + "title":"EPSG code", + "type":"integer" + }, + "proj:crs":{ + "title":"Coordinate Reference System in PROJ format", + "type":"string" + }, + "proj:geometry":{ + "title":"Geometry", + "type":"object" + }, + "proj:bbox":{ + "title":"Extent", + "type":"array", + "minItems":4, + "maxItems":6, + "items":{ + "type":"number" + } + }, + "proj:centroid":{ + "title":"Centroid", + "type":"array", + "minItems":2, + "maxItems":3, + "items":{ + "type":"number" + } + } } } } } } -} \ No newline at end of file +} From db491b5ae10f236d7526d7f153264128c3e8d6d3 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 31 Jul 2019 11:13:46 +0200 Subject: [PATCH 13/32] Fixed JSON Schema --- extensions/projection/schema.json | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/extensions/projection/schema.json b/extensions/projection/schema.json index b9721b353..055c6929d 100644 --- a/extensions/projection/schema.json +++ b/extensions/projection/schema.json @@ -13,6 +13,10 @@ ], "definitions":{ "proj":{ + "type": "object", + "required": [ + "properties" + ], "properties":{ "properties":{ "type":"object", @@ -22,11 +26,17 @@ "properties":{ "proj:epsg":{ "title":"EPSG code", - "type":"integer" + "type":[ + "integer", + "null" + ] }, "proj:crs":{ "title":"Coordinate Reference System in PROJ format", - "type":"string" + "type":[ + "string", + "null" + ] }, "proj:geometry":{ "title":"Geometry", @@ -45,7 +55,7 @@ "title":"Centroid", "type":"array", "minItems":2, - "maxItems":3, + "maxItems":2, "items":{ "type":"number" } From ad3652b4bb79c51141c300661b027d1117789ce7 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 31 Jul 2019 11:16:14 +0200 Subject: [PATCH 14/32] Changed maxItems back to 3 --- extensions/projection/schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/projection/schema.json b/extensions/projection/schema.json index 055c6929d..34053ee88 100644 --- a/extensions/projection/schema.json +++ b/extensions/projection/schema.json @@ -55,7 +55,7 @@ "title":"Centroid", "type":"array", "minItems":2, - "maxItems":2, + "maxItems":3, "items":{ "type":"number" } From a7d48d84a19ceb76082c5d25edcf11850df1f608 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 31 Jul 2019 11:42:38 +0200 Subject: [PATCH 15/32] Fixed example --- extensions/projection/README.md | 68 ++++++++++++++++----------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/extensions/projection/README.md b/extensions/projection/README.md index 77c1feced..c6583583d 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -55,7 +55,7 @@ This object represents the centroid of an asset's geometry. ... "properties": { "proj:epsg": 32614, - "proj:crs": "+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs ", + "proj:crs": "+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs", "proj:geometry": { "coordinates": [ [ @@ -89,7 +89,7 @@ This object represents the centroid of an asset's geometry. "lon": -101.34448382627504 } }, - "assets" :{ + "assets": { "B1": { "href": "http://example.com/L8/153/025/LC81530252014153LGN00/LC81530252014153LGN00_B1.TIF", "type": "image/vnd.stac.geotiff", @@ -98,40 +98,40 @@ This object represents the centroid of an asset's geometry. "thumbnail": { "href": "http://example.com/L8/153/025/LC81530252014153LGN00/LC81530252014153LGN00_thumbnail.jpg", "type": "image/jpeg", - "proj:crs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs ", - "proj:epsg": 3857, - "proj:geometry": { - "coordinates": [ + "proj:crs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs ", + "proj:epsg": 3857, + "proj:geometry": { + "coordinates": [ + [ + [ + 169200.0, + 3712800.0 + ], + [ + 403200.0, + 3712800.0 + ], + [ + 403200.0, + 3951000.0 + ], + [ + 169200.0, + 3951000.0 + ], [ - [ - 169200.0, - 3712800.0 - ], - [ - 403200.0, - 3712800.0 - ], - [ - 403200.0, - 3951000.0 - ], - [ - 169200.0, - 3951000.0 - ], - [ - 169200.0, - 3712800.0 - ] + 169200.0, + 3712800.0 ] - ], - "type": "Polygon" - }, - "proj:bbox": [ 169200.0, 3712800.0 403200.0, 3951000.0 ], - "proj:centroid": { - "lat": 34.595302781575604, - "lon": -101.34448382627504 - }, + ] + ], + "type": "Polygon" + }, + "proj:bbox": [ 169200.0, 3712800.0, 403200.0, 3951000.0 ], + "proj:centroid": { + "lat": 34.595302781575604, + "lon": -101.34448382627504 + } }, ... } From 0bc10cfbaaf28b43e457935600ab3b3fd2540eea Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Thu, 1 Aug 2019 09:47:09 -0400 Subject: [PATCH 16/32] remove asset projection example, clarify language, update schema --- extensions/projection/README.md | 50 ++----------------------------- extensions/projection/schema.json | 17 +++++++---- 2 files changed, 14 insertions(+), 53 deletions(-) diff --git a/extensions/projection/README.md b/extensions/projection/README.md index c6583583d..bb725ee2b 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -33,13 +33,13 @@ a PROJ string does not exist. **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 in EPSG:4326 as required by RFC7946. Specified based on the `proj:crs` field (not necessarily EPSG:4326). Ideally, this will be represented by a Polygon with five coordinates, as the item in the native CRS should be a square aligned to the CRS grid. It is recommended that either or both of `proj:geometry` and `proj:bbox` be defined. -**proj:bbox** - Bounding box of the asset represented by this item in the native CRS. Specified as four coordinates based on the CRS defined in the `proj:epsg` and `proj:crs` fields. First two numbers are coordinates of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north], \[xmin, ymin, xmax, ymax], \[left, down, right, up]. It is recommended that either or both of `proj:geometry` and `proj:bbox` be defined. +**proj:bbox** - Bounding box of the assets represented by this item in the native CRS. Specified as four coordinates based on the CRS defined in the `proj:epsg` and `proj:crs` fields. First two numbers are coordinates of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north], \[xmin, ymin, xmax, ymax], \[left, down, right, up]. It is recommended that either or both of `proj:geometry` and `proj:bbox` be defined. **proj:centroid** - Coordinates representing the centroid of the item in the native coordinate system. Coordinates are defined in latitude and longitude, even if the native coordinate system does not use lat/long. ## Centroid Object -This object represents the centroid of an asset's geometry. +This object represents the centroid of an item's geometry. | Field Name | Type | Description | | ------------------- | ------ | ------------------------------------------------------------ | @@ -88,52 +88,6 @@ This object represents the centroid of an asset's geometry. "lat": 34.595302781575604, "lon": -101.34448382627504 } - }, - "assets": { - "B1": { - "href": "http://example.com/L8/153/025/LC81530252014153LGN00/LC81530252014153LGN00_B1.TIF", - "type": "image/vnd.stac.geotiff", - "eo:bands": [0] - }, - "thumbnail": { - "href": "http://example.com/L8/153/025/LC81530252014153LGN00/LC81530252014153LGN00_thumbnail.jpg", - "type": "image/jpeg", - "proj:crs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs ", - "proj:epsg": 3857, - "proj:geometry": { - "coordinates": [ - [ - [ - 169200.0, - 3712800.0 - ], - [ - 403200.0, - 3712800.0 - ], - [ - 403200.0, - 3951000.0 - ], - [ - 169200.0, - 3951000.0 - ], - [ - 169200.0, - 3712800.0 - ] - ] - ], - "type": "Polygon" - }, - "proj:bbox": [ 169200.0, 3712800.0, 403200.0, 3951000.0 ], - "proj:centroid": { - "lat": 34.595302781575604, - "lon": -101.34448382627504 - } - }, - ... } } ``` diff --git a/extensions/projection/schema.json b/extensions/projection/schema.json index 34053ee88..c911b8241 100644 --- a/extensions/projection/schema.json +++ b/extensions/projection/schema.json @@ -53,11 +53,18 @@ }, "proj:centroid":{ "title":"Centroid", - "type":"array", - "minItems":2, - "maxItems":3, - "items":{ - "type":"number" + "type":"object", + "required": [ + "lat", + "lon" + ], + "properties": { + "lat": { + "type": "number" + }, + "lon": { + "type": "number" + } } } } From 855a29b38e9da8d24627a6a0608c67da2cfade2b Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Thu, 7 Nov 2019 10:08:20 -0500 Subject: [PATCH 17/32] update field names to remove colon prefixes --- api-spec/extensions/fields/README.md | 6 ++--- extensions/projection/README.md | 34 ++++++++++++++-------------- extensions/projection/schema.json | 12 +++++----- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/api-spec/extensions/fields/README.md b/api-spec/extensions/fields/README.md index ca47d5405..14e0a436d 100644 --- a/api-spec/extensions/fields/README.md +++ b/api-spec/extensions/fields/README.md @@ -6,7 +6,7 @@ By default, the STAC search endpoint `/stac/search` returns all attributes of ea When calling `/stac/search` using POST with`Content-Type: application/json`, this extension adds an attribute `fields` with an object value to the core JSON search request body. The `fields` object contains two attributes with string array values, `include` and `exclude`. -When calling `/stac/search` using GET or POST with `Content-Type: application/x-www-form-urlencoded` or `Content-Type: multipart/form-data`, the semantics are the same, except the syntax is a single parameter `fields` with a comma-separated list of attribute names, where `exclude` values are those prefixed by a `-` and `include` values are those with no prefix, e.g., `-geometry`, or `id,properties,-properties.proj:geometry`. +When calling `/stac/search` using GET or POST with `Content-Type: application/x-www-form-urlencoded` or `Content-Type: multipart/form-data`, the semantics are the same, except the syntax is a single parameter `fields` with a comma-separated list of attribute names, where `exclude` values are those prefixed by a `-` and `include` values are those with no prefix, e.g., `-geometry`, or `id,properties,-properties.native_crs_geometry`. It is recommended that implementations meet the `include` and `exclude` sets specified by the request, but this is not required. Implementations are still considered compliant if fields not specified as part of `include` are in the response or ones specified as part of `exclude` are. Implementations may choose to always include simple string fields like `id` and `type` regardless of the `exclude` specification. However, it is recommended that implementations honor excludes for attributes with more complex and arbitrarily large values (e.g., `geometry`, `assets`). For example, some Items may have a geometry with a simple 5 point polygon, but these polygons can be very large when reprojected to EPSG:4326, as in the case of a highly-decimated sinusoidal polygons. @@ -80,7 +80,7 @@ To return the `id`, `type`, `geometry`, and the Properties attribute `eo:cloud_c } ``` -To include `id` and all the properties fields, except for the `proj:geometry` field +To include `id` and all the properties fields, except for the `native_crs_geometry` field ```json { @@ -90,7 +90,7 @@ To include `id` and all the properties fields, except for the `proj:geometry` fi "properties" ], "exclude": [ - "properties.proj:geometry" + "properties.native_crs_geometry" ] } } diff --git a/extensions/projection/README.md b/extensions/projection/README.md index bb725ee2b..b6310ae34 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -13,29 +13,29 @@ When specified on an Item, the values are assumed to apply to all Assets in that | Field Name | Type | Description | | ---------------- | ------------------------ | ----------- | -| proj:epsg | integer\|null | **Required** [EPSG code](http://www.epsg-registry.org/) of the datasource | -| proj:crs | string \|null | Recommended. PROJ string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | -| proj:geometry | Polygon Object | Recommended. Defines the footprint of this item. | -| proj:bbox | [number] | Recommended. Bounding box of the item in the native CRS | -| proj:centroid | Centroid Object | Recommended. Coordinates representing the centroid of the item in the native CRS | +| epsg | integer\|null | **Required** [EPSG code](http://www.epsg-registry.org/) of the datasource | +| native_crs_proj4 | string \|null | Recommended. PROJ string representing the Coordinate Reference System (CRS) that the `native_crs_geometry` and `native_crs_bbox` fields represent | +| native_crs_geometry | Polygon Object | Recommended. Defines the footprint of this item. | +| native_crs_bbox | [number] | Recommended. Bounding box of the item in the native CRS | +| native_crs_centroid | Centroid Object | Recommended. Coordinates representing the centroid of the item in the native CRS | -**proj:epsg** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a +**epsg** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a 'projection') used by the data, and can usually be referenced using an [EPSG code](http://epsg.io). If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control -Points, proj:epsg should be set to null. It should also be set to null if a CRS exists, but for which +Points, `epsg` should be set to null. It should also be set to null if a CRS exists, but for which there is no valid EPSG code. -**proj:crs** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a +**native_crs_proj4** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a 'projection') used by the data. This value is a PROJ string. If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control -Points, proj:crs should be set to null. It should also be set to null if a CRS exists, but for which +Points, native_crs_proj4 should be set to null. It should also be set to null if a CRS exists, but for which a PROJ string does not exist. -**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 in EPSG:4326 as required by RFC7946. Specified based on the `proj:crs` field (not necessarily EPSG:4326). Ideally, this will be represented by a Polygon with five coordinates, as the item in the native CRS should be a square aligned to the CRS grid. It is recommended that either or both of `proj:geometry` and `proj:bbox` be defined. +**native_crs_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 in EPSG:4326 as required by RFC7946. Specified based on the `native_crs_proj4` field (not necessarily EPSG:4326). Ideally, this will be represented by a Polygon with five coordinates, as the item in the native CRS should be a square aligned to the CRS grid. It is recommended that either or both of `native_crs_geometry` and `native_crs_bbox` be defined. -**proj:bbox** - Bounding box of the assets represented by this item in the native CRS. Specified as four coordinates based on the CRS defined in the `proj:epsg` and `proj:crs` fields. First two numbers are coordinates of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north], \[xmin, ymin, xmax, ymax], \[left, down, right, up]. It is recommended that either or both of `proj:geometry` and `proj:bbox` be defined. +**native_crs_bbox** - Bounding box of the assets represented by this item in the native CRS. Specified as four coordinates based on the CRS defined in the `epsg` and `native_crs_proj4` fields. First two numbers are coordinates of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north], \[xmin, ymin, xmax, ymax], \[left, down, right, up]. It is recommended that either or both of `native_crs_geometry` and `native_crs_bbox` be defined. -**proj:centroid** - Coordinates representing the centroid of the item in the native coordinate system. Coordinates are defined in latitude and longitude, even if the native coordinate system does not use lat/long. +**native_crs_centroid** - Coordinates representing the centroid of the item in the native coordinate system. Coordinates are defined in latitude and longitude, even if the native coordinate system does not use lat/long. ## Centroid Object @@ -54,9 +54,9 @@ This object represents the centroid of an item's geometry. "type": "Feature", ... "properties": { - "proj:epsg": 32614, - "proj:crs": "+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs", - "proj:geometry": { + "epsg": 32614, + "native_crs_proj4": "+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs", + "native_crs_geometry": { "coordinates": [ [ [ @@ -83,8 +83,8 @@ This object represents the centroid of an item's geometry. ], "type": "Polygon" }, - "proj:bbox": [ 169200.0, 3712800.0, 403200.0, 3951000.0 ], - "proj:centroid": { + "native_crs_bbox": [ 169200.0, 3712800.0, 403200.0, 3951000.0 ], + "native_crs_centroid": { "lat": 34.595302781575604, "lon": -101.34448382627504 } diff --git a/extensions/projection/schema.json b/extensions/projection/schema.json index c911b8241..994502157 100644 --- a/extensions/projection/schema.json +++ b/extensions/projection/schema.json @@ -21,28 +21,28 @@ "properties":{ "type":"object", "required":[ - "proj:epsg" + "epsg" ], "properties":{ - "proj:epsg":{ + "epsg":{ "title":"EPSG code", "type":[ "integer", "null" ] }, - "proj:crs":{ + "native_crs_proj4":{ "title":"Coordinate Reference System in PROJ format", "type":[ "string", "null" ] }, - "proj:geometry":{ + "native_crs_geometry":{ "title":"Geometry", "type":"object" }, - "proj:bbox":{ + "native_crs_bbox":{ "title":"Extent", "type":"array", "minItems":4, @@ -51,7 +51,7 @@ "type":"number" } }, - "proj:centroid":{ + "native_crs_centroid":{ "title":"Centroid", "type":"object", "required": [ From 4581cc09c565e3f252f98a55e3cf35fb5b8d5f2c Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Mon, 2 Dec 2019 09:32:30 -0500 Subject: [PATCH 18/32] cleanup changelog --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57321b47e..70fd67b2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,7 +58,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Changed - Updated specification to base on OGC API - Features - Part 1: Core, v1.0.0 instead of OGC API - Features - Part 1: Core, v1.0.0-draft.2 (fka WFS3 draft 2). -- Moved Single Item Extension to core (`license` and `providers` properties for Items) - Added Projection Extension to describe Items with Assets that have an associated geospatial projection. ### Fixed From a580b5a6d4b3435ae4b5231ce8021bc222d1debb Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Mon, 2 Dec 2019 10:12:46 -0500 Subject: [PATCH 19/32] update projection --- extensions/projection/README.md | 96 +++++++------------ .../projection/examples/example-landsat8.json | 40 ++++++++ .../projection/{ => json-schema}/schema.json | 8 +- 3 files changed, 76 insertions(+), 68 deletions(-) create mode 100644 extensions/projection/examples/example-landsat8.json rename extensions/projection/{ => json-schema}/schema.json (92%) diff --git a/extensions/projection/README.md b/extensions/projection/README.md index b6310ae34..287f6a80e 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -3,39 +3,53 @@ **Extension [Maturity Classification](../README.md#extension-maturity): Proposal** This document explains the fields of the STAC Projection (`proj`) Extension to a STAC Item. Here `proj` is short -for "projection", and not a reference to the use of the PROJ format for the CRS attribute. +for "projection", and not a reference to the use of the PROJ/PROJ4 formats. -The field names defined herein should be added as fields in the Item's Properties object. +The field names defined herein should be added as fields in the Item Properties object. -When specified on an Item, the values are assumed to apply to all Assets in that Item. For example, an Item may have several related Assets each representing a band for the Item, all of which are in the same native CRS, e.g., a UTM Zone. However, there may also be assets intended for display, like a preview image or thumbnail, that have been reprojected to a different CRS, e.g., Web Mercator, to better accommodate that use case. This case of differing projections per Asset is not currently handled by this extension. +When specified on an Item, the values are assumed to apply to all Assets in that Item. For example, an Item may have +several related Assets each representing a band or layer for the Item, and which typically all use the same CRS, +e.g. a UTM Zone. However, there may also be assets intended for display, like a preview image or thumbnail, that have +been reprojected to a different CRS, e.g., Web Mercator, to better accommodate that use case. This case of differing +projections per Asset is not currently handled by this extension. ## Item Properties fields | Field Name | Type | Description | | ---------------- | ------------------------ | ----------- | | epsg | integer\|null | **Required** [EPSG code](http://www.epsg-registry.org/) of the datasource | -| native_crs_proj4 | string \|null | Recommended. PROJ string representing the Coordinate Reference System (CRS) that the `native_crs_geometry` and `native_crs_bbox` fields represent | -| native_crs_geometry | Polygon Object | Recommended. Defines the footprint of this item. | -| native_crs_bbox | [number] | Recommended. Bounding box of the item in the native CRS | -| native_crs_centroid | Centroid Object | Recommended. Coordinates representing the centroid of the item in the native CRS | - -**epsg** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a -'projection') used by the data, and can usually be referenced using an [EPSG code](http://epsg.io). -If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control +| asset_crs_proj4 | string \|null | Recommended. PROJ4 string representing the Coordinate Reference System (CRS) that the `asset_crs_geometry` and `asset_crs_bbox` fields represent | +| asset_crs_geometry | Polygon Object | Recommended. Defines the footprint of this Item. | +| asset_crs_bbox | [number] | Recommended. Bounding box of the Item in the asset CRS | +| asset_crs_centroid | Centroid Object | Recommended. Coordinates representing the centroid of the Item in the asset CRS | + +**epsg** - A Coordinate Reference System (CRS) is the data reference system (sometimes called a +'projection') used by the asset data, and can usually be referenced using an [EPSG code](http://epsg.io). +If the asset data does not have a CRS, such as in the case of non-rectified imagery with Ground Control Points, `epsg` should be set to null. It should also be set to null if a CRS exists, but for which there is no valid EPSG code. -**native_crs_proj4** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a -'projection') used by the data. This value is a PROJ string. +**asset_crs_proj4** - A Coordinate Reference System (CRS) is the data reference system (sometimes called a +'projection') used by the asset data. This value is a PROJ4 string. If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control -Points, native_crs_proj4 should be set to null. It should also be set to null if a CRS exists, but for which -a PROJ string does not exist. +Points, asset_crs_proj4 should be set to null. It should also be set to null if a CRS exists, but for which +a PROJ4 string does not exist. -**native_crs_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 in EPSG:4326 as required by RFC7946. Specified based on the `native_crs_proj4` field (not necessarily EPSG:4326). Ideally, this will be represented by a Polygon with five coordinates, as the item in the native CRS should be a square aligned to the CRS grid. It is recommended that either or both of `native_crs_geometry` and `native_crs_bbox` be defined. +**asset_crs_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 +in EPSG:4326 as required by RFC7946. Specified based on the `asset_crs_proj4` field (not necessarily EPSG:4326). +Ideally, this will be represented by a Polygon with five coordinates, as the item in the asset data CRS should be +a square aligned to the CRS grid. It is recommended that either or both of `asset_crs_geometry` and `asset_crs_bbox` +be defined. -**native_crs_bbox** - Bounding box of the assets represented by this item in the native CRS. Specified as four coordinates based on the CRS defined in the `epsg` and `native_crs_proj4` fields. First two numbers are coordinates of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north], \[xmin, ymin, xmax, ymax], \[left, down, right, up]. It is recommended that either or both of `native_crs_geometry` and `native_crs_bbox` be defined. +**asset_crs_bbox** - Bounding box of the assets represented by this item in the asset data CRS. Specified as four +coordinates based on the CRS defined in the `epsg` and `asset_crs_proj4` fields. First two numbers are coordinates +of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north], +\[xmin, ymin, xmax, ymax], \[left, down, right, up]. It is recommended that either or both of `asset_crs_geometry` +and `asset_crs_bbox` be defined. -**native_crs_centroid** - Coordinates representing the centroid of the item in the native coordinate system. Coordinates are defined in latitude and longitude, even if the native coordinate system does not use lat/long. +**asset_crs_centroid** - Coordinates representing the centroid of the item in the asset data CRS. Coordinates are +defined in latitude and longitude, even if the data coordinate system does not use lat/long. ## Centroid Object @@ -45,49 +59,3 @@ This object represents the centroid of an item's geometry. | ------------------- | ------ | ------------------------------------------------------------ | | lat | number | The latitude of the centroid. | | lon | number | The longitude of the centroid. | - -## Examples - -``` -{ - "id": "LC81530252014153LGN00", - "type": "Feature", - ... - "properties": { - "epsg": 32614, - "native_crs_proj4": "+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs", - "native_crs_geometry": { - "coordinates": [ - [ - [ - 169200.0, - 3712800.0 - ], - [ - 403200.0, - 3712800.0 - ], - [ - 403200.0, - 3951000.0 - ], - [ - 169200.0, - 3951000.0 - ], - [ - 169200.0, - 3712800.0 - ] - ] - ], - "type": "Polygon" - }, - "native_crs_bbox": [ 169200.0, 3712800.0, 403200.0, 3951000.0 ], - "native_crs_centroid": { - "lat": 34.595302781575604, - "lon": -101.34448382627504 - } - } - } -``` diff --git a/extensions/projection/examples/example-landsat8.json b/extensions/projection/examples/example-landsat8.json new file mode 100644 index 000000000..766b392fd --- /dev/null +++ b/extensions/projection/examples/example-landsat8.json @@ -0,0 +1,40 @@ +{ + "id": "LC81530252014153LGN00", + "type": "Feature", + "properties": { + "epsg": 32614, + "asset_crs_proj4": "+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs", + "asset_crs_geometry": { + "coordinates": [ + [ + [ + 169200.0, + 3712800.0 + ], + [ + 403200.0, + 3712800.0 + ], + [ + 403200.0, + 3951000.0 + ], + [ + 169200.0, + 3951000.0 + ], + [ + 169200.0, + 3712800.0 + ] + ] + ], + "type": "Polygon" + }, + "asset_crs_bbox": [ 169200.0, 3712800.0, 403200.0, 3951000.0 ], + "asset_crs_centroid": { + "lat": 34.595302781575604, + "lon": -101.34448382627504 + } + } +} \ No newline at end of file diff --git a/extensions/projection/schema.json b/extensions/projection/json-schema/schema.json similarity index 92% rename from extensions/projection/schema.json rename to extensions/projection/json-schema/schema.json index 994502157..c1d16abd8 100644 --- a/extensions/projection/schema.json +++ b/extensions/projection/json-schema/schema.json @@ -31,18 +31,18 @@ "null" ] }, - "native_crs_proj4":{ + "asset_crs_proj4":{ "title":"Coordinate Reference System in PROJ format", "type":[ "string", "null" ] }, - "native_crs_geometry":{ + "asset_crs_geometry":{ "title":"Geometry", "type":"object" }, - "native_crs_bbox":{ + "asset_crs_bbox":{ "title":"Extent", "type":"array", "minItems":4, @@ -51,7 +51,7 @@ "type":"number" } }, - "native_crs_centroid":{ + "asset_crs_centroid":{ "title":"Centroid", "type":"object", "required": [ From a7cc6f1c5b2dd0fc3f096a779d54141242f59c7b Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Tue, 17 Dec 2019 11:49:26 -0500 Subject: [PATCH 20/32] remove 'eo' prefix from epsg, add wkt2 and projjson fields --- CHANGELOG.md | 3 +- collection-spec/collection-spec.md | 2 +- collection-spec/examples/sentinel2.json | 2 +- .../datacube/examples/example-collection.json | 2 +- extensions/eo/README.md | 8 +- extensions/eo/json-schema/schema.json | 2 +- extensions/projection/README.md | 42 ++++-- .../projection/examples/example-landsat8.json | 132 +++++++++++++++++- extensions/projection/json-schema/schema.json | 24 +++- .../examples/example-search.json | 4 +- .../CBERS_4_MUX_20181029_177_106_L4.json | 2 +- item-spec/examples/digitalglobe-sample.json | 2 +- item-spec/examples/sentinel2-sample.json | 2 +- 13 files changed, 190 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee0fc75ce..78990a207 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,13 +16,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added `description` and `roles` fields to the Asset in the [Asset Extension](extensions/asset/README.md) - STAC API: - Added the [Item and Collection API Version extension](api-spec/extensions/version/README.md) to support versioning in the API specification +- Add `proj` extension to define native coordinate system geometry ### Changed - Support for [CommonMark 0.29 instead of CommonMark 0.28](https://spec.commonmark.org/0.29/changes.html) - Collection field `property` and the merge ability moved to a new extension 'Commons' - Added attribute `roles` to Item assets (also Asset definitions extension), to be used similarly to Link `rel`. - Collection `summaries` merge array fields now. - - 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, addedPROJJSON / WKT2) for reference systems @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fields extension has a simplified format for GET parameters - `search` extension renamed to `context` extension. JSON object renamed from `search:metadata` to `context` - Removed "next" from the search metadata and query parameter, added POST body and headers to the links for paging support +- Prefix `eo:` removed from EO field `eo:epsg`, now just `epsg` ### Removed - Removed `version` field in STAC Collections. Use [Version Extension](extensions/version/README.md) instead diff --git a/collection-spec/collection-spec.md b/collection-spec/collection-spec.md index 60f1c0e29..a14055cb3 100644 --- a/collection-spec/collection-spec.md +++ b/collection-spec/collection-spec.md @@ -153,7 +153,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 `eo: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. +This makes much sense for fields such as `platform` or `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. ## Extensions diff --git a/collection-spec/examples/sentinel2.json b/collection-spec/examples/sentinel2.json index 1e825c531..d3f46e5a6 100644 --- a/collection-spec/examples/sentinel2.json +++ b/collection-spec/examples/sentinel2.json @@ -62,7 +62,7 @@ }, "sci:citation": ["Copernicus Sentinel data [Year]"], "eo:gsd": [10,30,60], - "eo:epsg": [32601,32602,32603,32604,32605,32606,32607,32608,32609,32610,32611,32612,32613,32614,32615,32616,32617,32618,32619,32620,32621,32622,32623,32624,32625,32626,32627,32628,32629,32630,32631,32632,32633,32634,32635,32636,32637,32638,32639,32640,32641,32642,32643,32644,32645,32646,32647,32648,32649,32650,32651,32652,32653,32654,32655,32656,32657,32658,32659,32660], + "epsg": [32601,32602,32603,32604,32605,32606,32607,32608,32609,32610,32611,32612,32613,32614,32615,32616,32617,32618,32619,32620,32621,32622,32623,32624,32625,32626,32627,32628,32629,32630,32631,32632,32633,32634,32635,32636,32637,32638,32639,32640,32641,32642,32643,32644,32645,32646,32647,32648,32649,32650,32651,32652,32653,32654,32655,32656,32657,32658,32659,32660], "eo:bands": [ { "name": "B1", diff --git a/extensions/datacube/examples/example-collection.json b/extensions/datacube/examples/example-collection.json index 4a87d2f91..02dd46306 100644 --- a/extensions/datacube/examples/example-collection.json +++ b/extensions/datacube/examples/example-collection.json @@ -51,7 +51,7 @@ "eo:platform": ["sentinel-2a","sentinel-2b"], "eo:constellation": ["sentinel-2"], "eo:instrument": ["msi"], - "eo:epsg": [3857], + "epsg": [3857], "eo:bands": [ [ { diff --git a/extensions/eo/README.md b/extensions/eo/README.md index dba1c50cc..3fadb1a51 100644 --- a/extensions/eo/README.md +++ b/extensions/eo/README.md @@ -29,7 +29,7 @@ If the data has been collected by a satellite, it is strongly recommended to use | ---------------- | ------------------------ | ----------- | | eo:gsd | number | **REQUIRED.** Ground Sample Distance at the sensor. | | eo:bands | [[Band Object](#band-object)] | **REQUIRED.** This is a list of the available bands where each item is a [Band Object](#band-object). | -| eo:epsg | integer\|null | [EPSG code](http://www.epsg-registry.org/) of the datasource, `null` if no EPSG code. | +| epsg | integer\|null | [EPSG code](http://www.epsg-registry.org/) of the datasource, `null` if no EPSG code. Note: there is not prefix on this field. | | eo:cloud_cover | number | Estimate of cloud cover as a percentage (0-100) of the entire scene. If not available the field should not be provided. | **eo:gsd** is the nominal Ground Sample Distance for the data, as measured in meters on the ground. There are many @@ -43,11 +43,11 @@ PlanetScope Ortho Tile Product has an `eo:gsd` of 3.7 (or 4 if rounding), even t 3.125. For example, one might choose for WorldView-2 the Multispectral 20° off-nadir value of 2.07 and for WorldView-3 the Multispectral 20° off-nadir value of 1.38. -**eo:epsg** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a +**epsg** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a 'projection') used by the data, and can usually be referenced using an [EPSG code](http://epsg.io). If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control -Points, eo:epsg should be set to null. It should also be set to null if a CRS exists, but for which -there is no valid EPSG code. +Points, `epsg` should be set to null. It should also be set to null if a CRS exists, but for which +there is no valid EPSG code. Note: there is not prefix on this field. ### Band Object diff --git a/extensions/eo/json-schema/schema.json b/extensions/eo/json-schema/schema.json index b6b936b0e..67c146382 100644 --- a/extensions/eo/json-schema/schema.json +++ b/extensions/eo/json-schema/schema.json @@ -62,7 +62,7 @@ } } }, - "eo:epsg": { + "epsg": { "title": "EPSG code", "type": [ "integer", diff --git a/extensions/projection/README.md b/extensions/projection/README.md index 287f6a80e..fa0858ffd 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -18,10 +18,12 @@ projections per Asset is not currently handled by this extension. | Field Name | Type | Description | | ---------------- | ------------------------ | ----------- | | epsg | integer\|null | **Required** [EPSG code](http://www.epsg-registry.org/) of the datasource | -| asset_crs_proj4 | string \|null | Recommended. PROJ4 string representing the Coordinate Reference System (CRS) that the `asset_crs_geometry` and `asset_crs_bbox` fields represent | -| asset_crs_geometry | Polygon Object | Recommended. Defines the footprint of this Item. | -| asset_crs_bbox | [number] | Recommended. Bounding box of the Item in the asset CRS | -| asset_crs_centroid | Centroid Object | Recommended. Coordinates representing the centroid of the Item in the asset CRS | +| proj:proj4 | string \|null | Recommended. PROJ4 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | +| proj:wkt2 | string \|null | Recommended. WKT2 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | +| proj:projjson | PROJJSON Object \|null | Recommended. PROJJSON object representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | +| proj:geometry | Polygon Object | Recommended. Defines the footprint of this Item. | +| proj:bbox | [number] | Recommended. Bounding box of the Item in the asset CRS | +| proj:centroid | Centroid Object | Recommended. Coordinates representing the centroid of the Item in the asset CRS | **epsg** - A Coordinate Reference System (CRS) is the data reference system (sometimes called a 'projection') used by the asset data, and can usually be referenced using an [EPSG code](http://epsg.io). @@ -29,26 +31,38 @@ If the asset data does not have a CRS, such as in the case of non-rectified imag Points, `epsg` should be set to null. It should also be set to null if a CRS exists, but for which there is no valid EPSG code. -**asset_crs_proj4** - A Coordinate Reference System (CRS) is the data reference system (sometimes called a +**proj:proj4** - A Coordinate Reference System (CRS) is the data reference system (sometimes called a 'projection') used by the asset data. This value is a PROJ4 string. If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control -Points, asset_crs_proj4 should be set to null. It should also be set to null if a CRS exists, but for which +Points, proj:proj4 should be set to null. It should also be set to null if a CRS exists, but for which a PROJ4 string does not exist. -**asset_crs_geometry** - A Polygon object representing the footprint of this item, formatted according the Polygon +**proj:wkt2** - A Coordinate Reference System (CRS) is the data reference system (sometimes called a +'projection') used by the asset data. This value is a WKT2 string. +If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control +Points, proj:wkt2 should be set to null. It should also be set to null if a CRS exists, but for which +a WKT2 string does not exist. + +**proj:projjson** - A Coordinate Reference System (CRS) is the data reference system (sometimes called a +'projection') used by the asset data. This value is a [PROJJSON](https://proj.org/usage/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). + +**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 -in EPSG:4326 as required by RFC7946. Specified based on the `asset_crs_proj4` field (not necessarily EPSG:4326). +in EPSG:4326 as required by RFC7946. Specified based on the `proj:proj4` field (not necessarily EPSG:4326). Ideally, this will be represented by a Polygon with five coordinates, as the item in the asset data CRS should be -a square aligned to the CRS grid. It is recommended that either or both of `asset_crs_geometry` and `asset_crs_bbox` +a square aligned to the original CRS grid. It is recommended that either or both of `proj:geometry` and `proj:bbox` be defined. -**asset_crs_bbox** - Bounding box of the assets represented by this item in the asset data CRS. Specified as four -coordinates based on the CRS defined in the `epsg` and `asset_crs_proj4` fields. First two numbers are coordinates +**proj:bbox** - Bounding box of the assets represented by this item in the asset data CRS. Specified as four +coordinates based on the CRS defined in the `epsg` and `proj:proj4` fields. First two numbers are coordinates of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north], -\[xmin, ymin, xmax, ymax], \[left, down, right, up]. It is recommended that either or both of `asset_crs_geometry` -and `asset_crs_bbox` be defined. +\[xmin, ymin, xmax, ymax], \[left, down, right, up]. It is recommended that either or both of `proj:geometry` +and `proj:bbox` be defined. -**asset_crs_centroid** - Coordinates representing the centroid of the item in the asset data CRS. Coordinates are +**proj:centroid** - Coordinates representing the centroid of the item in the asset data CRS. Coordinates are defined in latitude and longitude, even if the data coordinate system does not use lat/long. ## Centroid Object diff --git a/extensions/projection/examples/example-landsat8.json b/extensions/projection/examples/example-landsat8.json index 766b392fd..87e55c39a 100644 --- a/extensions/projection/examples/example-landsat8.json +++ b/extensions/projection/examples/example-landsat8.json @@ -3,8 +3,132 @@ "type": "Feature", "properties": { "epsg": 32614, - "asset_crs_proj4": "+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs", - "asset_crs_geometry": { + "proj:proj4": "+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs", + "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", + "type": "ProjectedCRS", + "name": "WGS 84 / UTM zone 14N", + "base_crs": { + "name": "WGS 84", + "datum": { + "type": "GeodeticReferenceFrame", + "name": "World Geodetic System 1984", + "ellipsoid": { + "name": "WGS 84", + "semi_major_axis": 6378137, + "inverse_flattening": 298.257223563 + } + }, + "coordinate_system": { + "subtype": "ellipsoidal", + "axis": [ + { + "name": "Geodetic latitude", + "abbreviation": "Lat", + "direction": "north", + "unit": "degree" + }, + { + "name": "Geodetic longitude", + "abbreviation": "Lon", + "direction": "east", + "unit": "degree" + } + ] + }, + "id": { + "authority": "EPSG", + "code": 4326 + } + }, + "conversion": { + "name": "UTM zone 14N", + "method": { + "name": "Transverse Mercator", + "id": { + "authority": "EPSG", + "code": 9807 + } + }, + "parameters": [ + { + "name": "Latitude of natural origin", + "value": 0, + "unit": "degree", + "id": { + "authority": "EPSG", + "code": 8801 + } + }, + { + "name": "Longitude of natural origin", + "value": -99, + "unit": "degree", + "id": { + "authority": "EPSG", + "code": 8802 + } + }, + { + "name": "Scale factor at natural origin", + "value": 0.9996, + "unit": "unity", + "id": { + "authority": "EPSG", + "code": 8805 + } + }, + { + "name": "False easting", + "value": 500000, + "unit": "metre", + "id": { + "authority": "EPSG", + "code": 8806 + } + }, + { + "name": "False northing", + "value": 0, + "unit": "metre", + "id": { + "authority": "EPSG", + "code": 8807 + } + } + ] + }, + "coordinate_system": { + "subtype": "Cartesian", + "axis": [ + { + "name": "Easting", + "abbreviation": "E", + "direction": "east", + "unit": "metre" + }, + { + "name": "Northing", + "abbreviation": "N", + "direction": "north", + "unit": "metre" + } + ] + }, + "area": "World - N hemisphere - 102°W to 96°W - by country", + "bbox": { + "south_latitude": 0, + "west_longitude": -102, + "north_latitude": 84, + "east_longitude": -96 + }, + "id": { + "authority": "EPSG", + "code": 32614 + } + }, + "proj:geometry": { "coordinates": [ [ [ @@ -31,8 +155,8 @@ ], "type": "Polygon" }, - "asset_crs_bbox": [ 169200.0, 3712800.0, 403200.0, 3951000.0 ], - "asset_crs_centroid": { + "proj:bbox": [ 169200.0, 3712800.0, 403200.0, 3951000.0 ], + "proj:centroid": { "lat": 34.595302781575604, "lon": -101.34448382627504 } diff --git a/extensions/projection/json-schema/schema.json b/extensions/projection/json-schema/schema.json index c1d16abd8..682138c57 100644 --- a/extensions/projection/json-schema/schema.json +++ b/extensions/projection/json-schema/schema.json @@ -31,18 +31,32 @@ "null" ] }, - "asset_crs_proj4":{ - "title":"Coordinate Reference System in PROJ format", + "proj:proj4":{ + "title":"Coordinate Reference System in PROJ4 format", "type":[ "string", "null" ] }, - "asset_crs_geometry":{ + "proj:wkt2":{ + "title":"Coordinate Reference System in WKT2 format", + "type":[ + "string", + "null" + ] + }, + "proj:projjson":{ + "title":"Coordinate Reference System in PROJJSON format", + "type":[ + "object", + "null" + ] + }, + "proj:geometry":{ "title":"Geometry", "type":"object" }, - "asset_crs_bbox":{ + "proj:bbox":{ "title":"Extent", "type":"array", "minItems":4, @@ -51,7 +65,7 @@ "type":"number" } }, - "asset_crs_centroid":{ + "proj:centroid":{ "title":"Centroid", "type":"object", "required": [ diff --git a/extensions/single-file-stac/examples/example-search.json b/extensions/single-file-stac/examples/example-search.json index 873758a36..53a874e62 100644 --- a/extensions/single-file-stac/examples/example-search.json +++ b/extensions/single-file-stac/examples/example-search.json @@ -49,7 +49,7 @@ "landsat:scene_id": "LC80370332018039LGN00", "landsat:processing_level": "L1TP", "landsat:tier": "T1", - "eo:epsg": 32612 + "epsg": 32612 }, "assets": { "index": { @@ -216,7 +216,7 @@ "landsat:scene_id": "LC80340332018034LGN00", "landsat:processing_level": "L1TP", "landsat:tier": "T1", - "eo:epsg": 32613 + "epsg": 32613 }, "assets": { "index": { 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 83d191db4..a299de11c 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 @@ -46,7 +46,7 @@ "sat:sun_azimuth_angle": 111.113, "sat:sun_elevation_angle": 65.8018, "sat:off_nadir_angle": -0.00751271, - "eo:epsg": 32763, + "epsg": 32763, "cbers:data_type": "L4", "cbers:path": 177, "cbers:row": 106 diff --git a/item-spec/examples/digitalglobe-sample.json b/item-spec/examples/digitalglobe-sample.json index 829a742c7..db330c8fa 100644 --- a/item-spec/examples/digitalglobe-sample.json +++ b/item-spec/examples/digitalglobe-sample.json @@ -78,7 +78,7 @@ "platform": "worldview02", "sat:sun_elevation_angle": 33.4, "eo:gsd": 2.047, - "eo:epsg": null, + "epsg": null, "dg:catalog_id": "103001004B316600", "dg:soli": "056823192", "dg:part": 2, diff --git a/item-spec/examples/sentinel2-sample.json b/item-spec/examples/sentinel2-sample.json index d638b9111..992678bfb 100644 --- a/item-spec/examples/sentinel2-sample.json +++ b/item-spec/examples/sentinel2-sample.json @@ -302,7 +302,7 @@ "collection": "s2-l2a", "datetime": "2018-06-05T10:00:27.464Z", "platform": "sentinel-2", - "eo:epsg": 32635, + "epsg": 32635, "eo:cloud_cover": 88.459539, "sat:sun_azimuth_angle" : 176.091667178268 } From ab1d97dbb9412a19e0c99a836063ea833515ab1c Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Tue, 17 Dec 2019 12:26:39 -0500 Subject: [PATCH 21/32] remove eo:epsg in favor of proj:epsg --- CHANGELOG.md | 2 +- collection-spec/collection-spec.md | 2 +- collection-spec/examples/sentinel2.json | 2 +- extensions/datacube/examples/example-collection.json | 2 +- extensions/eo/README.md | 7 ------- extensions/eo/examples/example-landsat8.json | 8 ++++---- extensions/eo/json-schema/schema.json | 7 ------- extensions/projection/README.md | 10 +++++----- extensions/projection/examples/example-landsat8.json | 2 +- extensions/projection/json-schema/schema.json | 4 ++-- .../single-file-stac/examples/example-search.json | 4 ++-- .../examples/CBERS_4_MUX_20181029_177_106_L4.json | 2 +- item-spec/examples/digitalglobe-sample.json | 2 +- item-spec/examples/sentinel2-sample.json | 2 +- 14 files changed, 21 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78990a207..30bdf131c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,7 +35,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fields extension has a simplified format for GET parameters - `search` extension renamed to `context` extension. JSON object renamed from `search:metadata` to `context` - Removed "next" from the search metadata and query parameter, added POST body and headers to the links for paging support -- Prefix `eo:` removed from EO field `eo:epsg`, now just `epsg` ### Removed - Removed `version` field in STAC Collections. Use [Version Extension](extensions/version/README.md) instead @@ -49,6 +48,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - `license` field doesn't allow SPDX expressions any longer. Use `various` and links instead. - STAC API: - Removed "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 a14055cb3..e48a8da09 100644 --- a/collection-spec/collection-spec.md +++ b/collection-spec/collection-spec.md @@ -153,7 +153,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 `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. +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. ## Extensions diff --git a/collection-spec/examples/sentinel2.json b/collection-spec/examples/sentinel2.json index d3f46e5a6..5af22bc83 100644 --- a/collection-spec/examples/sentinel2.json +++ b/collection-spec/examples/sentinel2.json @@ -62,7 +62,7 @@ }, "sci:citation": ["Copernicus Sentinel data [Year]"], "eo:gsd": [10,30,60], - "epsg": [32601,32602,32603,32604,32605,32606,32607,32608,32609,32610,32611,32612,32613,32614,32615,32616,32617,32618,32619,32620,32621,32622,32623,32624,32625,32626,32627,32628,32629,32630,32631,32632,32633,32634,32635,32636,32637,32638,32639,32640,32641,32642,32643,32644,32645,32646,32647,32648,32649,32650,32651,32652,32653,32654,32655,32656,32657,32658,32659,32660], + "proj:epsg": [32601,32602,32603,32604,32605,32606,32607,32608,32609,32610,32611,32612,32613,32614,32615,32616,32617,32618,32619,32620,32621,32622,32623,32624,32625,32626,32627,32628,32629,32630,32631,32632,32633,32634,32635,32636,32637,32638,32639,32640,32641,32642,32643,32644,32645,32646,32647,32648,32649,32650,32651,32652,32653,32654,32655,32656,32657,32658,32659,32660], "eo:bands": [ { "name": "B1", diff --git a/extensions/datacube/examples/example-collection.json b/extensions/datacube/examples/example-collection.json index 02dd46306..acd8ee2ce 100644 --- a/extensions/datacube/examples/example-collection.json +++ b/extensions/datacube/examples/example-collection.json @@ -51,7 +51,7 @@ "eo:platform": ["sentinel-2a","sentinel-2b"], "eo:constellation": ["sentinel-2"], "eo:instrument": ["msi"], - "epsg": [3857], + "proj:epsg": [3857], "eo:bands": [ [ { diff --git a/extensions/eo/README.md b/extensions/eo/README.md index 3fadb1a51..5097e7ed1 100644 --- a/extensions/eo/README.md +++ b/extensions/eo/README.md @@ -29,7 +29,6 @@ If the data has been collected by a satellite, it is strongly recommended to use | ---------------- | ------------------------ | ----------- | | eo:gsd | number | **REQUIRED.** Ground Sample Distance at the sensor. | | eo:bands | [[Band Object](#band-object)] | **REQUIRED.** This is a list of the available bands where each item is a [Band Object](#band-object). | -| epsg | integer\|null | [EPSG code](http://www.epsg-registry.org/) of the datasource, `null` if no EPSG code. Note: there is not prefix on this field. | | eo:cloud_cover | number | Estimate of cloud cover as a percentage (0-100) of the entire scene. If not available the field should not be provided. | **eo:gsd** is the nominal Ground Sample Distance for the data, as measured in meters on the ground. There are many @@ -43,12 +42,6 @@ PlanetScope Ortho Tile Product has an `eo:gsd` of 3.7 (or 4 if rounding), even t 3.125. For example, one might choose for WorldView-2 the Multispectral 20° off-nadir value of 2.07 and for WorldView-3 the Multispectral 20° off-nadir value of 1.38. -**epsg** - A Coordinate Reference System (CRS) is the native reference system (sometimes called a -'projection') used by the data, and can usually be referenced using an [EPSG code](http://epsg.io). -If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control -Points, `epsg` should be set to null. It should also be set to null if a CRS exists, but for which -there is no valid EPSG code. Note: there is not prefix on this field. - ### Band Object | Field Name | Type | Description | diff --git a/extensions/eo/examples/example-landsat8.json b/extensions/eo/examples/example-landsat8.json index b4f49a2af..255d48693 100644 --- a/extensions/eo/examples/example-landsat8.json +++ b/extensions/eo/examples/example-landsat8.json @@ -42,16 +42,16 @@ ] }, "properties": { + "platform": "landsat-8", + "instrument": ["oli", "tirs"], "datetime": "2018-10-01T01:08:32.033Z", - "eo:cloud_cover": 78, "sat:sun_azimuth_angle": 168.8989761, "sat:sun_elevation_angle": 26.32596431, + "sat:off_nadir_angle": 0, "landsat:path": 107, "landsat:row": 18, "eo:gsd": 30, - "platform": "landsat-8", - "instrument": ["oli", "tirs"], - "sat:off_nadir_angle": 0, + "eo:cloud_cover": 78, "eo:bands": [ { "name": "B1", diff --git a/extensions/eo/json-schema/schema.json b/extensions/eo/json-schema/schema.json index 67c146382..0728645f8 100644 --- a/extensions/eo/json-schema/schema.json +++ b/extensions/eo/json-schema/schema.json @@ -62,13 +62,6 @@ } } }, - "epsg": { - "title": "EPSG code", - "type": [ - "integer", - "null" - ] - }, "eo:cloud_cover": { "title": "Cloud Cover", "type": "number", diff --git a/extensions/projection/README.md b/extensions/projection/README.md index fa0858ffd..b3588f4ac 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -17,7 +17,7 @@ projections per Asset is not currently handled by this extension. | Field Name | Type | Description | | ---------------- | ------------------------ | ----------- | -| epsg | integer\|null | **Required** [EPSG code](http://www.epsg-registry.org/) of the datasource | +| proj:epsg | integer\|null | **Required** [EPSG code](http://www.epsg-registry.org/) of the datasource | | proj:proj4 | string \|null | Recommended. PROJ4 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | | proj:wkt2 | string \|null | Recommended. WKT2 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | | proj:projjson | PROJJSON Object \|null | Recommended. PROJJSON object representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | @@ -25,16 +25,16 @@ projections per Asset is not currently handled by this extension. | proj:bbox | [number] | Recommended. Bounding box of the Item in the asset CRS | | proj:centroid | Centroid Object | Recommended. Coordinates representing the centroid of the Item in the asset CRS | -**epsg** - A Coordinate Reference System (CRS) is the data reference system (sometimes called a +**proj:epsg** - A Coordinate Reference System (CRS) is the data reference system (sometimes called a 'projection') used by the asset data, and can usually be referenced using an [EPSG code](http://epsg.io). If the asset data does not have a CRS, such as in the case of non-rectified imagery with Ground Control -Points, `epsg` should be set to null. It should also be set to null if a CRS exists, but for which +Points, `proj:epsg` should be set to null. It should also be set to null if a CRS exists, but for which there is no valid EPSG code. **proj:proj4** - A Coordinate Reference System (CRS) is the data reference system (sometimes called a 'projection') used by the asset data. This value is a PROJ4 string. If the data does not have a CRS, such as in the case of non-rectified imagery with Ground Control -Points, proj:proj4 should be set to null. It should also be set to null if a CRS exists, but for which +Points, `proj:proj4` should be set to null. It should also be set to null if a CRS exists, but for which a PROJ4 string does not exist. **proj:wkt2** - A Coordinate Reference System (CRS) is the data reference system (sometimes called a @@ -57,7 +57,7 @@ a square aligned to the original CRS grid. It is recommended that either or bot be defined. **proj:bbox** - Bounding box of the assets represented by this item in the asset data CRS. Specified as four -coordinates based on the CRS defined in the `epsg` and `proj:proj4` fields. First two numbers are coordinates +coordinates based on the CRS defined in the `proj:epsg` and `proj:proj4` fields. First two numbers are coordinates of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north], \[xmin, ymin, xmax, ymax], \[left, down, right, up]. It is recommended that either or both of `proj:geometry` and `proj:bbox` be defined. diff --git a/extensions/projection/examples/example-landsat8.json b/extensions/projection/examples/example-landsat8.json index 87e55c39a..d7d605287 100644 --- a/extensions/projection/examples/example-landsat8.json +++ b/extensions/projection/examples/example-landsat8.json @@ -2,7 +2,7 @@ "id": "LC81530252014153LGN00", "type": "Feature", "properties": { - "epsg": 32614, + "proj:epsg": 32614, "proj:proj4": "+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs", "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": { diff --git a/extensions/projection/json-schema/schema.json b/extensions/projection/json-schema/schema.json index 682138c57..1ed593e21 100644 --- a/extensions/projection/json-schema/schema.json +++ b/extensions/projection/json-schema/schema.json @@ -21,10 +21,10 @@ "properties":{ "type":"object", "required":[ - "epsg" + "proj:epsg" ], "properties":{ - "epsg":{ + "proj:epsg":{ "title":"EPSG code", "type":[ "integer", diff --git a/extensions/single-file-stac/examples/example-search.json b/extensions/single-file-stac/examples/example-search.json index 53a874e62..cdcbb4c73 100644 --- a/extensions/single-file-stac/examples/example-search.json +++ b/extensions/single-file-stac/examples/example-search.json @@ -49,7 +49,7 @@ "landsat:scene_id": "LC80370332018039LGN00", "landsat:processing_level": "L1TP", "landsat:tier": "T1", - "epsg": 32612 + "proj:epsg": 32612 }, "assets": { "index": { @@ -216,7 +216,7 @@ "landsat:scene_id": "LC80340332018034LGN00", "landsat:processing_level": "L1TP", "landsat:tier": "T1", - "epsg": 32613 + "proj:epsg": 32613 }, "assets": { "index": { 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 a299de11c..82e577a85 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 @@ -46,7 +46,7 @@ "sat:sun_azimuth_angle": 111.113, "sat:sun_elevation_angle": 65.8018, "sat:off_nadir_angle": -0.00751271, - "epsg": 32763, + "proj:epsg": 32763, "cbers:data_type": "L4", "cbers:path": 177, "cbers:row": 106 diff --git a/item-spec/examples/digitalglobe-sample.json b/item-spec/examples/digitalglobe-sample.json index db330c8fa..11f588c36 100644 --- a/item-spec/examples/digitalglobe-sample.json +++ b/item-spec/examples/digitalglobe-sample.json @@ -78,7 +78,7 @@ "platform": "worldview02", "sat:sun_elevation_angle": 33.4, "eo:gsd": 2.047, - "epsg": null, + "proj:epsg": null, "dg:catalog_id": "103001004B316600", "dg:soli": "056823192", "dg:part": 2, diff --git a/item-spec/examples/sentinel2-sample.json b/item-spec/examples/sentinel2-sample.json index 992678bfb..f8cc287e6 100644 --- a/item-spec/examples/sentinel2-sample.json +++ b/item-spec/examples/sentinel2-sample.json @@ -302,7 +302,7 @@ "collection": "s2-l2a", "datetime": "2018-06-05T10:00:27.464Z", "platform": "sentinel-2", - "epsg": 32635, + "proj:epsg": 32635, "eo:cloud_cover": 88.459539, "sat:sun_azimuth_angle" : 176.091667178268 } From 3f28136ce478d4007bab9601d0e6aa4a79b83c7e Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Tue, 17 Dec 2019 12:28:01 -0500 Subject: [PATCH 22/32] update changelog with projection info --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30bdf131c..8f178edd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added `description` and `roles` fields to the Asset in the [Asset Extension](extensions/asset/README.md) - STAC API: - Added the [Item and Collection API Version extension](api-spec/extensions/version/README.md) to support versioning in the API specification -- Add `proj` extension to define native coordinate system geometry +- Added Projection Extension to describe Items with Assets that have an associated geospatial projection. ### Changed - Support for [CommonMark 0.29 instead of CommonMark 0.28](https://spec.commonmark.org/0.29/changes.html) @@ -60,7 +60,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Changed - Updated specification to base on OGC API - Features - Part 1: Core, v1.0.0 instead of OGC API - Features - Part 1: Core, v1.0.0-draft.2 (fka WFS3 draft 2). -- Added Projection Extension to describe Items with Assets that have an associated geospatial projection. ### Fixed - Numerous typos, clarifications and fixes for documentation and examples. From 688faf328010a9559307bf3e70cb129984ff29af Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Tue, 17 Dec 2019 13:26:01 -0500 Subject: [PATCH 23/32] proj minor updates --- extensions/projection/README.md | 2 +- extensions/projection/json-schema/schema.json | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/extensions/projection/README.md b/extensions/projection/README.md index b3588f4ac..eb2335726 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -20,7 +20,7 @@ projections per Asset is not currently handled by this extension. | proj:epsg | integer\|null | **Required** [EPSG code](http://www.epsg-registry.org/) of the datasource | | proj:proj4 | string \|null | Recommended. PROJ4 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | | proj:wkt2 | string \|null | Recommended. WKT2 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | -| proj:projjson | PROJJSON Object \|null | Recommended. PROJJSON object representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | +| proj:projjson | [PROJJSON Object](https://proj.org/usage/projjson.html) \|null | Recommended. PROJJSON object representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | | proj:geometry | Polygon Object | Recommended. Defines the footprint of this Item. | | proj:bbox | [number] | Recommended. Bounding box of the Item in the asset CRS | | proj:centroid | Centroid Object | Recommended. Coordinates representing the centroid of the Item in the asset CRS | diff --git a/extensions/projection/json-schema/schema.json b/extensions/projection/json-schema/schema.json index 1ed593e21..3aba2b52a 100644 --- a/extensions/projection/json-schema/schema.json +++ b/extensions/projection/json-schema/schema.json @@ -5,7 +5,7 @@ "description":"STAC Projection Extension to a STAC Item", "allOf":[ { - "$ref": "https://raw.githubusercontent.com/radiantearth/stac-spec/master/item-spec/json-schema/item.json#/definitions/core" + "$ref": "../../../item-spec/json-schema/item.json" }, { "$ref":"#/definitions/proj" @@ -45,12 +45,8 @@ "null" ] }, - "proj:projjson":{ - "title":"Coordinate Reference System in PROJJSON format", - "type":[ - "object", - "null" - ] + "proj:projjson": { + "$ref": "https://proj.org/schemas/v0.1/projjson.schema.json" }, "proj:geometry":{ "title":"Geometry", From a00d1eded0bfbd7e206dbedbc86e361697aa5e6d Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Tue, 17 Dec 2019 16:08:09 -0500 Subject: [PATCH 24/32] fix projection projjson null or object --- extensions/projection/json-schema/schema.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/extensions/projection/json-schema/schema.json b/extensions/projection/json-schema/schema.json index 3aba2b52a..4016f75a6 100644 --- a/extensions/projection/json-schema/schema.json +++ b/extensions/projection/json-schema/schema.json @@ -46,7 +46,14 @@ ] }, "proj:projjson": { - "$ref": "https://proj.org/schemas/v0.1/projjson.schema.json" + "oneOf": [ + { + "$ref": "https://proj.org/schemas/v0.1/projjson.schema.json" + }, + { + "type": "null" + } + ] }, "proj:geometry":{ "title":"Geometry", From 7417553f5b15b9a4c5da3a69d6ce97f915ae60fe Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Wed, 18 Dec 2019 09:11:51 -0500 Subject: [PATCH 25/32] proj constraints on centroid lat and lon --- extensions/projection/json-schema/schema.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/extensions/projection/json-schema/schema.json b/extensions/projection/json-schema/schema.json index 4016f75a6..6f9f0626c 100644 --- a/extensions/projection/json-schema/schema.json +++ b/extensions/projection/json-schema/schema.json @@ -77,10 +77,14 @@ ], "properties": { "lat": { - "type": "number" + "type": "number", + "minimum": -90, + "maximum": 90 }, "lon": { - "type": "number" + "type": "number", + "minimum": -180, + "maximum": 180 } } } From fe6e476286f5ce7af8b0f28bbc0eb0894107a845 Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Wed, 18 Dec 2019 09:15:13 -0500 Subject: [PATCH 26/32] projection: remove recommended from fields --- extensions/projection/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions/projection/README.md b/extensions/projection/README.md index eb2335726..2e38b5b6d 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -18,12 +18,12 @@ projections per Asset is not currently handled by this extension. | Field Name | Type | Description | | ---------------- | ------------------------ | ----------- | | proj:epsg | integer\|null | **Required** [EPSG code](http://www.epsg-registry.org/) of the datasource | -| proj:proj4 | string \|null | Recommended. PROJ4 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | -| proj:wkt2 | string \|null | Recommended. WKT2 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | +| proj:proj4 | string \|null | PROJ4 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | +| proj:wkt2 | string \|null | WKT2 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | | proj:projjson | [PROJJSON Object](https://proj.org/usage/projjson.html) \|null | Recommended. PROJJSON object representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | -| proj:geometry | Polygon Object | Recommended. Defines the footprint of this Item. | -| proj:bbox | [number] | Recommended. Bounding box of the Item in the asset CRS | -| proj:centroid | Centroid Object | Recommended. Coordinates representing the centroid of the Item in the asset CRS | +| proj:geometry | Polygon Object | Defines the footprint of this Item. | +| proj:bbox | [number] | Bounding box of the Item in the asset CRS | +| proj:centroid | Centroid Object | Coordinates representing the centroid of the Item in the asset CRS | **proj:epsg** - A Coordinate Reference System (CRS) is the data reference system (sometimes called a 'projection') used by the asset data, and can usually be referenced using an [EPSG code](http://epsg.io). From a8b51d54b5c5191262daf6b302aee23006398f45 Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Wed, 18 Dec 2019 09:23:58 -0500 Subject: [PATCH 27/32] projection: add to bbox definition 3D descriptions --- extensions/projection/README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/extensions/projection/README.md b/extensions/projection/README.md index 2e38b5b6d..27ad8333d 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -20,9 +20,9 @@ projections per Asset is not currently handled by this extension. | proj:epsg | integer\|null | **Required** [EPSG code](http://www.epsg-registry.org/) of the datasource | | proj:proj4 | string \|null | PROJ4 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | | proj:wkt2 | string \|null | WKT2 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | -| proj:projjson | [PROJJSON Object](https://proj.org/usage/projjson.html) \|null | Recommended. PROJJSON object representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | +| proj:projjson | [PROJJSON Object](https://proj.org/usage/projjson.html) \|null | PROJJSON object representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | | proj:geometry | Polygon Object | Defines the footprint of this Item. | -| proj:bbox | [number] | Bounding box of the Item in the asset CRS | +| proj:bbox | [number] | Bounding box of the Item in the asset CRS in 2 or 3 dimensions. | | proj:centroid | Centroid Object | Coordinates representing the centroid of the Item in the asset CRS | **proj:epsg** - A Coordinate Reference System (CRS) is the data reference system (sometimes called a @@ -53,14 +53,12 @@ a PROJJSON string does not exist. The schema for this object can be found [here] object format specified in [RFC 7946, sections 3.1.6](https://tools.ietf.org/html/rfc7946), except not necessarily in EPSG:4326 as required by RFC7946. Specified based on the `proj:proj4` field (not necessarily EPSG:4326). Ideally, this will be represented by a Polygon with five coordinates, as the item in the asset data CRS should be -a square aligned to the original CRS grid. It is recommended that either or both of `proj:geometry` and `proj:bbox` -be defined. +a square aligned to the original CRS grid. -**proj:bbox** - Bounding box of the assets represented by this item in the asset data CRS. Specified as four +**proj:bbox** - Bounding box of the assets represented by this item in the asset data CRS. Specified as 4 or 6 coordinates based on the CRS defined in the `proj:epsg` and `proj:proj4` fields. First two numbers are coordinates -of the lower left corner, followed by coordinates of upper right corner, e.g., \[west, south, east, north], -\[xmin, ymin, xmax, ymax], \[left, down, right, up]. It is recommended that either or both of `proj:geometry` -and `proj:bbox` be defined. +of the lower left corner, followed by coordinates of upper right corner, , e.g., \[west, south, east, north], +\[xmin, ymin, xmax, ymax], \[left, down, right, up], or \[west, south, lowest, east, north, highest]. The length of the 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 elevation in meters and the elevation of the northeasterly most extent is the maximum in meters. **proj:centroid** - Coordinates representing the centroid of the item in the asset data CRS. Coordinates are defined in latitude and longitude, even if the data coordinate system does not use lat/long. From 4842a63baf55e0d7cf4fac1bb79795747dea4015 Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Wed, 18 Dec 2019 09:30:59 -0500 Subject: [PATCH 28/32] projection: geometry is Polygon or MultiPolygon --- extensions/projection/json-schema/schema.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/extensions/projection/json-schema/schema.json b/extensions/projection/json-schema/schema.json index 6f9f0626c..631a05974 100644 --- a/extensions/projection/json-schema/schema.json +++ b/extensions/projection/json-schema/schema.json @@ -46,6 +46,7 @@ ] }, "proj:projjson": { + "title":"Coordinate Reference System in PROJJSON format", "oneOf": [ { "$ref": "https://proj.org/schemas/v0.1/projjson.schema.json" @@ -57,7 +58,14 @@ }, "proj:geometry":{ "title":"Geometry", - "type":"object" + "oneOf": [ + { + "$ref": "https://geojson.org/schema/Polygon.json" + }, + { + "$ref": "https://geojson.org/schema/MultiPolygon.json" + } + ] }, "proj:bbox":{ "title":"Extent", From 1b1087e868450711958e4a910e35b26ebd84f5a6 Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Wed, 18 Dec 2019 09:34:21 -0500 Subject: [PATCH 29/32] projection geometry can only be Polygon --- extensions/projection/json-schema/schema.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/extensions/projection/json-schema/schema.json b/extensions/projection/json-schema/schema.json index 631a05974..47453f3ef 100644 --- a/extensions/projection/json-schema/schema.json +++ b/extensions/projection/json-schema/schema.json @@ -61,9 +61,6 @@ "oneOf": [ { "$ref": "https://geojson.org/schema/Polygon.json" - }, - { - "$ref": "https://geojson.org/schema/MultiPolygon.json" } ] }, From 2e2bf007200b7489717d5930dcecd81f74fabd81 Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Wed, 18 Dec 2019 09:38:31 -0500 Subject: [PATCH 30/32] projection: add example and readme links --- extensions/projection/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extensions/projection/README.md b/extensions/projection/README.md index 27ad8333d..89d02f1ad 100644 --- a/extensions/projection/README.md +++ b/extensions/projection/README.md @@ -13,6 +13,12 @@ e.g. a UTM Zone. However, there may also be assets intended for display, like a been reprojected to a different CRS, e.g., Web Mercator, to better accommodate that use case. This case of differing projections per Asset is not currently handled by this extension. +## Examples +- [Example Landsat8](examples/example-landsat8.json) + +## Schema +- [JSON Schema](json-schema/schema.json) + ## Item Properties fields | Field Name | Type | Description | @@ -21,7 +27,7 @@ projections per Asset is not currently handled by this extension. | proj:proj4 | string \|null | PROJ4 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | | proj:wkt2 | string \|null | WKT2 string representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | | proj:projjson | [PROJJSON Object](https://proj.org/usage/projjson.html) \|null | PROJJSON object representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent | -| proj:geometry | Polygon Object | Defines the footprint of this Item. | +| proj:geometry | [Polygon Object](https://geojson.org/schema/Polygon.json) | Defines the footprint of this Item. | | proj:bbox | [number] | Bounding box of the Item in the asset CRS in 2 or 3 dimensions. | | proj:centroid | Centroid Object | Coordinates representing the centroid of the Item in the asset CRS | From cdef610c1b1cf9e7af593622141b75854e5ebc44 Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Wed, 18 Dec 2019 10:47:49 -0500 Subject: [PATCH 31/32] add projection extension definition to items that use it --- extensions/projection/examples/example-landsat8.json | 4 ++++ item-spec/examples/CBERS_4_MUX_20181029_177_106_L4.json | 1 + item-spec/examples/digitalglobe-sample.json | 1 + item-spec/examples/sentinel2-sample.json | 5 +++-- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/extensions/projection/examples/example-landsat8.json b/extensions/projection/examples/example-landsat8.json index d7d605287..fa10d9050 100644 --- a/extensions/projection/examples/example-landsat8.json +++ b/extensions/projection/examples/example-landsat8.json @@ -1,4 +1,8 @@ { + "stac_version": "0.9.0", + "stac_extensions": [ + "proj" + ], "id": "LC81530252014153LGN00", "type": "Feature", "properties": { 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 82e577a85..67bed1385 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 @@ -2,6 +2,7 @@ "stac_version": "0.8.1", "stac_extensions": [ "eo", + "proj", "https://example.com/stac/cbers-extension/1.0/schema.json" ], "id": "CBERS_4_MUX_20181029_177_106_L4", diff --git a/item-spec/examples/digitalglobe-sample.json b/item-spec/examples/digitalglobe-sample.json index 11f588c36..0e092236d 100644 --- a/item-spec/examples/digitalglobe-sample.json +++ b/item-spec/examples/digitalglobe-sample.json @@ -2,6 +2,7 @@ "stac_version": "0.8.1", "stac_extensions": [ "eo", + "proj", "instrument", "https://example.digitalglobe.com/stac/1.0/schema.json" ], diff --git a/item-spec/examples/sentinel2-sample.json b/item-spec/examples/sentinel2-sample.json index f8cc287e6..65567f706 100644 --- a/item-spec/examples/sentinel2-sample.json +++ b/item-spec/examples/sentinel2-sample.json @@ -1,8 +1,9 @@ { "stac_version": "0.8.1", "stac_extensions": [ - "eo", - "instrument" + "eo", + "proj", + "instrument" ], "type": "Feature", "id": "S2A_OPER_MSI_L2A_TL_SGS__20180524T190423_A015250_T26SKD_N02.08", From f22ac655f09085fa7823bab0b21f4c3d6cfab89d Mon Sep 17 00:00:00 2001 From: Phil Varner Date: Wed, 18 Dec 2019 10:59:57 -0500 Subject: [PATCH 32/32] make projection example valid STAC Item --- .../projection/examples/example-landsat8.json | 63 ++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/extensions/projection/examples/example-landsat8.json b/extensions/projection/examples/example-landsat8.json index fa10d9050..a095df00c 100644 --- a/extensions/projection/examples/example-landsat8.json +++ b/extensions/projection/examples/example-landsat8.json @@ -1,11 +1,57 @@ { "stac_version": "0.9.0", "stac_extensions": [ + "eo", "proj" ], "id": "LC81530252014153LGN00", "type": "Feature", + "collection": "landsat-8-l1", + "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 + ] + ] + ] + }, + "assets": { + "B1": { + "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_B1.TIF", + "type": "image/tiff; application=geotiff", + "eo:bands": [ + 0 + ], + "title": "Band 1 (coastal)" + } + }, "properties": { + "datetime": "2018-10-01T01:08:32.033Z", "proj:epsg": 32614, "proj:proj4": "+proj=utm +zone=14 +datum=WGS84 +units=m +no_defs", "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]]", @@ -163,6 +209,21 @@ "proj:centroid": { "lat": 34.595302781575604, "lon": -101.34448382627504 + }, + "eo:bands": [ + { + "name": "B1", + "common_name": "coastal", + "gsd": 30, + "center_wavelength": 0.44, + "full_width_half_max": 0.02 + } + ] + }, + "links": [ + { + "rel": "self", + "href": "https://odu9mlf7d6.execute-api.us-east-1.amazonaws.com/stage/search?id=LC08_L1TP_107018_20181001_20181001_01_RT" } - } + ] } \ No newline at end of file