The conversion from picking coordinates to geographic coordinates
(longitude/latitude), reprojection to grid coordinates and finally to
grid indices performs 'round()' in the very last step.
This seems to be responsible for the half pixel offset as replacing that
by 'floor()' generates grid indices which do not show this half pixel
offset.
TODO: It has to be verified in the future, whether this fix is the right
one once the coordinate setup has been revised - now the display and the
picking matchi but the display itself still has a half pixel shift: MSG
grid point 1856, 1856 is not centered on the Nadir (0 deg E, 0 deg N),
but its upper left corner.
Cherry-pick'd from EUMETSAT GitLab.
Original commit description
The conversion from picking coordinates to geographic coordinates (longitude/latitude), reprojection to grid coordinates and finally to grid indices performs 'round()' in the very last step.
This seems to be responsible for the half pixel offset as replacing that by 'floor()' generates grid indices which do not show this half pixel offset.
TODO: It has to be verified in the future, whether this fix is the right one once the coordinate setup has been revised - now the display and the picking matchi but the display itself still has a half pixel shift: MSG grid point 1856, 1856 is not centered on the Nadir (0 deg E, 0 deg N), but its upper left corner.