Majamask : a new standalone raster mask tool
You can now produce a simplified rastermask from both CLM and MG2 MAJA masks using a standalone, ‘pip’ installable, Python tool call majamask available here.
The MAJA L2A products contain cloud (CLM) and geophysical (MG2) mask files. The mask layers are bitmasks, not to be confused with classified layers. Each pixel of a bitmask is a 8-bit unsigned integer which could be considered as a vector of 8 booleans (either 0 or 1). Each bit defaults to 0, unless the pixel matches a given mask category and changes to 1.
To make it easier to use and understand such bitmasks, we now provide users with a standalone Python tool call majamask that produces a single simplified rastermask from both CLM and MG2 masks. This rastermask can be used as a single raster layer in eg. QGIS, that contains the following categories :
Pixel value | Feature | Bit considered in input masks |
---|---|---|
1 | Cirrus | CLM bit 7 |
2 | All clouds except cirrus | CLM bit 1 |
3 | Cloud shadows | MG2 bit 3 |
4 | Snow | MG2 bit 2 |
5 | Water | MG2 bit 0 |
6 | Topological shadows | MG2 bit 4 |
7 | Hidden areas due to terrain | MG2 bit 5 |
8 | Tangent or low sun | MG2 bit 6 or 7 |
0 | Valid reflectance | None of the above |
majamask can be installed with Pip and will come along Startmaja starting from MAJA 4.8.