Skip to content

Commit

Permalink
Add test_earth_relief_03s_landonly_srtm
Browse files Browse the repository at this point in the history
  • Loading branch information
core-man committed Feb 28, 2021
1 parent 3b4d482 commit 849df3b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pygmt/tests/test_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,24 @@ def test_earth_relief_05m_without_region():
load_earth_relief("05m")


def test_earth_relief_03s_landonly_srtm():
"""
Test loading original 3 arc-second land-only SRTM tiles.
"""
data = load_earth_relief(
"03s", region=[135, 136, 35, 36], registration="gridline", use_srtm=True
)

assert data.coords["lat"].data.min() == 35.0
assert data.coords["lat"].data.max() == 36.0
assert data.coords["lon"].data.min() == 135.0
assert data.coords["lon"].data.max() == 136.0
assert data.data.min() == -6.0
assert data.data.max() == 1191.0
assert data.sizes["lat"] == 1201
assert data.sizes["lon"] == 1201


def test_earth_relief_incorrect_registration():
"""
Test loading earth relief with incorrect registration type.
Expand Down

0 comments on commit 849df3b

Please sign in to comment.