Skip to content

Commit

Permalink
Merge pull request #38 from stac-extensions/gcps
Browse files Browse the repository at this point in the history
GCPs document link
  • Loading branch information
emmanuelmathot authored Sep 28, 2023
2 parents db06249 + d73808d commit 709c8be
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ 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/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Add link `rel="gcps"` to Ground Control Points document

## [v1.1.0]

### Added
Expand All @@ -14,5 +20,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Initial release

[Unreleased]: <https://github.com/stac-extensions/raster/compare/v1.1.0...HEAD>
[v1.1.0]: <https://github.com/stac-extensions/tree/v1.1.0>
[v1.0.0]: <https://github.com/stac-extensions/tree/v1.0.0>
56 changes: 48 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ When specifying a raster band object at asset level, it is recommended to use
the [projection](https://github.com/radiantearth/stac-spec/tree/master/extensions/projection) extension
to specify information about the raster projection, especially `proj:shape` to specify the height and width of the raster.

| Field Name | Type | Description |
| ------------------ | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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). |
| 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. |
| data_type | string | The data type of the pixels in the band. One of the [data types as described below](#data-types). |
| Field Name | Type | Description |
| ------------------ | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 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). |
| 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. |
| data_type | string | The data type of the pixels in the band. One of the [data types as described below](#data-types). |
| 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. |
| spatial_resolution | number | Average spatial resolution (in meters) of the pixels in the band. |
| spatial_resolution | number | Average spatial resolution (in meters) of the pixels in the band. |
| statistics | [Statistics Object](#statistics-object) | Statistics of all the pixels in the band. |
| unit | string | Unit denomination of the pixel value. |
| scale | number | Multiplicator factor of the pixel value to transform into the value (i.e. translate digital number to reflectance). |
| offset | number | Number to be added to the pixel value (after scaling) to transform into the value (i.e. translate digital number to reflectance). |
| scale | number | Multiplicator factor of the pixel value to transform into the value (i.e. translate digital number to reflectance). |
| offset | number | Number to be added to the pixel value (after scaling) to transform into the value (i.e. translate digital number to reflectance). |
| histogram | [Histogram Object](#histogram-object) | Histogram distribution information of the pixels values in the band. |

`scale` and `offset` define parameters to compute another value. The following paragraphs describe some use cases.
Expand Down Expand Up @@ -194,3 +194,43 @@ gdalinfo -json -hist PT01S00_842547E119_8697242018100100000000MS00_GG001002003/P

produces this [file](gdalinfo.json) in wich there are `histogram` fields for each band.
The [planet example](examples/item-planet.json) includes them.

## Relation types

The following types should be used as applicable `rel` types in the
[Link Object](https://github.com/radiantearth/stac-spec/tree/master/item-spec/item-spec.md#link-object).

| Type | Description |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| gcps | This link points to a [document](https://gdal.org/drivers/raster/vrt.html#vrtdataset) providing with a list of Ground Control Points for the dataset, mapping between pixel/line coordinates and georeferenced coordinates |

## Contributing

All contributions are subject to the
[STAC Specification Code of Conduct](https://github.com/radiantearth/stac-spec/blob/master/CODE_OF_CONDUCT.md).
For contributions, please follow the
[STAC specification contributing guide](https://github.com/radiantearth/stac-spec/blob/master/CONTRIBUTING.md) Instructions
for running tests are copied here for convenience.

### Running tests

The same checks that run as checks on PR's are part of the repository and can be run locally to verify that changes are valid.
To run tests locally, you'll need `npm`, which is a standard part of any [node.js installation](https://nodejs.org/en/download/).

First you'll need to install everything with npm once. Just navigate to the root of this repository and on
your command line run:
```bash
npm install
```

Then to check markdown formatting and test the examples against the JSON schema, you can run:
```bash
npm test
```

This will spit out the same texts that you see online, and you can then go and fix your markdown or examples.

If the tests reveal formatting problems with the examples, you can fix them with:
```bash
npm run format-examples
```

0 comments on commit 709c8be

Please sign in to comment.