geodata.mask.save_raster

geodata.mask.save_raster#

geodata.mask.save_raster(arr: numpy.ndarray, transform: rasterio.Affine, path: str)#

Given an array and an Affine transform, save the raster as tif file to the specified path. https://rasterio.readthedocs.io/en/latest/topics/writing.html

Note: Arguments arr and transform input can be the output for ras.merge.merge and ras.mask.mask.

Parameters:
  • arr (ArrayLike) – An array with values of the raster.

  • transform (rasterio.Affine) – Affine transform information for that layer.

  • path (str) – the path to where the tif file is saved.