geoutils.Raster.get_mask

geoutils.Raster.get_mask#

Raster.get_mask()[source]#

Get mask of invalid values from the raster.

If the raster is not loaded, reads only the mask from disk to optimize memory usage.

The mask is always returned as a boolean array, even if there is no mask associated to .data (nomask property of masked arrays).

Return type:

ndarray[Any, dtype[bool_]]

Returns:

The mask of invalid values in the raster.