-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #341 from hemalimajithia/fcm
Added folder with evalscripts for Forest Carbon Monitoring
- Loading branch information
Showing
16 changed files
with
432 additions
and
0 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
planetary-variables/forest-carbon-monitoring/aboveground-carbon-density/eob.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
//VERSION=3 | ||
// To set custom max and min values, set | ||
// defaultVis to false and choose your max and | ||
// min values. The color map will then be scaled | ||
// to those max and min values | ||
const defaultVis = true; | ||
const max = 175; | ||
const min = 0; | ||
|
||
function setup() { | ||
return { | ||
input: ["ACD", "dataMask"], | ||
output: [ | ||
{ id: "default", bands: 4 }, | ||
{ id: "index", bands: 1, sampleType: "INT16" }, | ||
{ id: "eobrowserStats", bands: 1, sampleType: "FLOAT32" }, | ||
{ id: "dataMask", bands: 1 }, | ||
], | ||
}; | ||
} | ||
|
||
function updateMap(max, min) { | ||
const numIntervals = map.length; | ||
const intervalLength = (max - min) / (numIntervals - 1); | ||
for (let i = 0; i < numIntervals; i++) { | ||
map[i][0] = max - intervalLength * i; | ||
} | ||
} | ||
|
||
const map = [ | ||
[175, 0xe5dd26], | ||
[155, 0xced62f], | ||
[140, 0x9ec54a], | ||
[125, 0x63b16e], | ||
[110, 0x38a183], | ||
[95, 0x1b8583], | ||
[80, 0x1e8589], | ||
[65, 0x206378], | ||
[50, 0x2e4c67], | ||
[35, 0x2a3f62], | ||
[20, 0x2d1a4e], | ||
[5, 0x2e164c], | ||
[0, 0x360245], | ||
]; | ||
|
||
const visualizer = new ColorRampVisualizer(map, min, max); | ||
|
||
function evaluatePixel(sample) { | ||
let val = sample.ACD; | ||
let imgVals = visualizer.process(val); | ||
|
||
return { | ||
default: imgVals.concat(sample.dataMask), | ||
index: [val], | ||
eobrowserStats: [val], | ||
dataMask: [sample.dataMask], | ||
}; | ||
} |
Binary file added
BIN
+682 KB
...s/forest-carbon-monitoring/aboveground-carbon-density/fig/abovegroundcarbon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions
36
planetary-variables/forest-carbon-monitoring/aboveground-carbon-density/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: Aboveground Carbon Density, Forest Carbon Monitoring | ||
parent: Forest Carbon Monitoring | ||
grand_parent: Planetary Variables | ||
layout: script | ||
nav_exclude: true | ||
scripts: | ||
- [Visualization, script.js] | ||
- [EO Browser, eob.js] | ||
- [Raw Values, raw.js] | ||
--- | ||
|
||
## Evaluate and visualize | ||
|
||
As Forest Carbon Monitoring is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser links are not possible due to the personalized data credentials. | ||
|
||
## General description | ||
|
||
Aboveground carbon density quantifies the expected density of carbon stored in woody biomass across the | ||
landscape, measured in mass per area (megagrams of carbon per hectare). It is not a direct estimate of the total | ||
carbon in that pixel, as the spatial resolution of each pixel is less than one hectare. To estimate total carbon in a | ||
pixel, users should normalize these values to account for the size of each pixel, or average the density values to 1 | ||
hectare in an equal area projection. | ||
|
||
The data layer has four bands: | ||
|
||
- **Aboveground Carbon Density** quantifies the density of carbon stored in woody vegetation, | ||
primarily trees and shrubs. Grassland, herbaceous, and soil carbon stocks are not quantified. | ||
- **Lower prediction bound (5th percentile)** of the 90% prediction interval for model predictions at each pixel. | ||
- **Upper prediction bound (95th percentile)** of the 90% prediction interval for model predictions at each pixel. | ||
|
||
## Description of representative images | ||
|
||
Aboveground Carbon Density in 2024-09-21 near Novo Progresso, Brazil.. | ||
|
||
 |
11 changes: 11 additions & 0 deletions
11
planetary-variables/forest-carbon-monitoring/aboveground-carbon-density/raw.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//VERSION=3 | ||
function setup() { | ||
return { | ||
input: ["ACD"], | ||
output: { bands: 1, sampleType: "INT16" }, | ||
}; | ||
} | ||
|
||
function evaluatePixel(sample) { | ||
return [sample.ACD]; | ||
} |
44 changes: 44 additions & 0 deletions
44
planetary-variables/forest-carbon-monitoring/aboveground-carbon-density/script.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
//VERSION=3 | ||
const defaultVis = true; | ||
const max = 175; | ||
const min = 0; | ||
|
||
function setup() { | ||
return { | ||
input: ["ACD", "dataMask"], | ||
output: { bands: 4, sampleType: "AUTO" }, | ||
}; | ||
} | ||
|
||
function updateMap(max, min) { | ||
const numIntervals = map.length; | ||
const intervalLength = (max - min) / (numIntervals - 1); | ||
for (let i = 0; i < numIntervals; i++) { | ||
map[i][0] = max - intervalLength * i; | ||
} | ||
} | ||
|
||
const map = [ | ||
[175, 0xe5dd26], | ||
[155, 0xced62f], | ||
[140, 0x9ec54a], | ||
[125, 0x63b16e], | ||
[110, 0x38a183], | ||
[95, 0x1b8583], | ||
[80, 0x1e8589], | ||
[65, 0x206378], | ||
[50, 0x2e4c67], | ||
[35, 0x2a3f62], | ||
[20, 0x2d1a4e], | ||
[5, 0x2e164c], | ||
[0, 0x360245], | ||
]; | ||
|
||
const visualizer = new ColorRampVisualizer(map, min, max); | ||
|
||
function evaluatePixel(sample) { | ||
let val = sample.ACD; | ||
let imgVals = visualizer.process(val); | ||
|
||
return [...imgVals, sample.dataMask]; | ||
} |
56 changes: 56 additions & 0 deletions
56
planetary-variables/forest-carbon-monitoring/canopy-cover/eob.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
//VERSION=3 | ||
// To set custom max and min values, set | ||
// defaultVis to false and choose your max and | ||
// min values. The color map will then be scaled | ||
// to those max and min values | ||
const defaultVis = true; | ||
const max = 100; | ||
const min = 0; | ||
|
||
function setup() { | ||
return { | ||
input: ["CC", "dataMask"], | ||
output: [ | ||
{ id: "default", bands: 4 }, | ||
{ id: "index", bands: 1, sampleType: "UINT8" }, | ||
{ id: "eobrowserStats", bands: 1, sampleType: "FLOAT32" }, | ||
{ id: "dataMask", bands: 1 }, | ||
], | ||
}; | ||
} | ||
|
||
function updateMap(max, min) { | ||
const numIntervals = map.length; | ||
const intervalLength = (max - min) / (numIntervals - 1); | ||
for (let i = 0; i < numIntervals; i++) { | ||
map[i][0] = max - intervalLength * i; | ||
} | ||
} | ||
|
||
const map = [ | ||
[100, 0x183d19], | ||
[90, 0x124f24], | ||
[80, 0x0e6327], | ||
[70, 0x246d29], | ||
[60, 0x498418], | ||
[50, 0x669516], | ||
[40, 0x859e25], | ||
[30, 0xa4ab38], | ||
[20, 0xd3c058], | ||
[10, 0xddd17c], | ||
[0, 0xf0f5d5], | ||
]; | ||
|
||
const visualizer = new ColorRampVisualizer(map, min, max); | ||
|
||
function evaluatePixel(sample) { | ||
let val = sample.CC; | ||
let imgVals = visualizer.process(val); | ||
|
||
return { | ||
default: imgVals.concat(sample.dataMask), | ||
index: [val], | ||
eobrowserStats: [val], | ||
dataMask: [sample.dataMask], | ||
}; | ||
} |
Binary file added
BIN
+605 KB
planetary-variables/forest-carbon-monitoring/canopy-cover/fig/canopycover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions
33
planetary-variables/forest-carbon-monitoring/canopy-cover/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: Canopy Cover, Forest Carbon Monitoring | ||
parent: Forest Carbon Monitoring | ||
grand_parent: Planetary Variables | ||
layout: script | ||
nav_exclude: true | ||
scripts: | ||
- [Visualization, script.js] | ||
- [EO Browser, eob.js] | ||
- [Raw Values, raw.js] | ||
--- | ||
|
||
## Evaluate and visualize | ||
|
||
As Forest Carbon Monitoring is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser links are not possible due to the personalized data credentials. | ||
|
||
## General description | ||
|
||
Canopy cover quantifies the percentage of area occupied by trees within a | ||
pixel, where a tree is defined as vegetation 5 meters or taller. This metric will be most sensitive to tree clearing | ||
events like timber harvest or deforestation, but is also sensitive to seasonal leaf-on variation and to drought. | ||
|
||
The data layer has four bands: | ||
|
||
- **Canopy Cover** quantifies the horizontal area occupied by tree canopies that are > 5m tall. | ||
- **Lower prediction bound (5th percentile)** of the 90% prediction interval for model predictions at each pixel. | ||
- **Upper prediction bound (95th percentile)** of the 90% prediction interval for model predictions at each pixel. | ||
|
||
## Description of representative images | ||
|
||
Canopy Cover in 2024-09-21 near Novo Progresso, Brazil. | ||
|
||
 |
11 changes: 11 additions & 0 deletions
11
planetary-variables/forest-carbon-monitoring/canopy-cover/raw.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//VERSION=3 | ||
function setup() { | ||
return { | ||
input: ["CC"], | ||
output: { bands: 1, sampleType: "UINT8" }, | ||
}; | ||
} | ||
|
||
function evaluatePixel(sample) { | ||
return [sample.CC] | ||
} |
42 changes: 42 additions & 0 deletions
42
planetary-variables/forest-carbon-monitoring/canopy-cover/script.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
//VERSION=3 | ||
const defaultVis = true; | ||
const max = 100; | ||
const min = 0; | ||
|
||
function setup() { | ||
return { | ||
input: ["CC", "dataMask"], | ||
output: { bands: 4, sampleTYPE: "AUTO" }, | ||
}; | ||
} | ||
|
||
function updateMap(max, min) { | ||
const numIntervals = map.length; | ||
const intervalLength = (max - min) / (numIntervals - 1); | ||
for (let i = 0; i < numIntervals; i++) { | ||
map[i][0] = max - intervalLength * i; | ||
} | ||
} | ||
|
||
const map = [ | ||
[100, 0x183d19], | ||
[90, 0x124f24], | ||
[80, 0x0e6327], | ||
[70, 0x246d29], | ||
[60, 0x498418], | ||
[50, 0x669516], | ||
[40, 0x859e25], | ||
[30, 0xa4ab38], | ||
[20, 0xd3c058], | ||
[10, 0xddd17c], | ||
[0, 0xf0f5d5], | ||
]; | ||
|
||
const visualizer = new ColorRampVisualizer(map, min, max); | ||
|
||
function evaluatePixel(sample) { | ||
let val = sample.CC; | ||
let imgVals = visualizer.process(val); | ||
|
||
return [...imgVals, sample.dataMask]; | ||
} |
49 changes: 49 additions & 0 deletions
49
planetary-variables/forest-carbon-monitoring/canopy-height/eob.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
//VERSION=3 | ||
// To set custom max and min values, set | ||
// defaultVis to false and choose your max and | ||
// min values. The color map will then be scaled | ||
// to those max and min values | ||
const defaultVis = true; | ||
const max = 30; | ||
const min = 0; | ||
|
||
function setup() { | ||
return { | ||
input: ["CH", "dataMask"], | ||
output: [ | ||
{ id: "default", bands: 4 }, | ||
{ id: "index", bands: 1, sampleType: "UINT8" }, | ||
{ id: "eobrowserStats", bands: 1, sampleType: "FLOAT32" }, | ||
{ id: "dataMask", bands: 1 }, | ||
], | ||
}; | ||
} | ||
|
||
function updateMap(max, min) { | ||
const numIntervals = map.length; | ||
const intervalLength = (max - min) / (numIntervals - 1); | ||
for (let i = 0; i < numIntervals; i++) { | ||
map[i][0] = max - intervalLength * i; | ||
} | ||
} | ||
|
||
const map = [ | ||
[30, 0x345e03], | ||
[20, 0x6da20c], | ||
[10, 0xbace6e], | ||
[0, 0xf0f5d5], | ||
]; | ||
|
||
const visualizer = new ColorRampVisualizer(map, min, max); | ||
|
||
function evaluatePixel(sample) { | ||
let val = sample.CH; | ||
let imgVals = visualizer.process(val); | ||
|
||
return { | ||
default: imgVals.concat(sample.dataMask), | ||
index: [val], | ||
eobrowserStats: [val], | ||
dataMask: [sample.dataMask], | ||
}; | ||
} |
Binary file added
BIN
+738 KB
planetary-variables/forest-carbon-monitoring/canopy-height/fig/canopyheight.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions
32
planetary-variables/forest-carbon-monitoring/canopy-height/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: Canopy Height, Forest Carbon Monitoring | ||
parent: Forest Carbon Monitoring | ||
grand_parent: Planetary Variables | ||
layout: script | ||
nav_exclude: true | ||
scripts: | ||
- [Visualization, script.js] | ||
- [EO Browser, eob.js] | ||
- [Raw Values, raw.js] | ||
--- | ||
|
||
## Evaluate and visualize | ||
|
||
As Forest Carbon Monitoring is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser links are not possible due to the personalized data credentials. | ||
|
||
## General description | ||
|
||
Canopy height quantifies the average stand height of trees within each pixel. Because this is a spatial average | ||
over a moderate resolution, the modeled height values are shorter than the tallest individual tree within a pixel. | ||
|
||
The data layer has four bands: | ||
|
||
- **Canopy Height** quantifies the average height of all vegetation in that pixel. | ||
- **Lower prediction bound (5th percentile)** of the 90% prediction interval for model predictions at each pixel. | ||
- **Upper prediction bound (95th percentile)** of the 90% prediction interval for model predictions at each pixel. | ||
|
||
## Description of representative images | ||
|
||
Canopy Height in 2024-09-21 near Novo Progresso, Brazil. | ||
|
||
 |
11 changes: 11 additions & 0 deletions
11
planetary-variables/forest-carbon-monitoring/canopy-height/raw.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//VERSION=3 | ||
function setup() { | ||
return { | ||
input: ["CH"], | ||
output: { bands: 1, sampleType: "UINT8" }, | ||
}; | ||
} | ||
|
||
function evaluatePixel(sample) { | ||
return [sample.CH] | ||
} |
Oops, something went wrong.