We use WCS requests to download images using the GEOMETRY parameter to cut out invalid pixels from our AOIs and TRANSPARENT=true. By doing this, we get images with an Alpha channel with values 0 outside the GEOMETRY and 1 inside it.
Don’t know exactly when it began, but trying to request images today, we got black backgrounds outside the GEOMETRY and after analyzing the images, they had no Alpha channel, this occurred for every layer we tried (TRUE_COLOR, NDVI [GREYSCALE], NDVI, EVI, etc).
Nothing has changed in our layers configuration nor ir the requests we made, except for date, but even trying with old images we already downloaded and were ok this issue ocurred.
sorry but how we used one of the pre-configured layer schemas, we don’t really know much about the evalscripts, so thanks for changing it in my account!
@gmilcinski sorry but I just realized that using any of the Base Products is keeping the black borders, in the case only EVI has been corrected, the only way to solve this is by editing the scritps for the rest of the layers I use with the data mask implementation?
The end-point you are using is deprecated for more than 3 years. It’s still working, as we are trying hard to remain backward compatible, but we would appreciate if you could update.
There should be no changes on your side.
I’m also experiencing the same issue. I’m generating evalscripts on the fly to adjust the color ramp output - must the evalscript also be V3 compatible, or is there another way I can fix my evalscripts?
I managed to sort out the issue. My mistake was in the visualized output value returned - the visualiser value and the dataMask had to be joined in the same array. The geometry clipping is now working as expected.
//VERSION=3
function setup() {
return {
input: [{
bands: ["B04", "B08", "dataMask"]
}],
output: {
bands: 4
}
}
}
function evaluatePixel(sample) {
let val = (sample.B08 - sample.B04) / (sample.B08 + sample.B04);
var colorRamp = [
[-0.15, [0.1, 0.3, 1]],
[0, [0.576, 0.667, 0.835]],
[0.035, [1, 1, 1]],
[0.1, [0.843, 0.098, 0.11]],
[0.2, [0.8, 0.25, 0.1]],
[0.4, [1, 1, 0.686]],
[0.6, [0.4, 0.8, 0.2]],
[0.8, [0.1, 0.5, 0.1]],
[1, [0, 0.4, 0.2]]
];
let viz = new ColorRampVisualizer(colorRamp);
let vizval = viz.process(val);
vizval.push(sample.dataMask);
return vizval;
}