Skip to content

Commit

Permalink
Update README and Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Jul 8, 2024
1 parent 1601555 commit 2bb1221
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 50 deletions.
19 changes: 14 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
Expand All @@ -8,18 +9,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add link `rel="gcps"` to Ground Control Points document
- All raster fields can now be used in the new bands field in STAC 1.1
- Add link relation type `gcps` for Ground Control Points documents
- `raster:sampling`, `raster:bits_per_sample`, `raster:spatial_resolution`, `raster:scale`, `raster:offset` and `raster:histogram`
can be used in Assets and Item Properties

### Changed

- Some clarifications and fixes in the README and examples [#41](https://github.com/stac-extensions/raster/pull/41)
- `raster:bands` is now using the more general `bands` field from STAC 1.1 common metadata
- All of the fields in the `raster:bands` object have been renamed to have a prefix of `raster:`
- `raster:bands` is now using the more general `bands` construct from STAC common metadata
- The following fields in the Band Object have been moved/renamed:
- `nodata`, `data_type`, `statistics` and `unit` were *not* renamed, but have been moved to STAC common metadata
- `sampling` has been renamed to `raster:sampling`
- `bits_per_sample` has been renamed to `raster:bits_per_sample`
- `spatial_resolution` has been renamed to `raster:spatial_resolution`
- `scale` has been renamed to `raster:scale`
- `offset` has been renamed to `raster:offset`
- `histogram` has been renamed to `raster:histogram`

### Removed

- `raster:bands` - use `bands` in STAC core instead
- `raster:bands` - use `bands` in instead

## [v1.1.0]

Expand Down
46 changes: 1 addition & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
This document explains the Raster Extension to the [SpatioTemporal Asset Catalog](https://github.com/radiantearth/stac-spec) (STAC) specification.

An item can describe assets that are rasters of one or multiple bands with some information common to them all (raster size, projection)
and also specific to each of them (data type, unit, number of bits used, nodata).
and also specific to each of them (number of bits used).
A raster is often strongly linked with the georeferencing transform and coordinate system definition
of all bands (using the [projection extension](https://github.com/radiantearth/stac-spec/tree/master/extensions/projection)).
In many applications, it is interesting to have some metadata about the rasters in the asset (values statistics, value interpretation, transforms).
Expand Down Expand Up @@ -38,59 +38,15 @@ to specify information about the raster projection, especially `proj:shape` to s

| Field Name | Type | Description |
| ------------------ | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| raster:nodata | number\|string | Pixel values used to identify pixels that are nodata in the band either by the pixel value as a number or `nan`, `inf` or `-inf` (all strings). |
| raster:sampling | string | One of `area` or `point`. Indicates whether a pixel value should be assumed to represent a sampling over the region of the pixel or a point sample at the center of the pixel. |
| raster:data_type | string | The data type of the pixels in the band. One of the [data types as described below](#data-types). |
| raster:bits_per_sample | number | The actual number of bits used for this band. Normally only present when the number of bits is non-standard for the `datatype`, such as when a 1 bit TIFF is represented as byte. |
| raster:spatial_resolution | number | Average spatial resolution (in meters) of the pixels in the band. |
| raster:statistics | [Statistics Object](#statistics-object) | Statistics of all the pixels in the band. |
| raster:unit | string | Unit denomination of the pixel value. |
| raster:scale | number | Multiplicator factor of the pixel value to transform into the value (i.e. translate digital number to reflectance). |
| raster:offset | number | Number to be added to the pixel value (after scaling) to transform into the value (i.e. translate digital number to reflectance). |
| raster:histogram | [Histogram Object](#histogram-object) | Histogram distribution information of the pixels values in the band. |

`raster:scale` and `raster:offset` define parameters to compute another value. The following paragraphs describe some use cases.

### Data Types

The data type gives information about the values in the file.
This can be used to indicate the (maximum) range of numerical values expected.
For example `uint8` indicates that the numbers are in a range between 0 and 255,
they can never be smaller or larger. This can help to pick the optimal numerical
data type when reading the files to keep memory consumption low.
Nevertheless, it doesn't necessarily mean that the expected values fill the whole range.
For example, there can be use cases for `uint8` that just use the numbers 0 to 10 for example.
Through other extensions it might be possible to specify an exact value range so
that visualizations can be optimized.
The allowed values for `data_type` are:

- `int8`: 8-bit integer
- `int16`: 16-bit integer
- `int32`: 32-bit integer
- `int64`: 64-bit integer
- `uint8`: unsigned 8-bit integer (common for 8-bit RGB PNG's)
- `uint16`: unsigned 16-bit integer
- `uint32`: unsigned 32-bit integer
- `uint64`: unsigned 64-bit integer
- `float16`: 16-bit float
- `float32`: 32-bit float
- `float64`: 64-big float
- `cint16`: 16-bit complex integer
- `cint32`: 32-bit complex integer
- `cfloat32`: 32-bit complex float
- `cfloat64`: 64-bit complex float
- `other`: Other data type than the ones listed above (e.g. boolean, string, higher precision numbers)

### Statistics Object

| Field Name | Type | Description |
| ------------- | ------ | -------------------------------------------------- |
| mean | number | mean value of all the pixels in the band |
| minimum | number | minimum value of the pixels in the band |
| maximum | number | maximum value of the pixels in the band |
| stddev | number | standard deviation value of the pixels in the band |
| valid_percent | number | percentage of valid (not `nodata`) pixel |

### Use Scale and offset as radiometric calibration parameters

In remote sensing, many imagery raster corresponds to raw data without any radiometric processing.
Expand Down

0 comments on commit 2bb1221

Please sign in to comment.