Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Projection Extension #485

Merged
merged 56 commits into from
Dec 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
6ba4911
projection extension
Jun 7, 2019
8356be7
Merge remote-tracking branch 'upstream/dev' into projection
Jun 8, 2019
13c5a75
add recommended
Jun 9, 2019
dbc6eef
update crs fields
Jun 9, 2019
3799a23
Merge branch 'dev' into projection
Jun 10, 2019
b387331
change proj required fields
Jun 11, 2019
7a9a1f9
attributes on in Item Properties
Jun 11, 2019
0266e31
Merge branch 'dev' into projection
cholmes Jun 17, 2019
83706db
Merge branch 'dev' into projection
Jun 17, 2019
7d23542
add constraint to -180 180
Jun 17, 2019
4ac928c
Merge branch 'projection' of github.com:philvarner/stac-spec into pro…
Jun 17, 2019
bb9b745
Merge branch 'dev' into projection
Jun 20, 2019
bf32ab4
fix constraints on extent and centroid values
Jun 20, 2019
51a622a
rename extent to bbox
Jun 20, 2019
8f18bcd
Merge branch 'dev' into projection
joshfix Jun 21, 2019
fe2902d
Merge branch 'dev' into projection
Jun 21, 2019
70ba5b2
Merge branch 'dev' into projection
Jun 21, 2019
7e953c3
Merge branch 'dev' into projection
Jul 9, 2019
6fe837c
Merge branch 'dev' into projection
Jul 24, 2019
eaff656
update changelog and add extension to list in readme
Jul 24, 2019
2a939bd
move projection entry in changelog
Jul 24, 2019
309a172
Merge branch 'dev' into projection
Jul 30, 2019
7b0452a
redefine centroid
Jul 30, 2019
a0b93c9
Inherit from Item JSON Schema
m-mohr Jul 31, 2019
db491b5
Fixed JSON Schema
m-mohr Jul 31, 2019
ad3652b
Changed maxItems back to 3
m-mohr Jul 31, 2019
a7d48d8
Fixed example
m-mohr Jul 31, 2019
0bc10cf
remove asset projection example, clarify language, update schema
Aug 1, 2019
f40cc2c
Merge branch 'dev' into projection
cholmes Aug 1, 2019
e7458cd
Merge branch 'dev' into projection
Oct 30, 2019
848195d
Merge remote-tracking branch 'upstream/dev' into projection
Oct 31, 2019
d7e3229
Merge branch 'dev' into projection
Nov 7, 2019
855a29b
update field names to remove colon prefixes
Nov 7, 2019
c68891d
Merge branch 'projection' of github.com:philvarner/stac-spec into pro…
Nov 7, 2019
fc02958
Merge branch 'dev' into projection
Dec 2, 2019
4581cc0
cleanup changelog
Dec 2, 2019
a580b5a
update projection
Dec 2, 2019
a4a61ec
Merge branch 'dev' into projection
matthewhanson Dec 3, 2019
594c433
Merge branch 'dev' into projection
matthewhanson Dec 17, 2019
a7cc6f1
remove 'eo' prefix from epsg, add wkt2 and projjson fields
Dec 17, 2019
ca78722
Merge branch 'dev' into projection
Dec 17, 2019
ab1d97d
remove eo:epsg in favor of proj:epsg
Dec 17, 2019
3f28136
update changelog with projection info
Dec 17, 2019
688faf3
proj minor updates
Dec 17, 2019
c0c66c4
Merge branch 'dev' into projection
Dec 17, 2019
a00d1ed
fix projection projjson null or object
Dec 17, 2019
1a26c36
Merge branch 'projection' of github.com:philvarner/stac-spec into pro…
Dec 17, 2019
7417553
proj constraints on centroid lat and lon
Dec 18, 2019
fe6e476
projection: remove recommended from fields
Dec 18, 2019
a8b51d5
projection: add to bbox definition 3D descriptions
Dec 18, 2019
4842a63
projection: geometry is Polygon or MultiPolygon
Dec 18, 2019
1b1087e
projection geometry can only be Polygon
Dec 18, 2019
2e2bf00
projection: add example and readme links
Dec 18, 2019
cdef610
add projection extension definition to items that use it
Dec 18, 2019
f22ac65
make projection example valid STAC Item
Dec 18, 2019
9be47e9
Merge branch 'dev' into projection
matthewhanson Dec 20, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Instrument extension, adds fields: `platform`, `instruments`, `constellation` (all moved from EO and SAR extensions), and `mission`
- Data Cube extension can be used in Collections, added new field `description`
- Added `description` and `roles` fields to the Asset in the [Asset Extension](extensions/asset/README.md)
- Projection Extension to describe Items with Assets that have an associated geospatial projection.
- STAC API:
- Added the [Item and Collection API Version extension](api-spec/extensions/version/README.md) to support versioning in the API specification
- Run `npm run serve` or `npm run serve-ext` to quickly render development versions of the OpenAPI spec in the browser.
Expand All @@ -24,7 +25,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added attribute `roles` to Item assets (also Asset definitions extension), to be used similarly to Link `rel`.
- Updated API yaml to clarify bbox filter should be implemented without brackets. Example: `bbox=160.6,-55.95,-170,-25.89`
- Collection `summaries` merge array fields now.

- Extensions:
- [datetime-range extension](extensions/datetime-range/README.md): Removed extension prefix from example and schema
- Data Cube extension: Changed allowed formats (removed PROJ string, added PROJJSON / WKT2) for reference systems
Expand All @@ -51,6 +51,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

Expand Down
2 changes: 1 addition & 1 deletion collection-spec/collection-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,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 `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
Expand Down
2 changes: 1 addition & 1 deletion collection-spec/examples/sentinel2.json
Original file line number Diff line number Diff line change
Expand Up @@ -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],
"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",
Expand Down
1 change: 1 addition & 0 deletions extensions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ An extension can add new fields to STAC entities (content extension), or can add
| [Instrument](instrument/README.md) (-) | Item | Adds metadata specifying a platform and instrument used in a data collection mission. | *Proposal* |
| [Label](label/README.md) (`label`) | Item | Items that relate labeled AOIs with source imagery | *Proposal* |
| [Point Cloud](pointcloud/README.md) (`pc`) | Item | Provides a way to describe point cloud datasets. The point clouds can come from either active or passive sensors, and data is frequently acquired using tools such as LiDAR or coincidence-matched imagery. | *Proposal* |
| [Projection](projection/README.md) (`proj`) | Item | Provides a way to describe items whose assets are in a geospatial projection. | *Proposal* |
| [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* |
| [Satellite](sat/README.md) (`sat`) | Item | Satellite related metadata for data collected from satellites. | *Proposal* |
| [Scientific](scientific/README.md) (`sci`) | Item, Collection | 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* |
Expand Down
2 changes: 1 addition & 1 deletion extensions/datacube/examples/example-collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"eo:platform": ["sentinel-2a","sentinel-2b"],
"eo:constellation": ["sentinel-2"],
"eo:instrument": ["msi"],
"eo:epsg": [3857],
"proj:epsg": [3857],
"eo:bands": [
[
{
Expand Down
7 changes: 0 additions & 7 deletions extensions/eo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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). |
| 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:gsd** is the nominal Ground Sample Distance for the data, as measured in meters on the ground. There are many
Expand All @@ -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.

**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
8 changes: 4 additions & 4 deletions extensions/eo/examples/example-landsat8.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 0 additions & 7 deletions extensions/eo/json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@
}
}
},
"eo:epsg": {
"title": "EPSG code",
"type": [
"integer",
"null"
]
},
"eo:cloud_cover": {
"title": "Cloud Cover",
"type": "number",
Expand Down
79 changes: 79 additions & 0 deletions extensions/projection/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# 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. Here `proj` is short
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 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 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.

## Examples
- [Example Landsat8](examples/example-landsat8.json)

## Schema
- [JSON Schema](json-schema/schema.json)

## Item Properties fields

| Field Name | Type | Description |
| ---------------- | ------------------------ | ----------- |
| 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 | PROJJSON object representing the Coordinate Reference System (CRS) that the `proj:geometry` and `proj:bbox` fields represent |
| 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 |

**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, `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
a PROJ4 string does not exist.

**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 `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.

**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], 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.

## Centroid Object

This object represents the centroid of an item's geometry.

| Field Name | Type | Description |
| ------------------- | ------ | ------------------------------------------------------------ |
| lat | number | The latitude of the centroid. |
| lon | number | The longitude of the centroid. |
Loading