Cloud masks and probabilites computed using s2cloudless are available at a fixed resolution of 160m per pixel. Sentinel Hub implements the 10-band version. These are meant as convenience bands with the purpose of speeding up processing. Cloud masks are generated in a very slightly different way than the implementation above but for most applications this should not matter.
They are available as Sentinel-2 bands named
CLP (cloud probabilities) and
CLM (cloud masks) and have the following return values:
- CLM: 0 (no clouds), 1 (clouds), 255 (no data)
- CLP: 0–255 (divide by 255 to get to the [0-1] range)
CLM no data value of 255 is also returned if a tile has missing
CLP bands, for example due to errors. This ensures that values of
1 can be used with confidence for each pixel.
CLP will in such a case return
0. Consider using
CLP in your evalscript if this is an issue.
CLP is generated per tile using the s2cloudless product at 160m resolution. Due to the 60m Sentinel-2 bands this means that a perfect match between
CLP and s2cloudless is not possible for all requests. In case you require identical data, there are a few constraints which must be met. These are:
- requesting data in the native UTM zone of each tile
- nearest neighbor interpolation
- 160m resolution or slightly less (more zoomed out)
- the request origin is a multiple of 480m away from the tile origin (the top left point of the source tile)
- requesting a single tile only; no mosaicking (mosaicking violates the previous point)
If any of these are not met you can expect slight differences. For exact values the s2cloudless product may be used without these constraints, at a cost of requiring more processing time and processing units; for most applications, however, we do not expect this to be necessary.