sertit.rasters_rio.get_new_shape¶
- get_new_shape(dst: Union[str, tuple, rasterio.io.DatasetReader], resolution: Union[tuple, list, float], size: Union[tuple, list]) -> (<class 'int'>, <class 'int'>)[source]¶
Get the new shape (height, width) of a resampled raster.
- Parameters
dst (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.
- Returns
Height, width
- Return type