Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failing flaky test: rasterio vrt #6363

Closed
dcherian opened this issue Mar 16, 2022 · 2 comments · Fixed by #6371
Closed

failing flaky test: rasterio vrt #6363

dcherian opened this issue Mar 16, 2022 · 2 comments · Fixed by #6371

Comments

@dcherian
Copy link
Contributor

What happened?

This test is failing with a 404 error:

@network
def test_rasterio_vrt_network(self):
# Make sure loading w/ rasterio give same results as xarray
import rasterio
# use same url that rasterio package uses in tests
prefix = "https://landsat-pds.s3.amazonaws.com/L8/139/045/"
image = "LC81390452014295LGN00/LC81390452014295LGN00_B1.TIF"
httpstif = prefix + image
with rasterio.Env(aws_unsigned=True):
with rasterio.open(httpstif) as src:
with rasterio.vrt.WarpedVRT(src, crs="epsg:4326") as vrt:
expected_shape = vrt.width, vrt.height
expected_res = vrt.res
# Value of single pixel in center of image
lon, lat = vrt.xy(vrt.width // 2, vrt.height // 2)
expected_val = next(vrt.sample([(lon, lat)]))
with pytest.warns(DeprecationWarning), xr.open_rasterio(vrt) as da:
actual_shape = da.sizes["x"], da.sizes["y"]
actual_res = da.res
actual_val = da.sel(dict(x=lon, y=lat), method="nearest").data
assert actual_shape == expected_shape
assert actual_res == expected_res
assert expected_val == actual_val

What did you expect to happen?

No response

Minimal Complete Verifiable Example

No response

Relevant log output

No response

Anything else we need to know?

No response

Environment

N/A

@dcherian dcherian added bug needs triage Issue that has not been reviewed by xarray team member topic-testing and removed needs triage Issue that has not been reviewed by xarray team member bug labels Mar 16, 2022
@dcherian dcherian changed the title failing flaky test: rasterio vr failing flaky test: rasterio vrt Mar 16, 2022
@scottyhq
Copy link
Contributor

scottyhq commented Mar 16, 2022

Well, I changed that URL back in #3162 . But maybe it's best to just remove that test now that VRT and other GDAL/rasterio functionality is integrated with rioxarray?

Unfortunately the AWS "landsat-pds" (public data set) was deprecated and not supported any longer, so maybe those images are finally being deleted https://lists.osgeo.org/pipermail/landsat-pds/2021-July/000185.html

@dcherian
Copy link
Contributor Author

👍 sounds good to me. Thanks @scottyhq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants