Skip to content
  • Nicolai Kellerer's avatar
    Fix half pixel offset for point probing · dda27536
    Nicolai Kellerer authored and David Hoese's avatar David Hoese committed
    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.
    dda27536