Skip to content

Instantly share code, notes, and snippets.

@rmg55
Created March 12, 2021 19:40
Show Gist options
  • Save rmg55/b144cb273d9ccfdf979e9843fdf5e651 to your computer and use it in GitHub Desktop.
Save rmg55/b144cb273d9ccfdf979e9843fdf5e651 to your computer and use it in GitHub Desktop.
using stackstac with NASA HLS S30 catalog
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gjoseph92
Copy link

This is great to see @rmg55—glad it's working for you.

FYI, re: HLSS30.v1.5 is missing the 'type' tag in the assets - add it back in—if you're doing that because stackstac wasn't giving you any assets, note that you could pass

stackstac.stack(
    s_col,
    assets=['B8A', 'B08', 'B09', 'B04', 'B12', 'B02', 'B06', 'B11', 'B07', 'B05', 'B03', 'Fmask', 'B01', 'B10'],
   ...
)

to override which ones it automatically chooses. (See the docs for the assets parameter: https://stackstac.readthedocs.io/en/latest/api/main.html#stackstac.stack)

Also worth noting that your GDAL settings in os.environ might work fine running dask with the local-threaded scheduler (what it looks like you're doing here), but if you were to use distributed locally or on a cluster, they wouldn't stick.
Take a look at the gdal_env parameter parameter in the docs for a way to set this (gdal_env=stackstac.DEFAULT_GDAL_ENV.updated(always=dict(...))). It's really cumbersome to use, so I'd appreciate any input on what you'd typically want to set and how to make it easier.

@RichardScottOZ
Copy link

Thanks!

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