Closed yunjunz closed 9 months ago
Since this is a simple fix, I will just merge the PR.
Sorry I didn't 👍 it yesterday! Looks good, especially since it's weird to me that utm
decided to raise a value error on the (I think completely arbitrary?) bounds of 1e5 and 1e6... I don't know where those came from, since if you look at e.g. 12N https://epsg.io/32612, it supposed to be used in the range from -108W to -114W. those (100_000, 1_000_000) bounds are from like -106.5W to -114.6W.
Perhaps at some point we could drop utm
in favor of just using pyproj
if we're using that elsewhere. The speed difference doesn't seem worth it to me- utm
seems to convert 1 million points in like 65 milliseconds compared to pyproj
running in 130 milliseconds, 🤷
I agree with you: having pyproj
only, instead of using utm
+ pyproj
, is much nicer. Since our usage of the conversion is so low, the speed does not matter.
Description of proposed changes
utils.utils0.utm2latlon()
: setstrict=False
while callingutm.to_latlon()
to allow coordinates outside the range of a typical single UTM zone, which can be common for large area analysis, as suggested by @swdmike in https://github.com/insarlab/MintPy/issues/1098Reminders