You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm extracting aligned samples from several rasters with different cell sizes and then standardizing them to one cell size with resample(). Because the rasters are large (hundreds of MB to tens of GB for the virtual rasters) and the standardization is to the smallest cell size, it's necessary to window the area of interest before resampling. I had a bug where the windows weren't necessarily quite large enough, resulting in resample() occasionally producing NAs at area of interest edges.
As part of fixing this, I noticed terra's resample() documentation doesn't state window size requirements for cubic and Lanczos. I'm guessing terra indirectly calls IRasterIO() with resample()'s method argument remapped to GDALRIOResampleAlg. Is this correct? If so, the result would be cubic and cubicspline use a 4x4 window and lanczos a 6x6.
The text was updated successfully, but these errors were encountered:
This uses GDALwarp , but surely RasterIO uses the same underlying algo. I have added the window size to the docs (adding 1, as I think it should be 5x5 and 7x7). Thanks.
I'm extracting aligned samples from several rasters with different cell sizes and then standardizing them to one cell size with
resample()
. Because the rasters are large (hundreds of MB to tens of GB for the virtual rasters) and the standardization is to the smallest cell size, it's necessary to window the area of interest before resampling. I had a bug where the windows weren't necessarily quite large enough, resulting inresample()
occasionally producingNA
s at area of interest edges.As part of fixing this, I noticed terra's
resample()
documentation doesn't state window size requirements for cubic and Lanczos. I'm guessing terra indirectly callsIRasterIO()
withresample()
'smethod
argument remapped toGDALRIOResampleAlg
. Is this correct? If so, the result would becubic
andcubicspline
use a 4x4 window andlanczos
a 6x6.The text was updated successfully, but these errors were encountered: