REFLECTANCE is physical property of surfaces, equivalent to the ratio of reflected light to incident light (source), with typical values ranging from 0-1. It requires a 32-bit TIFF floating format. To get original reflectance data from the satellite, use the advanced evalscript and set sampleType
to FLOAT32
. See the evalscript example for a single grayscale band below:
//VERSION=3
function setup() {
return {
input: [{
bands: ["B04"]
}],
output: {
bands: 1,
sampleType: "FLOAT32"
}
};
}
function evaluatePixel(samples){
return [samples.B04]
}
To get the exact original reflectance values, the user must also make sure that the pixels outputted by Sentinel Hub are at exactly the same position and exactly the same size as in the original data. To do so, the users must ensure to:
We suggest to also check the FAQ about how the values are calculated and returned in Sentinel Hub.