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

🚚 Rename to PySTACAPISearcher and StackSTACMosaicker #64

Merged
merged 3 commits into from
Sep 22, 2022
Merged

Conversation

weiji14
Copy link
Owner

@weiji14 weiji14 commented Sep 22, 2022

Follow torchdata's IterDataPipe naming convention at https://pytorch.org/data/0.4/tutorial.html#naming to add an 'er' to the end.

Not a breaking change as zen3geo v0.5.0 isn't released yet (phew).

Follow torchdata's IterDataPipe naming convention. Patches c816914.
Follow torchdata's IterDataPipe naming convention. Patches 3c7a88b.
@weiji14 weiji14 added the documentation Improvements or additions to documentation label Sep 22, 2022
@weiji14 weiji14 added this to the 0.5.0 milestone Sep 22, 2022
@weiji14 weiji14 self-assigned this Sep 22, 2022
Seems like https://docs.xarray.dev/en/latest/ is down for some reason. Switching to the stable version for now.
@weiji14 weiji14 merged commit 13072fc into main Sep 22, 2022
@weiji14 weiji14 deleted the renamer branch September 22, 2022 20:11
weiji14 added a commit that referenced this pull request Sep 22, 2022
Show how to turn a stack of DEM tiles in an xarray.DataArray into a mosaic using StackSTACMosaicker, rather than doing it in the collate function. Also renamed some DataPipes to have an 'er' after #64.
weiji14 added a commit that referenced this pull request Sep 26, 2022
Tutorial on stacking a time-series of Sentinel-1 Synthetic Aperture Radar (SAR) Radiometrically Terrain Corrected (RTC) intensity polarization (VH, VV) channels + Copernicus DEM for a change detection task. Looking at landslides digitized by UNOSAT over Gunung Talamau, Indonesia after the 25 Feb 2022 Pasaman Barat earthquake.

* ⬆️ Bump pystac-client to 0.5.0, planetary-computer to 0.4.7

Bumps [pystac-client](https://github.com/stac-utils/pystac-client) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/stac-utils/pystac-client/releases)
- [Changelog](https://github.com/stac-utils/pystac-client/blob/main/CHANGELOG.md)
- [Commits](stac-utils/pystac-client@v0.4.0...v0.5.0)

Bumps [planetary-computer](https://github.com/microsoft/planetary-computer-sdk-for-python) from 0.4.6 to 0.4.7.
- [Release notes](https://github.com/microsoft/planetary-computer-sdk-for-python/releases)
- [Changelog](https://github.com/microsoft/planetary-computer-sdk-for-python/blob/main/CHANGELOG.md)
- [Commits](microsoft/planetary-computer-sdk-for-python@v0.4.6...v0.4.7)

* 🚧 Walkthrough on stacking time-series earth observation data

Initial draft tutorial on stacking a time-series of Synthetic Aperture Radar polarization channels for a change detection task. Will be looking at landslides digitized by UNOSAT over Gunung Talamau, Indonesia after the 25 Feb 2022 Pasaman Barat earthquake. Also added pystac-client and stackstac to the docs extras.

* 📝 Writeup how to get Copernicus DEM, add teaser thumbnails and tips

Show how to get the Copernicus Digital Elevation Model from a STAC catalog. Added some more subsections to the first part, included a teaser thumbnail for both Sentinel-1 GRD and Copernicus DEM over the study area. Wrote some clarification text on what parameters go where when the STAC API query is made, that may or may not be helpful.

* 🚑 Fix incorrect datapipe variable name

Forgot to rename the `dp_stac_items` variable to `dp_sen1_items` in f76a9b7. Also completed the alt-text for the Copernicus DEM thumbnail.

* 📝 Writeup section on loading polygons and stacking steps and params

Show how to get the vector layer loaded as a geopandas.GeoDataFrame and added an overview of the layer stacking steps. Reduced the size of the Sentinel-1 xarray.DataArray by clipping to just Gunung Talamau, reducing the spatial resolution from 10m to 30m, and optimizing dtype from float64 to float16. Also added link to Humanitarian Data Exchange where the nice link to the shapefile (on a server that supports HTTP range requests) can be found.

* 📝 Writeup section on appending DEM to datacube

Show how to create a SAR datacube with the Copernicus DEM layer appended. Specifically, the datacube is an xarray.Dataset with data variables VH, VV and DEM. Realized that a `stackstac.mosaic` DataPipe will be needed, but here's doing the mosaic in the collate function for now.

* 📝 Writeup how to mosaic DEM tiles using StackSTACMosaicker

Show how to turn a stack of DEM tiles in an xarray.DataArray into a mosaic using StackSTACMosaicker, rather than doing it in the collate function. Also renamed some DataPipes to have an 'er' after #64.

* 📝 Writeup section on adding rasterized mask to datacube

Show how to perform rasterization of the vector polygons (following previous vector-segmentation-mask tutorial) and add the resulting mask as another data variable layer of the xarray.Dataset datacube. Thinking about creating a general purpose xarray collate function that does data variable appending since this is the third time it's been needed.

* 💥 Pivot from Sentinel-1 GRD to RTC dataset and set subscription key

Switching to the Radiometrically Terrain Corrected (RTC) intensity dataset because it's georeferenced and actually better over steep topography at Gunung Talamau. However, this requires setting a PC_SDK_SUBSCRIPTION_KEY (finally found the correct one) and 🤞 that it works on readthedocs! Also did some minor edits to the Copernicus DEM mosaic section.

* 💫 Fix striped mask on DataArray merge and make datacube facet plot

Realized that the horizontal striped mask was not an issue with datashader but on the xarray merge. Need to use `join="override"` instead of `join="outer"`. With that, all four layers (vh, vv, dem, mask) can be visualized nicely. Subplot code is a little messy, but well, see https://stackoverflow.com/questions/70667835/use-different-color-scales-in-xarray-faceted-imshow.

* 🍻 Finalize tutorial with spatiotemporal chip slices and dataloader

Completing the stacking layer tutorial in one go! Hastily adapted some FDL2022 code for creating pre-event, post-event and target label tensors, and turned them into tensors without any proper averaging or transposing of the dimensions. Credited the FDL2022 SAR Change Detection challenge and linked to the final showcase Youtube video. Hopefully can do InSAR and NISAR some day!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant