-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MAINT: update satutils data wrapper.
- add stac_api_url attribute - handle both B01 and B1 style asset names - handle https to s3 url better - use tile compositor - update landsat and sentinel collection names - add tests
- Loading branch information
Showing
2 changed files
with
108 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import datetime | ||
|
||
import numpy as np | ||
import pytest | ||
|
||
import podpac | ||
|
||
STAC_API_URL = "https://earth-search.aws.element84.com/v0" | ||
|
||
|
||
@pytest.mark.integration | ||
class TestLandsat8(object): | ||
def test_landsat8(self): | ||
lat = [39.5, 40.5] | ||
lon = [-110, -105] | ||
time = ["2020-12-09", "2020-12-10"] | ||
c = podpac.Coordinates([lat, lon, time], dims=["lat", "lon", "time"]) | ||
|
||
node = podpac.datalib.satutils.Landsat8(stac_api_url=STAC_API_URL, asset="B01") | ||
output = node.eval(c) | ||
|
||
|
||
@pytest.mark.skip(reason="requester pays") | ||
@pytest.mark.integration | ||
class TestSentinel2(object): | ||
def test_sentinel2(self): | ||
lat = [39.5, 40.5] | ||
lon = [-110, -105] | ||
time = ["2020-12-09", "2020-12-10"] | ||
c = podpac.Coordinates([lat, lon, time], dims=["lat", "lon", "time"]) | ||
|
||
with podpac.settings: | ||
podpac.settings["AWS_REQUESTER_PAYS"] = True | ||
node = podpac.datalib.satutils.Sentinel2(stac_api_url=STAC_API_URL, asset="B01") | ||
output = node.eval(c) |