Skip to content

Commit

Permalink
Better describe Statistics Object #1318
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Aug 27, 2024
1 parent 0cb58e6 commit 8b92674
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed

- `item_assets` is not required
- Better describe the Statistics Object ([#1318](https://github.com/radiantearth/stac-spec/issues/1318))

## [v1.1.0-beta.1] - 2024-08-08

Expand Down
10 changes: 10 additions & 0 deletions commons/common-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,16 @@ It is STRONGLY RECOMMENDED to provide units in one of the following two formats:

### Statistics Object

Statistics usually specify the range of values by providing the `minimum` and `maximum` values,
but can optionally be accompanied by additional statistical values.
Some additional statistical sizes are listed below,
but the object can also be extended with other statistical sizes that are not listed below.
For example, it could list additional coverages such as vegetation cover, land cover, etc.
If statistics are provided in the Item Properties ([example](../examples/extended-item.json)),
it is recommended to list the statistical sizes with a JSON Schema in the Collection Summaries
to better describe the sizes ([example](../examples/collection.json)).
Please note that some statistical sizes such as cloud cover have explicit fields in extensions such as the EO extension.

| Field Name | Type | Description |
| ------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| minimum | number | minimum value of the values in the band. If not present, the minimum value of the given data type or negative infinity can be assumed. |
Expand Down
20 changes: 20 additions & 0 deletions examples/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,26 @@
"view:sun_azimuth": {
"minimum": 135.7,
"maximum": 135.7
},
"statistics": {
"type": "object",
"properties": {
"vegetation": {
"description": "Percentage of pixels that are detected as vegetation, e.g. forests, grasslands, etc.",
"minimum": 0,
"maximum": 100
},
"water": {
"description": "Percentage of pixels that are detected as water, e.g. rivers, oceans and ponds.",
"minimum": 0,
"maximum": 100
},
"urban": {
"description": "Percentage of pixels that detected as urban, e.g. roads and buildings.",
"minimum": 0,
"maximum": 100
}
}
}
},
"links": [
Expand Down
8 changes: 7 additions & 1 deletion examples/extended-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@
],
"gsd": 0.66,
"eo:cloud_cover": 1.2,
"eo:snow_cover": 0,
"statistics": {
"vegetation": 12.57,
"water": 1.23,
"urban": 26.2
},
"proj:code": "EPSG:32659",
"proj:shape": [
5558,
Expand Down Expand Up @@ -201,4 +207,4 @@
"title": "Satellite Ephemeris Metadata"
}
}
}
}

0 comments on commit 8b92674

Please sign in to comment.