Skip to content

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

Closed

Description

@seisman

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.

Activity

  1. added
    feature request
    on Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions