hytest-org / hytest

https://hytest-org.github.io/hytest/
22 stars 10 forks source link

Why do default https URLs returned from STAC not work? #306

Open npasleyusgs opened 1 year ago

npasleyusgs commented 1 year ago

I noticed that in the "Use GeoPandas to view footprints" section of this notebook the alternate S3 URLs are used instead of the default. When using the default URLs to load assets into Xarray DataArrays, and subsequently trying to access the values of the actual Numpy array, I receive a RasterIO error claiming that the URL is "not a supported file format". The URL the traceback gives is pre-pended with a "/vsis-3/" folder that isn't part of the original default URL (something I suspect that GDAL is doing in the background??).

Can someone please help me understand why the default URLs returned from STAC don't work like the S3 URLs, and what is going on with the "/vsis-3/" directory that's magically pre-pended to the default URL when calling the Numpy array loaded from the STAC?

amsnyder commented 1 year ago

@npasleyusgs - sorry I didn't see this issue until just now. This is resolved for you, right?

npasleyusgs commented 1 year ago

@amsnyder - No, even if I open up an AWS session, it won't open the url. What came up at the end of that NHGF check in just now is going to be the solution (or help lead us to one), I believe.

amsnyder commented 1 year ago

Can you send me an example of the s3 url that is not opening? I just tried the first one in the table from the gist you linked and it opened for me - but maybe I am not grabbing the correct url