Bug in GroundSpacingImageFunction at image middle
When calling the
GroundSpacingImageFunction at the image middle index, the results are nan.
I don't get the logic : we want to estimate the spacing at a given index, but the measurements are made at
largest_size - index. Of course, when
index = largest_size/2, the measurements are on the same index => crash.
The delta X and delta Y applied on index should not be too large. This can give quite imprecise results especially for SAR images. I understand that using a
delta_X = 1 pixel may be unstable (because of DEM), but maybe we should do all transforms from sensor to ground at a constant elevation.
Steps to reproduce
I could reproduce the bug with a S1 image that has an even number of pixels.
OTB 7.2 Custom Debian build with native dependencies.