1
0
Fork 0
mirror of https://github.com/sbrl/terrain50-cli.git synced 2024-11-26 07:33:00 +00:00

identify: display value range

This commit is contained in:
Starbeamrainbowlabs 2021-01-26 18:25:31 +00:00
parent 8639cf84f6
commit 6f3242e197
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 5 additions and 1 deletions

View file

@ -14,6 +14,10 @@ npm install --save terrain50-cli
----- -----
## v1.9 (unreleased)
- `identify`: Add value range to output
## v1.8 ## v1.8
- Add global `--log-level` argument - Add global `--log-level` argument
- `image`: Add `--boundaries` argument - `image`: Add `--boundaries` argument

View file

@ -14,10 +14,10 @@ function summarise_obj(obj) {
if(typeof obj.meta.NODATA_value !== "undefined") if(typeof obj.meta.NODATA_value !== "undefined")
console.log(`NODATA value: ${obj.meta.NODATA_value}`); console.log(`NODATA value: ${obj.meta.NODATA_value}`);
console.log(`Metadata keys: ${Object.keys(obj.meta).join(", ")}`); console.log(`Metadata keys: ${Object.keys(obj.meta).join(", ")}`);
console.log(`Value range (excluding NODATA values): ${obj.min_value} - ${obj.max_value}`);
} }
export default async function(settings) { export default async function(settings) {
let iterator = null;
switch(settings.cli.mode) { switch(settings.cli.mode) {
case "single": case "single":
let obj = Terrain50.Parse( let obj = Terrain50.Parse(