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

Retrieve data in a box that spans the date line #80

Open
beroe opened this issue Mar 1, 2023 · 2 comments
Open

Retrieve data in a box that spans the date line #80

beroe opened this issue Mar 1, 2023 · 2 comments

Comments

@beroe
Copy link

beroe commented Mar 1, 2023

Currently one's input for longitude can only be degrees from 180 to -180, which is fine. However, I want to retrieve data wrapping around the world, but with the left and right edges at 134E instead of at 180.
If I put in 134 as the left boundary, and 133.9 as the right boundary, it flips them and I get a single column of data. I don't know what the subsequent data retrieval calls look like, but it would be nice if we could either enter abs(longitude) > 180 or if the bounds were taken at face value, so a lower number could be on the right side of the range. ... or maybe there is a way to do it with the existing architecture and I just haven't found it... Thanks.

@jhollist
Copy link
Owner

Can you provide an example? Hoping to get some time in a week or two to devote to elevatr. I'll take a look then.

@beroe
Copy link
Author

beroe commented Mar 16, 2023

Thanks for the reply.
The premise is that I would like to make global maps where the whole Pacific ocean is shown, not cut at the -180 line. So for example, Japan, or even all of Australia would be intact at the left side. Presently there is no way to cross the meridian line in the retrieval stage — you have to download the 180 to -180 map and then manipulate the matrix afterwards.
In the metR package, they have a special flag called antimeridian=TRUE for enabling data retrieval across the dateline:
getNOAA.bathy(112.1, 112, -89, 89, antimeridian = TRUE)
That will get a frame where the left edge of the dataset is a 112.1° up to 180°, then from -180 to 0° and up to a right edge of 112°.
As far as I can tell from the documentation, on the backend metR is actually doing two retrievals (112.1 to 180; -180 to 112) and grafting them together before delivering them to you.
So I think, especially for anyone working on marine issues or in Australia, etc., this would be a useful feature. I would like to see more maps that don't chop the Pacific into 2/3rds on the left side, and 1/3rd on the right edge of the map, but it is hard to do that (for me, at least) with the package functions available.
Thanks for your development on behalf of the community and for considering my comment.
Tanaka-GGplot-marmap-2000

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

No branches or pull requests

2 participants