fix bug in gdal -> mintpy corner coordinate convention#1034
Merged
Conversation
yunjunz
approved these changes
Jul 5, 2023
Member
yunjunz
left a comment
There was a problem hiding this comment.
Thank you @sssangha for the careful checking! I introduced this bug in prep_aria in #542. As you said, gdal (and aria, hyp3, and gmtsar by extension) use the upper-left corner of the upper-left pixel as the first coordinates, which is the same as roipac and mintpy, thus, no extra half-pixel shift is needed. I believe you captured all the occurrences in the code. Feel free to squash and merge the PR whenever you are ready please.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of proposed changes
Through the ARIA products workflow, or whenever loading a gdal file in general, an erroneous shift appears to be applied to the accessed geotransform and the derived
x_firstandy_firstfields. Specifically, an extra half pixel shift (to the north and west) is applied when the gdal geotransform object already reports the coordinates of the upper left pixel.I've tracked this bug in a few scripts, but would like advise on where else I should look to track down potential persistent issues.
Reminders