I need to get the percentage of valid data on the resulting image clip of a polygon por each date. I was suggested to create a layer where I obtain 1 if any band has a value distinct of 0 and then use the FIS to get the statistics so the mean would be equivalent to percentage of valid data. When I do that on an image that I know does not cover the 100% of the polygon I still get 100%. I think that that is happening because the area with no date is masked and all calculations of the FIS are done over the unmasked area. So if that is true it would be much easier to get the masked area cover, How can I do that?

You are right, FIS already ignores pixels without value, so that retrieved statistics is still OK.
There is one trick you can do - if you add “&bins=1” at the end of your request, you will get something along the lines of:

C0

0

date

“2018-08-16”

basicStats

min

1

max

1

mean

1

stDev

0

histogram

bins

0

value

1

count

5916.5625

1

date

“2018-08-11”

basicStats

min

1

max

1

mean

1

stDev

0

histogram

bins

0

value

1

count

10920

“Count” tells you the number of pixels in each category, in this case there is only one category. You will notice that for 16/08 there are only 5.916 px (partly covered) and for 11/08 there are 10.920 (fully covered)

I hope this helps?

The other option is to use WFS and then take scene boundaries and do geometrical calculation yourself, but that might be complicated, especially on border of several scenes…

Hello gmilcinski! Thanks for your quick reply, that information helps, but as the idea es to work without the need of looking at the images, it would be great to get the nodata cover value.