Skip to content

Fix half pixel offset for point probing #319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2021

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Jul 29, 2021

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.

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.
@djhoese djhoese added bug Something isn't working component: workspace labels Jul 29, 2021
@djhoese djhoese merged commit 0b437b0 into ssec:master Jul 29, 2021
@djhoese djhoese deleted the bugfix-half-pixel-probe branch July 29, 2021 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component: workspace
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant