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

Low-resolution Earth relief grids should support the "region" argument #870

Closed
seisman opened this issue Feb 12, 2021 · 0 comments · Fixed by #873
Closed

Low-resolution Earth relief grids should support the "region" argument #870

seisman opened this issue Feb 12, 2021 · 0 comments · Fixed by #873
Labels
feature request New feature wanted

Comments

@seisman
Copy link
Member

seisman commented Feb 12, 2021

Description of the desired feature

In load_earth_relief, the region argument only works for high-solution earth relief grids (>=05m). For low-resolution girds, it raises an error:

from pygmt.datasets import load_earth_relief
grid = load_earth_relief(resolution="01d", region=[0, 30, 0, 30])

Error:

---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
<ipython-input-2-97790979a447> in <module>
----> 1 grid = load_earth_relief(resolution="01d", region=[0, 30, 0, 30])

~/.miniconda/lib/python3.8/site-packages/pygmt/helpers/decorators.py in new_module(*args, **kwargs)
    418                         kwargs[arg] = separators[fmt].join(f"{item}" for item in value)
    419             # Execute the original function and return its output
--> 420             return module_func(*args, **kwargs)
    421 
    422         return new_module

~/.miniconda/lib/python3.8/site-packages/pygmt/datasets/earth_relief.py in load_earth_relief(resolution, region, registration)
     87     if resolution in non_tiled_resolutions:
     88         if region is not None:
---> 89             raise NotImplementedError(
     90                 f"'region' is not supported for Earth relief resolution '{resolution}'"
     91             )

NotImplementedError: 'region' is not supported for Earth relief resolution '01d'

I don't remember why it was not implemented, possibly due to some technical difficulties (related to #542, #524).

Are you willing to help implement and maintain this feature? Yes, but contributions are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant