Load Landsat remote sensing images into xarray
Project description
xlandsat
Load Landsat remote sensing images into xarray
Documentation (latest) • Documentation (main branch) • CompGeoLab
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()
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
Built Distribution
File details
Details for the file xlandsat-0.0.1.tar.gz
.
File metadata
- Download URL: xlandsat-0.0.1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c0b799b249edec7c651f7675413440080465bcc01a3bfae29a35ba17d849628 |
|
MD5 | 5ef10d9c1129d28b9dbb249cd5f779b1 |
|
BLAKE2b-256 | 95d73e26306a17977bbb2f1bdc56bebe9b1f8251196c6106508fa3816d25f0a1 |
File details
Details for the file xlandsat-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: xlandsat-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d068a46bf4464b5033dc5250754db4c2a04bdd1d0b9fe9f36af30f7e2a906f9 |
|
MD5 | 4855928d23107672478e4f4b5de9d3c2 |
|
BLAKE2b-256 | b66a21ecdf40531822ebd1ce0c930930fcbfe4411606a2af77d19a42985e98af |