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

Invalid longitude error if bounding box contains a zero #325

Closed
dbaston opened this issue Jul 12, 2022 · 3 comments · Fixed by #331
Closed

Invalid longitude error if bounding box contains a zero #325

dbaston opened this issue Jul 12, 2022 · 3 comments · Fixed by #331

Comments

@dbaston
Copy link

dbaston commented Jul 12, 2022

Trying to query with the bounding box (0, 0, 1, 1) throws the following error:

AssertionError: Invalid bounding box longitudes

This is apparently because np.sign(0) != np.sign(1). If I try to nudge the bounding box to avoid the error, with (1e-6, 1e-6, 1, 1) I get:

icepyx.core.exceptions.NsidcQueryError: An error was returned from NSIDC in regards to your query: ['[1e-08,5.00000001,0.99999999,5.99999999] is not a valid URL encoded bounding_box']
@JessicaS11
Copy link
Member

Hello @dbaston! Thanks for reporting this. We're actually in the process of improving our spatial input handling (#322) to address #321 and several other issues (e.g. for inputs that cross the dateline). @sjh1024, perhaps we could add this as a test case?

I'd have to dig in a bit more to try and figure out why the NSIDC API doesn't like the submitted query - it may be that their API cannot handle the scientific notation for coordinate input. I will investigate this more next week after I return from a conference this week.

@sjh1024
Copy link
Contributor

sjh1024 commented Jul 19, 2022

Thank you for reporting this! I will add this test case + discuss a potential fix with Jessica this week.

@JessicaS11
Copy link
Member

Hello again @dbaston! This issue should be resolved with #322 and #331 (which will be included in the next release of icepyx, likely sometime in early October). Please let us know if you run into this or another issue in the future!

@JessicaS11 JessicaS11 linked a pull request Sep 22, 2022 that will close this issue
5 tasks
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 a pull request may close this issue.

3 participants