- stackstac.reproject_array(arr, spec, interpolation='nearest', fill_value=nan)#
This interpolates using
xarray.DataArray.interp, which uses
scipy.interpolate.interpninternally (no GDAL). It is somewhat dask-friendly, in that it at least doesn’t trigger immediate computation on the array, but it’s sub-optimal: the
ydimensions are just merged into a single chunk, then interpolated.
Since this both eliminates spatial parallelism, and potentially requires significant amounts of memory,
reproject_arrayis only recommended on arrays with a relatively small number spatial chunks.
This method is very slow on large arrays due to inefficiencies in generating the dask graphs. Additionally, all spatial chunking is lost.
Literal[‘linear’, ‘nearest’]) – Interpolation method:
None]) – Fill output pixels that fall outside the bounds of
arrwith this value (default NaN).
The clipped and reprojected array.
- Return type: