geoutils.Raster.copy#
- Raster.copy(new_array=None, cast_nodata=True, deep=True)[source]#
Copy the raster in-memory.
- Parameters:
new_array (
ndarray[tuple[Any,...],dtype[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.deep (
bool) – If True, will return a deep copy of the raster.
- Return type:
TypeVar(RasterType, bound= RasterBase)- Returns:
Copy of the raster.