insarlab / MintPy

Miami InSAR time-series software in Python
https://mintpy.readthedocs.io
Other
596 stars 255 forks source link

UTM support for `view --show-gps` + dual-coord input for `lalo2yx/yx2lalo()` #1153

Closed forrestfwilliams closed 6 months ago

forrestfwilliams commented 7 months ago

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:

  1. Ensuring UTM coordinate plot axes do not use scientific notation (see issue #1145)
  2. Ensuring coords.coordinate.latlon2yx works with UTM coordinates
  3. Ensuring coords.coordinate.geo2rdr works with UTM coordinates
  4. Adding compatibility for UTM coordinates to GPS plotting functionality

To accomplish this, checks for the use of UTM coordinates were added to latlon2yx and geo2rdr. Also, the inputs for latlon2yx was changed from a coordinate and a coordinate type (lat or lon) to a pair of lat/lon or northing/easting coordinates. All uses of latlon2yx were changed to use this new input format.

Reminders

forrestfwilliams commented 7 months ago

Also related to discussion #1010

forrestfwilliams commented 6 months ago

Hey @yunjunz, I would appreciate your thoughts on this whenever you have time.

forrestfwilliams commented 6 months ago

Thanks for the review @yunjunz! I've made the suggested changes, modified yx2lalo to match the structure of lalo2yx, and updated its uses. This is ready for you to look at again!

forrestfwilliams commented 6 months ago

Not sure why the pre-commit check is failing.

yunjunz commented 6 months ago

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.

forrestfwilliams commented 6 months ago

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.

yunjunz commented 6 months ago

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.

yunjunz commented 6 months ago

Hi @forrestfwilliams, I think the code is ready for a new release. As for the proposed changes in https://github.com/insarlab/MintPy/issues/1162, doing them either before or after the release is fine with me, let me know please.

forrestfwilliams commented 5 months ago

Hey @yunjunz sorry for the slow response. I'll open a PR for the changes discussed in #1162 next week, then we can release!