Skip to main content

Load Landsat remote sensing images into xarray

Project description

xlandsat

Load Landsat remote sensing images into xarray.

Documentation (latest)Documentation (main branch)CompGeoLab

Latest version on PyPI Latest version on conda-forge Test coverage status Compatible Python versions. DOI used for citations

About

xlandsat is Python library for loading Landsat scenes downloaded from USGS EarthExplorer into xarray.Dataset containers. We take care of reading the metadata from the *_MTL.txt files provided by EarthExplorer and organizing the bands into a single data structure for easier manipulation, processing, and visualization.

Example

Here's a quick example of loading this Landsat 8 scene from the Brumadinho tailings dam disaster in Brazil:

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.

Project goals

  • Loading single scenes in the EarthExplorer format.
  • Provide some calculation, like composites, but leave most of the rest to the user and xarray.

Our goal is not to provide a solution for large-scale data processing. Instead, our target is smaller scale analysis done on individual computers. For cloud-based data processing, see the Pangeo Project.

Project status

xlandsat is ready for use but still changing. This means that we sometimes break backwards compatibility as we try to improve the software based on user experience, new ideas, better design decisions, etc. Please keep that in mind before you update xlandsat to a newer version.

We welcome feedback and ideas! This is a great time to bring new ideas on how we can improve the project. Submit issues on GitHub.

License

This is free software: you can redistribute it and/or modify it under the terms of the MIT License. A copy of this license is provided in LICENSE.txt.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xlandsat-0.1.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

xlandsat-0.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file xlandsat-0.1.0.tar.gz.

File metadata

  • Download URL: xlandsat-0.1.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.15

File hashes

Hashes for xlandsat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fab7e2c42cb9f85feafaf5e41dbcf7b66bb7079618dec2b6b9e9eb2fc6d3d92e
MD5 69257dce674bafc4e02860459bda70d7
BLAKE2b-256 6adb458e397aaa2f42f67506136af9daccea64893ce1fe441b1d512917c0ac99

See more details on using hashes here.

File details

Details for the file xlandsat-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: xlandsat-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.15

File hashes

Hashes for xlandsat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6cd11d928630790e03c1a3a0c92a2d18cdd3f073a4a3d25aaf7e092b0e832fc
MD5 6c246aa027b643ccfe183c9acea0107b
BLAKE2b-256 200cd1aaecfc3210ea14711138484285ee1dffc51a962f9f8dfd1c9292d357e9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page