Describe the bug
ComplexSource in read_vrt parses <ResampleAlg> (xrspatial/geotiff/_vrt.py:356-360) and stores it on the source record. The resample step at xrspatial/geotiff/_vrt.py:798-804 always calls _resample_nearest() when SrcRect and DstRect differ, regardless of the parsed algorithm.
A VRT requesting Bilinear, Cubic, Average, or Mode returns nearest-neighbour pixels with no warning. Downstream analytics see numerically different output from GDAL with no indication of why.
Expected behavior
At minimum, raise NotImplementedError (or warn) when resample_alg is set to anything other than Nearest / NEAR / None. The error message should name the requested algorithm and point at this issue.
If implementation scope allows, add bilinear and cubic resampling.
References
xrspatial/geotiff/_vrt.py:356 (parse site)
xrspatial/geotiff/_vrt.py:798 (resample call site)
Describe the bug
ComplexSourceinread_vrtparses<ResampleAlg>(xrspatial/geotiff/_vrt.py:356-360) and stores it on the source record. The resample step atxrspatial/geotiff/_vrt.py:798-804always calls_resample_nearest()whenSrcRectandDstRectdiffer, regardless of the parsed algorithm.A VRT requesting
Bilinear,Cubic,Average, orModereturns nearest-neighbour pixels with no warning. Downstream analytics see numerically different output from GDAL with no indication of why.Expected behavior
At minimum, raise
NotImplementedError(or warn) whenresample_algis set to anything other thanNearest/NEAR/None. The error message should name the requested algorithm and point at this issue.If implementation scope allows, add bilinear and cubic resampling.
References
xrspatial/geotiff/_vrt.py:356(parse site)xrspatial/geotiff/_vrt.py:798(resample call site)