Skip to content

Commit

Permalink
Merge branch 'main' into add-mlm-output
Browse files Browse the repository at this point in the history
  • Loading branch information
fmigneault authored May 13, 2024
2 parents 29032ba + c5fbed3 commit c1baa5d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[Machine Learning Model (MLM)](https://github.com/crim-ca/mlm-extension) output.
- Example STAC `item-model-classes.json` demonstrating the use of `classification:classes` within a `mlm:output`.
- `nodata` to `classification:classes`
- `nodata` to Class Object
- `percentage` to Class Object
- `count` to Class Object
- Regular expression to validate `name` is machine-readable

### Changed

- Allow CommonMark for the `description` fields.
- `classification:classes`: `name` is required rather than `description`
- Class Object: `name` is required rather than `description`

### Fixed

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ For a real world example, see [Landsat 8's Quality raster](https://www.usgs.gov/
| description | string | Description of the class. [CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich text representation. |
| color_hint | string | Suggested color for rendering (Hex RGB code in upper-case without leading #) |
| nodata | boolean | If set to `true` classifies a value as a no-data value, defaults to `false` |
| percentage | number | The percentage of data values that belong to this class in comparison to all data values, in percent (0-100). |
| count | integer | The number of data values that belong to this class. |

Class objects enumerate data values and their corresponding classes.
A cloud mask raster could contain the following four classes:
Expand Down
9 changes: 9 additions & 0 deletions json-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,15 @@
},
"nodata": {
"type": "boolean"
},
"percentage": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"count": {
"type": "integer",
"minimum": 0
}
}
},
Expand Down

0 comments on commit c1baa5d

Please sign in to comment.