GDALWarpOperation::ComputeSourceWindow() sometimes returns whole image window whereas it should return empty
|Reported by:||Even Rouault||Owned by:||Even Rouault|
|Severity:||normal||Keywords:||warp rpc resampling|
In some warp circumstances, for example with RPC, when ComputeSourceWindow?() is called on a target area where the RPC is no longer valid, the computed source window can be very off the [0,0]x[width,height] valid area. For example, only negative big X values. However, when using a resampling kernel such as cubic, this can cause a very big value of nResWinSize radius to be computed, for example much larger than the raster dimensions. So the computed window taking into account this nResWinSize radius covers the whole raster, whereas the "raw" window not taking into account the radius of the resampling kernel is completely off. Which can lead to enormous processing time due to big I/O being done for nothing.