I’m getting a white image when using units as digital numbers “DN”
How to get correct image when using units: “DN”?
I want to use units: “DN” because I want to get all raw bands GeoTIFF here is the evalscript:
//VERSION=3
function setup() {
return {
input: [{
bands: ["B01", "B02", "B03", "B04", "B05", "B06", "B07", "B08", "B8A", "B09", "B11", "B12"],
units: "DN"
}],
output: [
{
id: "True_Color",
bands: 3,
sampleType: "AUTO" // default - scales the output values from input values [0,1] to [0,255].
}]
}
}
function evaluatePixel(sample) {
return {
// output band values are scaled from [0,1] to [0,255]. Multiply by 2.5 to increase brightness
True_Color: [2.5*sample.B04, 2.5*sample.B03, 2.5*sample.B02]
}
}