Skip to content

Commit

Permalink
Merge pull request #3 from stac-extensions/common-enum
Browse files Browse the repository at this point in the history
Validate common_name as enum
  • Loading branch information
m-mohr authored Mar 30, 2021
2 parents d72f884 + 2d7a40b commit fca9f47
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- `common_name` is validated as an enum (no other values allowed)

[Unreleased]: <https://github.com/stac-extensions/eo/compare/v1.0.0...HEAD>
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ In some cases the full transmission profile is needed, such as when harmonizing

#### Common Band Names

The band's common_name is the name that is commonly used to refer to that band's spectral
properties. The table below shows the common name based on the average band range for the band
The band's `common_name` is the name that is commonly used to refer to that band's spectral
properties. The table below shows the allowed common names based on the average band range for the band
numbers of several popular instruments.

| Common Name | Band Range (μm) | Landsat 5/7 | Landsat 8 | Sentinel 2 | MODIS | NAIP |
Expand Down
19 changes: 18 additions & 1 deletion json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,24 @@
},
"common_name": {
"title": "Common Name of the band",
"type": "string"
"type": "string",
"enum": [
"coastal",
"blue",
"green",
"red",
"yellow",
"pan",
"nir",
"nir08",
"nir09",
"cirrus",
"swir16",
"swir22",
"lwir",
"lwir11",
"lwir12"
]
},
"center_wavelength": {
"title": "Center Wavelength",
Expand Down

0 comments on commit fca9f47

Please sign in to comment.