⚠️ 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.copy

Contents

geoutils.Raster.copy#

Raster.copy(new_array=None, cast_nodata=True)[source]#

Copy the raster in-memory.

Parameters:
  • new_array (ndarray[Any, dtype[Union[floating[Any], integer[Any]]]] | None) – New array to use in the copied raster.

  • cast_nodata (bool) – Automatically cast nodata value to the default nodata for the new array type if not compatible. If False, will raise an error when incompatible.

Return type:

TypeVar(RasterType, bound= Raster)

Returns:

Copy of the raster.