-
Notifications
You must be signed in to change notification settings - Fork 259
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
UTM support for view --show-gps
+ dual-coord input for lalo2yx/yx2lalo()
#1153
Conversation
Also related to discussion #1010 |
Hey @yunjunz, I would appreciate your thoughts on this whenever you have time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @forrestfwilliams for the PR! After some minor changes mentioned below, testing the GPS plotting based on the Ridgecrest example dataset via view.py worked for me.
As for the input arg changes for lalo2yx()
, either the "single coordinate type" or the "pair style" is fine with me. Actually, the pair style looks cleaner. Could you do a similar change to yx2lalo()
as well, for consistency?
Co-authored-by: Zhang Yunjun <yunjunz@outlook.com>
Thanks for the review @yunjunz! I've made the suggested changes, modified |
Not sure why the pre-commit check is failing. |
Have you set up the pre-commit for your MintPy local repo, following the instructions here? All the checks and/or modifications will be done automatically when you do the git commit. |
+ open(): ensure empty UTM_ZONE attribute is removed in the metadata dict + _clean_coord(): add more integer types for completeness + geo2radar(): attemps to convert lat/lon to UTM coordinates, instead of the opposite.
view
GPS related optionsview --show-gps
+ pair-wise input for lalo2yx/yx2lalo()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks all good to me now. Thank you @forrestfwilliams!
Although lalo2yx()
and yx2lalo()
have breaking changes, they are usually not heavily used by most developers I believe, as geo2radar()
and radar2geo()
are more generic and convenient, I think there will be only very limited impact on developers and advanced users.
view --show-gps
+ pair-wise input for lalo2yx/yx2lalo()
view --show-gps
+ dual-coord input for lalo2yx/yx2lalo()
Awesome, thanks @yunjunz! Do you think we could create a new release of MintPy soon with these changes? I ended up pursuing this work to support some tutorials ASF's OpenSARLab team runs and it would be great to get them a new release with these changes. |
Sure thing, let's cut for a new release for it. There are a few recently open PRs from the JPL folks, it will be nice to merge those before the new release, likely this week. |
Hi @forrestfwilliams, I think the code is ready for a new release. As for the proposed changes in #1162, doing them either before or after the release is fine with me, let me know please. |
Description of proposed changes
HyP3 (and I believe NISAR as well) both output their InSAR products in UTM coordinates. While MintPy was originally designed to use lat/lon coordinates, has limited support for UTM datasets as well. Users have noted (i.e., issue #1145) that it would be nice to better support UTM datasets.
This PR adds some additional support for UTM datasets, in plotting and GPS comparison contexts by:
coords.coordinate.latlon2yx
works with UTM coordinatescoords.coordinate.geo2rdr
works with UTM coordinatesTo accomplish this, checks for the use of UTM coordinates were added to
latlon2yx
andgeo2rdr
. Also, the inputs forlatlon2yx
was changed from a coordinate and a coordinate type (lat or lon) to a pair of lat/lon or northing/easting coordinates. All uses oflatlon2yx
were changed to use this new input format.Reminders