Can you post an example of the FIS request you do? You can mask instance ID.
The layer code:
let viz = new Identity();
function evaluatePixel(samples) {
let val = (samples[0].B02==0)?0:1;
return viz.process(val);
}
function setup(ds) {
setInputComponents([ds.B02]);
setOutputComponentCount(1);
}
the fis request
http://services.sentinel-hub.com/ogc/fis/m1h1dd3n1nst4nce?LAYER=COVERPERCENTAGE&CRS=EPSG:4326&TIME=2018-08-01/2018-08-17&RESOLUTION=10m&GEOMETRY=POLYGON((-32.28555%20-64.23295,-32.28555%20-64.22177,-32.29489%20-64.22177,-32.29489%20-64.23295,-32.28555%20-64.23295))
Fis output:
{“C0”:{“date”:“2018-08-16”,“basicStats”:{“min”:1.0,“max”:1.0,“mean”:1.0,“stDev”:0.0}},{“date”:“2018-08-11”,“basicStats”:{“min”:1.0,“max”:1.0,“mean”:1.0,“stDev”:0.0}},{“date”:“2018-08-08”,“basicStats”:{“min”:1.0,“max”:1.0,“mean”:1.0,“stDev”:0.0}},{“date”:“2018-08-01”,“basicStats”:{“min”:1.0,“max”:1.0,“mean”:1.0,“stDev”:0.0}}]}
Regards!
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! 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.
Thanks!!