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

# Download a cropped Landsat 8 scene from the Brumadinho dam disaster
# (Brazil). The function downloads it and returns the path to the .tar file
# containing the scene.
path = xls.datasets.fetch_brumadinho_after()

# Load the scene directly from the archive (no need to unpack it)
scene = xls.load_scene(path)

# Make an RGB composite and stretch the contrast
rgb = xls.composite(scene, rescale_to=[0.03, 0.2])

# Plot the composite
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.3.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

xlandsat-0.3.0-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for xlandsat-0.3.0.tar.gz
Algorithm Hash digest
SHA256 e51eaae22fb43498516ff47337114090e41b78723177cdc1622e1523d2aa54bb
MD5 a3415ecd934284b7f2390a1295ae16ce
BLAKE2b-256 93499b63668838f9ffa908c06102a845e47250b9029252da8783cb025f578cd3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xlandsat-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 16.9 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 495252cd940c25df0c7520575ebd3fdfa002c1aab9a335609898c76149a494df
MD5 0cd1e40a3aa51f9702a67ee4d8eb30f8
BLAKE2b-256 565a765610da3bc925cf132741b392bc3b601d9ac46883ec026b6ba6b891b75f

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