get_new_shape(ds: ~typing.Union[str, tuple,], resolution: ~typing.Union[tuple, list, float], size: ~typing.Union[tuple, list], window: = None) -> (<class 'int'>, <class 'int'>, <class 'bool'>)[source]#

Get the new shape (height, width) of a resampled raster.

  • ds (PATH_ARR_DS) – Path to the raster, its dataset, its xarray or a tuple containing its array and metadata

  • resolution (Union[tuple, list, float]) – Resolution of the wanted band, in dataset resolution unit (X, Y)

  • size (Union[tuple, list]) – Size of the array (width, height). Not used if resolution is provided.

  • window (Window) – Window to be read


Height, width, do resampling

Return type:

(int, int, bool)