v0.0.1
Released on: 2022/12/04
doi: https://doi.org/10.5281/zenodo.7395474
First release of xlandsat! This first release provides:
- A function to get Landsat 8 and 9 Collection 2 Level 2 scenes downloaded from USGS EarthExplorer into an
xarray.Dataset
. - A function to generate a composite as an
xarray.DataArray
that can be easily plotted with xarray's machinery.
Here's a quick example:
import xlandsat as xls
import pooch # for downloading the sample scene
# Download the scene as a tar archive
path = pooch.retrieve(
"doi:10.6084/m9.figshare.21665630.v1/cropped-after.tar.gz",
known_hash="md5:4ae61a2d7a8b853c727c0c433680cece",
)
# Load the scene directly from the archive (no need to unpack it)
scene = xls.load_scene(path)
# Make an RGB composite and add it to the scene Dataset
scene = scene.assign(rgb=xls.composite(scene, rescale_to=[0, 0.2]))
# Plot the composite
scene.rgb.plot.imshow()
This release contains contributions from:
- Leonardo Uieda