diff --git a/planetary-variables/crop-biomass/crop-biomass.md b/planetary-variables/crop-biomass/crop-biomass.md new file mode 100644 index 00000000..e28298da --- /dev/null +++ b/planetary-variables/crop-biomass/crop-biomass.md @@ -0,0 +1,35 @@ +--- +title: Crop Biomass +nav_order: 2 +parent: Planetary Variables +layout: script +permalink: /planetary-variables/crop-biomass/ +scripts: + - [Visualization, script.js] + - [EO Browser, eob.js] + - [Raw Values, raw.js] +--- + +## Evaluate and visualize + +As Crop Biomass is commercial data, brought into Sentinel Hub as Bring Your Own Data, direct EO Browser and Sentinel Playground links are not possible due to the personalized data credentials. + +## General description + +Biomass Proxy is a fusion of microwave and optical satellite imagery, using the advantages of each to accurately estimate relative above-ground crop biomass regardless of cloud cover and at a high spatial resolution (10 m x 10 m). + +It integrates microwave data from the European Space Agency (ESA) Sentinel-1 satellites and optical images from its Sentinel-2 satellites. + +Planetary Variables then fuses the output from these combined data sources in an algorithm designed to provide a reliable measurement of crop biomass over agricultural areas under all circumstances. + +This is a relative measure of biomass, so each pixel value has a value of 0 (low biomass) to 1 (high biomass). + +It should be computed over agricultural fields. + + +## Description of representative images + +Crop Biomass of agriculture fields in Uruguay. + +![Various fields over Uruguay](fig/fig1.png) + diff --git a/planetary-variables/crop-biomass/eob.js b/planetary-variables/crop-biomass/eob.js new file mode 100644 index 00000000..d108a2cc --- /dev/null +++ b/planetary-variables/crop-biomass/eob.js @@ -0,0 +1,42 @@ +//VERSION=3 +function setup() { + return { + input: ["CB", "dataMask"], + output: [ + { id: "default", bands: 4 }, + { id: "index", bands: 1, sampleType: 'FLOAT32' }, + { id: "eobrowserStats", bands: 1, sampleType: 'FLOAT32' }, + { id: "dataMask", bands: 1 } + ] + }; +} + + +const bp_ramp = [ + [0, 0xfff7ea], + [0.100, 0xf3e3c8], + [0.200, 0xdad0a4], + [0.300, 0xbdc082], + [0.400, 0x99b160], + [0.500, 0x6da242], + [0.600, 0x2c952e], + [0.7000, 0x008729], + [0.800, 0x007932], + [0.9000, 0x006640], + [1.000, 0x005444], +]; + +const visualizer = new ColorRampVisualizer(bp_ramp); + +let factor = 1 / 1000; +function evaluatePixel(sample) { + let val = sample.CB * factor; + let imgVals = visualizer.process(val); + return { + default: [...imgVals, sample.dataMask], + index: [val], + eobrowserStats: [val], + dataMask: [sample.dataMask] + }; +} + diff --git a/planetary-variables/crop-biomass/fig/fig1.png b/planetary-variables/crop-biomass/fig/fig1.png new file mode 100644 index 00000000..094b5d9b Binary files /dev/null and b/planetary-variables/crop-biomass/fig/fig1.png differ diff --git a/planetary-variables/crop-biomass/raw.js b/planetary-variables/crop-biomass/raw.js new file mode 100644 index 00000000..cf38ef12 --- /dev/null +++ b/planetary-variables/crop-biomass/raw.js @@ -0,0 +1,13 @@ +//VERSION=3 +function setup() { + return { + input: ["CB"], + output: { bands: 1, sampleType: 'FLOAT32' } + }; +} + +let factor = 1 / 1000; +function evaluatePixel(sample) { + return [sample.CH * factor] +}; + diff --git a/planetary-variables/crop-biomass/script.js b/planetary-variables/crop-biomass/script.js new file mode 100644 index 00000000..fc89627e --- /dev/null +++ b/planetary-variables/crop-biomass/script.js @@ -0,0 +1,32 @@ +//VERSION=3 +function setup() { + return { + input: ["CB", "dataMask"], + output: { bands: 4, sampleTYPE: "AUTO" }, + }; +} + + +const bp_ramp = [ + [0, 0xfff7ea], + [0.100, 0xf3e3c8], + [0.200, 0xdad0a4], + [0.300, 0xbdc082], + [0.400, 0x99b160], + [0.500, 0x6da242], + [0.600, 0x2c952e], + [0.7000, 0x008729], + [0.800, 0x007932], + [0.9000, 0x006640], + [1.000, 0x005444], +]; + +const visualizer = new ColorRampVisualizer(bp_ramp); + +let factor = 1 / 1000; +function evaluatePixel(sample) { + let val = sample.CB * factor; + let imgVals = visualizer.process(val); + return [...imgVals, sample.dataMask] +} +