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.2.0.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

xlandsat-0.2.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for xlandsat-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cbadcf04241dcab19ea3ba5d88fcf83e4dc174e4ed8a56886ae717c77470a8aa
MD5 0a2eed30ff7aa99b90c096702bfea001
BLAKE2b-256 fa92198246c85b597a57ab467363921746bd58b5237e0e3f03853fe9c4648f10

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for xlandsat-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5d717cf2074926ca11c9adaf7a03615545268bf69924078db5d88bf24aed9ca
MD5 2b5155c7e181a1b36d0736a5544e90a0
BLAKE2b-256 400a2e1975a7e54484c21140916b0657833fcd27eb939a3f2d767c666503d05a

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