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, you must ensure to:
- Request a bounding box, which is aligned with the grid in which satellite data is distributed.
- Request the same resolution as in the original data (note that different bands of the same satellite can have different resolutions). To check the resolutions for each band, you can check our data documentation.
Comments
Article is closed for comments.