Skip to content

v0.0.1

Compare
Choose a tag to compare
@leouieda leouieda released this 04 Dec 07:46
· 74 commits to main since this release
c4c064b

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()

RGB map showing the flooded plain after the dam collapse as light brown.

This release contains contributions from:

  • Leonardo Uieda