⚠️ Our 0.1 release refactored several early-development functions for long-term stability, to update your code see here. ⚠️
Future changes will come with deprecation warnings! 🙂

geoutils.Raster.astype

Contents

geoutils.Raster.astype#

Raster.astype(dtype, convert_nodata=True, inplace=False)[source]#

Convert data type of the raster.

By default, converts the nodata value to the default of the new data type.

Parameters:
Return type:

Optional[TypeVar(RasterType, bound= Raster)]

Returns:

Raster with updated dtype (or None if inplace).