I recently created a collection of PlanetScope imagery using the Planet Subscriptions API and applied a 50% cloud filter. I’m now using that collection in the Statistical API and would like to only consider imagery with 20% cloud cover (i.e., 80% clear pixels). Let me know if you have any tips for filtering these data.
Thank you!
Page 1 / 1
Hey @m-lindman, to calculate the cloud cover percentage, you can use the Statistical API. In your evalscript, you can return use the Useable Data Mask (UDM) clear band to return a 1 for clear and a 0 for not clear. When used with the Statistical API, this value will be averaged over the input area of interest, returning effectively the percentage of pixels that are clear. For example, if 80% of pixels are clear (UDM clear band with a value of 1), then the mean clear value returned by the Statistical API would be 0.8.
Below is a sample evalscript that you could use to get the mean clear value:
The resulting mean cloud can be used to filter out scenes below your desired threshold:
If you are using EO Browser, you can test out what this looks like using the Statistic tool and this PlanetScope evalscript (note: switch to EO Browser tab and copy/paste). When you use this evalscript and generate statistics for an AOI, you will be able to filter the chart with the cloud filter: