raster_tools.Raster.set_null_value#
- Raster.set_null_value(value)[source]#
Sets or replaces the null value for the raster.
If there was previously no null value for the raster, one is set. If there was already a null value, then it is replaced. The raster dtype will be promoted, if needed, to accommodate value. If value is None, the null value is cleared. The raster data is not changed in this case.
- Parameters
value (scalar or None) – The new null value for the raster. If None, the resulting raster will have no null value, i.e. the null value is cleared.
- Returns
The new resulting Raster.
- Return type