-
Notifications
You must be signed in to change notification settings - Fork 301
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 #291 from cpaulik/add-crop-biomass
Add Crop Biomass Evalscripts
- Loading branch information
Showing
5 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
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,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) | ||
|
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 | ||
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] | ||
}; | ||
} | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,13 @@ | ||
//VERSION=3 | ||
function setup() { | ||
return { | ||
input: ["CB"], | ||
output: { bands: 1, sampleType: 'FLOAT32' } | ||
}; | ||
} | ||
|
||
let factor = 1 / 1000; | ||
function evaluatePixel(sample) { | ||
return [sample.CH * factor] | ||
}; | ||
|
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 @@ | ||
//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] | ||
} | ||
|