Skip to content
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

fix bug in gdal -> mintpy corner coordinate convention #1034

Merged
merged 3 commits into from
Jul 5, 2023
Merged

Conversation

sssangha
Copy link
Contributor

@sssangha sssangha commented Jun 30, 2023

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_first and y_first fields. 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

  • Pass Pre-commit check (green)
  • Pass Codacy code review (green)
  • Pass Circle CI test (green)
  • Make sure that your code follows our style. Use the other functions/files as a basis.
  • If modifying functionality, describe changes to function behavior and arguments in a comment below the function declaration.

@sssangha sssangha requested a review from yunjunz June 30, 2023 08:01
Copy link
Member

@yunjunz yunjunz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@yunjunz yunjunz changed the title Track and fix bug in gdal corner convention fix bug in gdal -> mintpy corner coordinate convention Jul 5, 2023
@sssangha sssangha merged commit 2115549 into main Jul 5, 2023
@yunjunz yunjunz deleted the sss_cornerconv branch July 6, 2023 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants