Hello! I create new collection for get data, but i got empty image. after create band i dont got render error
var requestBody = new
{
input = new
{
bounds = new
{
//bbox = new double[] { 561924.43, 5172145.65, 564217.92, 5174392.08 },
bbox = new double[] { 561924.43,
5172145.65,
564217.92,
5174392.08 },
properties = new
{
crs = "http://www.opengis.net/def/crs/EPSG/0/32633"
}
},
data = new[]
{
new
{
type = "byoc-c613cef5-e0fc-4157-9787-7d2651cd8ae7",
dataFilter = new
{
timeRange = new
{
from = "2024-04-13T00:00:00Z",
to = "2024-04-14T00:00:00Z"
}
}
}
}
},
output = new
{
width = 512,
height = 512,
responses = new[]
{
new
{
identifier = "default",
format = new
{
type = "image/png"
}
}
}
},
evalscript = @"
//VERSION=3
function setup() {
return {
input: ['Red', 'NearIR1', 'dataMask'],
output: { bands: 4 }
}
}
function evaluatePixel(sample) {
let ndvi = (sample.NearIR1 - sample.Red) / (sample.NearIR1 + sample.Red);
return valueInterpolate(ndvi,
[0.0, 0.3, 1.0],
[
[1, 0, 0, sample.dataMask],
[1, 1, 0, sample.dataMask],
[0.1, 0.3, 0, sample.dataMask]
])
}"
};