Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@yunjunz
Copy link
Member

@yunjunz yunjunz commented Oct 12, 2023

Description of proposed changes

Reminders

+ utils.utils0.utm2latlon(): set 'strict=False' while calling utm.to_latlon() to allow coordinates outside the range of a typical single UTM zone, which can be common for large area analysis
@yunjunz yunjunz requested a review from scottstanie October 12, 2023 14:13
@yunjunz
Copy link
Member Author

yunjunz commented Oct 13, 2023

Since this is a simple fix, I will just merge the PR.

@yunjunz yunjunz merged commit caac2df into insarlab:main Oct 13, 2023
@yunjunz yunjunz deleted the bugfix branch October 13, 2023 01:47
@scottstanie
Copy link
Contributor

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, 🀷

@yunjunz
Copy link
Member Author

yunjunz commented Oct 13, 2023

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.

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.

UTM conversion raise OutOfRangeError in prep_hyp3.py

2 participants