Analyze Landsat remote sensing images using xarray
Documentation (latest) • Contributing (how you can help) • CompGeoLab
About
xlandsat is Python library for loading and analyzing Landsat scenes
downloaded from USGS EarthExplorer with
the power of xarray.
We take care of reading the metadata from the *_MTL.txt files provided by
EarthExplorer and organizing the bands into a single xarray.Dataset data
structure for easier manipulation, processing, and visualization.
Example
Here's a quick example of loading and plotting this Landsat 9 scene from the city of Manaus, Brazil, which is where the Solimões (brown water) and Negro (black water) rivers merge to form the Amazon river:
import xlandsat as xls
import matplotlib.pyplot as plt
# Download a sample Landsat 9 scene in EarthExplorer format
path_to_scene_file = xls.datasets.fetch_manaus()
# Load the data from the file into an xarray.Dataset
scene = xls.load_scene(path_to_scene_file)
# Make an RGB composite as an xarray.DataArray
rgb = xls.composite(scene, rescale_to=[0.02, 0.2])
# Plot the composite using xarray's plotting machinery
rgb.plot.imshow()
# Annotate the plot with the rich metadata xlandsat adds to the scene
plt.title(f"{rgb.attrs['title']}\n{rgb.attrs['long_name']}")
plt.axis("scaled")
plt.show()
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.
- For other satellites and more powerful features, use Satpy.
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.
Metadata
Release files for xlandsat 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xlandsat-0.5.0.tar.gz | 20.1 kB | Without provenance | Details for xlandsat-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xlandsat-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for xlandsat-0.5.0-py3-none-any.whl |
Total release size: 42.2 kB
Release files / xlandsat-0.5.0.tar.gz
| Download URL | xlandsat-0.5.0.tar.gz |
|---|---|
| Size | 20.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6d8b8ad9876f72227e2bb06f556f5a815446c9a7b8f5aedbbd6b38aa4fd04a6f
|
|
BLAKE2b-256 checksum How to use checksums |
011c55e7fbc07193c1b72afc52ae4ccf350a71bdf3bf69b72b6c92cb250ca439
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / xlandsat-0.5.0-py3-none-any.whl
| Download URL | xlandsat-0.5.0-py3-none-any.whl |
|---|---|
| Size | 22.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f76d773a2a71a4c076b6f407fbb867a52dbcb50383ad3fe3ebb293c17eee422
|
|
BLAKE2b-256 checksum How to use checksums |
6f13cf67568da1761be6591e74a136b5f62ca99349d6446c57c91d490dccceae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Security for xlandsat 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.