Skip to content

Commit 29bd38f

Browse files
committed
added arcticdem pytest
1 parent ca7f300 commit 29bd38f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_arcticdem.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""Tests for sliderule-python arcticdem raster support."""
2+
3+
import pytest
4+
import sliderule
5+
from sliderule import icesat2
6+
7+
@pytest.mark.network
8+
class TestVrt:
9+
def test_vrt(self, domain, organization):
10+
icesat2.init(domain, organization=organization)
11+
rqst = {"dem-asset": "arcticdem-mosaic", "coordinates": [[-178.0,51.7]]}
12+
rsps = sliderule.source("samples", rqst)
13+
assert abs(rsps["samples"][0][0]["value"] - 80.713500976562) < 0.001
14+
assert rsps["samples"][0][0]["file"] == '/vsis3/pgc-opendata-dems/arcticdem/mosaics/v3.0/2m/70_09/70_09_2_1_2m_v3.0_reg_dem.tif'

0 commit comments

Comments
 (0)