Skip to content

Commit 9c2ac53

Browse files
committed
region can be a string type
1 parent 7369cba commit 9c2ac53

12 files changed

+35
-35
lines changed

pygmt/datasets/earth_age.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def load_earth_age(
1717
resolution: Literal[
1818
"01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m"
1919
] = "01d",
20-
region: Sequence[float] | None = None,
20+
region: Sequence[float] | str | None = None,
2121
registration: Literal["gridline", "pixel"] = "gridline",
2222
):
2323
r"""
@@ -57,8 +57,8 @@ def load_earth_age(
5757
arc-minutes.
5858
region
5959
The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*,
60-
*ymin*, *ymax*]. Required for grids with resolutions higher than 5 arc-minutes
61-
(i.e., ``"05m"``).
60+
*ymin*, *ymax*] or an ISO country code. Required for grids with resolutions
61+
higher than 5 arc-minutes (i.e., ``"05m"``).
6262
registration
6363
Grid registration type. Either ``"pixel"`` for pixel registration or
6464
``"gridline"`` for gridline registration.

pygmt/datasets/earth_free_air_anomaly.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def load_earth_free_air_anomaly(
1717
resolution: Literal[
1818
"01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m"
1919
] = "01d",
20-
region: Sequence[float] | None = None,
20+
region: Sequence[float] | str | None = None,
2121
registration: Literal["gridline", "pixel", None] = None,
2222
):
2323
r"""
@@ -57,8 +57,8 @@ def load_earth_free_air_anomaly(
5757
arc-minutes.
5858
region
5959
The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*,
60-
*ymin*, *ymax*]. Required for grids with resolutions higher than 5 arc-minutes
61-
(i.e., ``"05m"``).
60+
*ymin*, *ymax*] or an ISO country code. Required for grids with resolutions
61+
higher than 5 arc-minutes (i.e., ``"05m"``).
6262
registration
6363
Grid registration type. Either ``"pixel"`` for pixel registration or
6464
``"gridline"`` for gridline registration. Default is ``None``, means

pygmt/datasets/earth_geoid.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def load_earth_geoid(
1717
resolution: Literal[
1818
"01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m"
1919
] = "01d",
20-
region: Sequence[float] | None = None,
20+
region: Sequence[float] | str | None = None,
2121
registration: Literal["gridline", "pixel"] = "gridline",
2222
):
2323
r"""
@@ -50,8 +50,8 @@ def load_earth_geoid(
5050
arc-minutes.
5151
region
5252
The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*,
53-
*ymin*, *ymax*]. Required for grids with resolutions higher than 5 arc-minutes
54-
(i.e., ``"05m"``).
53+
*ymin*, *ymax*] or an ISO country code. Required for grids with resolutions
54+
higher than 5 arc-minutes (i.e., ``"05m"``).
5555
registration
5656
Grid registration type. Either ``"pixel"`` for pixel registration or
5757
``"gridline"`` for gridline registration.

pygmt/datasets/earth_magnetic_anomaly.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def load_earth_magnetic_anomaly(
1818
resolution: Literal[
1919
"01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m"
2020
] = "01d",
21-
region: Sequence[float] | None = None,
21+
region: Sequence[float] | str | None = None,
2222
registration: Literal["gridline", "pixel", None] = None,
2323
data_source: Literal["emag2", "emag2_4km", "wdmam"] = "emag2",
2424
):
@@ -71,8 +71,8 @@ def load_earth_magnetic_anomaly(
7171
``data_source="wdmam"``.
7272
region
7373
The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*,
74-
*ymin*, *ymax*]. Required for grids with resolutions higher than 5 arc-minutes
75-
(i.e., ``"05m"``).
74+
*ymin*, *ymax*] or an ISO country code. Required for grids with resolutions
75+
higher than 5 arc-minutes (i.e., ``"05m"``).
7676
registration
7777
Grid registration type. Either ``"pixel"`` for pixel registration or
7878
``"gridline"`` for gridline registration. Default is ``None``, means

pygmt/datasets/earth_mask.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def load_earth_mask(
2929
"30s",
3030
"15s",
3131
] = "01d",
32-
region: Sequence[float] | None = None,
32+
region: Sequence[float] | str | None = None,
3333
registration: Literal["gridline", "pixel"] = "gridline",
3434
):
3535
r"""
@@ -62,7 +62,7 @@ def load_earth_mask(
6262
arc-minutes, and arc-seconds.
6363
region
6464
The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*,
65-
*ymin*, *ymax*].
65+
*ymin*, *ymax*] or an ISO country code.
6666
registration
6767
Grid registration type. Either ``"pixel"`` for pixel registration or
6868
``"gridline"`` for gridline registration.

pygmt/datasets/earth_relief.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def load_earth_relief(
3232
"03s",
3333
"01s",
3434
] = "01d",
35-
region: Sequence[float] | None = None,
35+
region: Sequence[float] | str | None = None,
3636
registration: Literal["gridline", "pixel", None] = None,
3737
data_source: Literal["igpp", "gebco", "gebcosi", "synbath"] = "igpp",
3838
use_srtm: bool = False,
@@ -78,8 +78,8 @@ def load_earth_relief(
7878
arc-minutes, and arc-seconds.
7979
region
8080
The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*,
81-
*ymin*, *ymax*]. Required for grids with resolutions higher than 5 arc-minutes
82-
(i.e., ``"05m"``).
81+
*ymin*, *ymax*] or an ISO country code. Required for grids with resolutions
82+
higher than 5 arc-minutes (i.e., ``"05m"``).
8383
registration
8484
Grid registration type. Either ``"pixel"`` for pixel registration or
8585
``"gridline"`` for gridline registration. Default is ``None``, means

pygmt/datasets/earth_vertical_gravity_gradient.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def load_earth_vertical_gravity_gradient(
1717
resolution: Literal[
1818
"01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m"
1919
] = "01d",
20-
region: Sequence[float] | None = None,
20+
region: Sequence[float] | str | None = None,
2121
registration: Literal["gridline", "pixel", None] = None,
2222
):
2323
r"""
@@ -57,8 +57,8 @@ def load_earth_vertical_gravity_gradient(
5757
arc-minutes.
5858
region
5959
The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*,
60-
*ymin*, *ymax*]. Required for grids with resolutions higher than 5 arc-minutes
61-
(i.e., ``"05m"``).
60+
*ymin*, *ymax*] or an ISO country code. Required for grids with resolutions
61+
higher than 5 arc-minutes (i.e., ``"05m"``).
6262
registration
6363
Grid registration type. Either ``"pixel"`` for pixel registration or
6464
``"gridline"`` for gridline registration. Default is ``None``, means

pygmt/datasets/mars_relief.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def load_mars_relief(
3030
"15s",
3131
"12s",
3232
] = "01d",
33-
region: Sequence[float] | None = None,
33+
region: Sequence[float] | str | None = None,
3434
registration: Literal["gridline", "pixel", None] = None,
3535
):
3636
r"""
@@ -69,8 +69,8 @@ def load_mars_relief(
6969
arc-minutes and arc-seconds.
7070
region
7171
The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*,
72-
*ymin*, *ymax*]. Required for grids with resolutions higher than 5 arc-minutes
73-
(i.e., ``"05m"``).
72+
*ymin*, *ymax*] or an ISO country code. Required for grids with resolutions
73+
higher than 5 arc-minutes (i.e., ``"05m"``).
7474
registration
7575
Grid registration type. Either ``"pixel"`` for pixel registration or
7676
``"gridline"`` for gridline registration. Default is ``None``, means

pygmt/datasets/mercury_relief.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def load_mercury_relief(
2828
"01m",
2929
"56s",
3030
] = "01d",
31-
region: Sequence[float] | None = None,
31+
region: Sequence[float] | str | None = None,
3232
registration: Literal["gridline", "pixel", None] = None,
3333
):
3434
r"""
@@ -67,8 +67,8 @@ def load_mercury_relief(
6767
arc-minutes and arc-seconds.
6868
region
6969
The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*,
70-
*ymin*, *ymax*]. Required for grids with resolutions higher than 5 arc-minutes
71-
(i.e., ``"05m"``).
70+
*ymin*, *ymax*] or an ISO country code. Required for grids with resolutions
71+
higher than 5 arc-minutes (i.e., ``"05m"``).
7272
registration
7373
Grid registration type. Either ``"pixel"`` for pixel registration or
7474
``"gridline"`` for gridline registration. Default is ``None``, means

pygmt/datasets/moon_relief.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def load_moon_relief(
3030
"15s",
3131
"14s",
3232
] = "01d",
33-
region: Sequence[float] | None = None,
33+
region: Sequence[float] | str | None = None,
3434
registration: Literal["gridline", "pixel", None] = None,
3535
):
3636
r"""
@@ -69,8 +69,8 @@ def load_moon_relief(
6969
arc-minutes and arc-seconds.
7070
region
7171
The subregion of the grid to load, in the form of a sequence [*xmin*, *xmax*,
72-
*ymin*, *ymax*]. Required for grids with resolutions higher than 5 arc-minutes
73-
(i.e., ``"05m"``).
72+
*ymin*, *ymax*] or an ISO country code. Required for grids with resolutions
73+
higher than 5 arc-minutes (i.e., ``"05m"``).
7474
registration
7575
Grid registration type. Either ``"pixel"`` for pixel registration or
7676
``"gridline"`` for gridline registration. Default is ``None``, means

0 commit comments

Comments
 (0)