Skip to content

Commit

Permalink
projection extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Varner committed Jun 7, 2019
1 parent 24c13f6 commit 6ba4911
Show file tree
Hide file tree
Showing 3 changed files with 172 additions and 8 deletions.
9 changes: 1 addition & 8 deletions extensions/eo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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). |
Expand All @@ -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 |
Expand Down
119 changes: 119 additions & 0 deletions extensions/projection/README.md
Original file line number Diff line number Diff line change
@@ -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 ],
},
...
}
}
```
52 changes: 52 additions & 0 deletions extensions/projection/schema.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
}

0 comments on commit 6ba4911

Please sign in to comment.