forked from radiantearth/stac-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Phil Varner
committed
Jun 7, 2019
1 parent
24c13f6
commit 6ba4911
Showing
3 changed files
with
172 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ], | ||
}, | ||
... | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |