geospatial-python icon indicating copy to clipboard operation
geospatial-python copied to clipboard

Stackstac episode

Open rbavery opened this issue 3 years ago • 4 comments

It'd be cool to show folks how to access cloud-hosted geospatial imagery as a dask-backed xarray with stackstac: https://github.com/gjoseph92/stackstac

This would probably necessitate explanation of Dask, chunks, and relevant methods and how to take advantage of chunking. We'd also need to make these caveats very clear:

  • stackstac discards geospatial info like the crs.
  • it's difficult to associate data accessed by stackstac with rioxarray DataArrays

This episode should probably focus on the value of

  1. accessing cloud hosted STAC catalogs and the easy APIs to do so and
  2. the speed improvements that come from Dask/parrallelizing

rbavery avatar Jan 07 '22 19:01 rbavery

#86 and #90 have addressed the background of data access and parallelization, respectively. The stackstac example is going to be addressed by #102.

fnattino avatar Apr 01 '22 15:04 fnattino

@fnattino great to see these merged! Either @srmsoumya or I will work on #102 during the first week of May when we have some blocked off time to work on open source , possibly sooner.

rbavery avatar Apr 04 '22 04:04 rbavery

update: not much movement on this episode to date. but I think I can shoot to have this done after Maptime Davis. Realistically, sometime in November. Some things to cover:

  • selecting multiple single band assets with the assets arg in stackstac.stack to get a multiband DataArray
  • compute multispectral indices using xarray-spatial https://github.com/makepath/xarray-spatial
  • plot change over time at a single pixel.
  • make a gif of spectral indices and label them by date?
  • other kinds of plots, simple time series analysis? Maybe something that brings in the crop region information? Open to suggestions!

rbavery avatar Oct 20 '22 23:10 rbavery

noting that ODC-stac is more actively maintained than stackstac, so it might be the option to consider for a stacking episode. I don't have bandwidth to work on this right now but happy to review PRs if someone would like to give this lesson a shot.

https://github.com/opendatacube/odc-stac

rbavery avatar Apr 17 '24 16:04 rbavery