Skip to main content

Landsat raster file I/O

Project description

Documentation Status PyPI Build Status Documentation Built by gendocs GitHub

An open-source Python package for simple loading of Landsat imagery as NumPy arrays. When downloading Landsat imagery from USGS Earth Explorer, the datasets contain many bands (.tif files) and a few metadata files (.txt and .xml files). espatools is built to parse the .xml metadata file to read all of the bands for that dataset and provide a convenient and intuitive means of accessing that metadata along side the raw data in a Python environment. espatools can be found on GitHub and PyPI.

Collage of RGB colors

Connections

  • The package heavily uses properties for the creation of strongly typed objects in a consistent, declarative way.

  • PVGeo has implemented an interface for espatools to read Landsat imagery via XML metadata files. Check out PVGeo’s Landsat Reader for more details.

Getting Started

espatools is available from PyPI

$ pip install espatools

Usage

We think espatools is easy to use; give it a try and let us know what you think as this is just the alpha-release!

  1. First, take a look at this example for PVGeo where espatools has an interface for direct use in ParaView.

  1. Then checkout this Jupyter Notebook for a demonstration of some simple plotting after reading Landsat imagery in a Python environment.

Example False Color

import espatools
import matplotlib.pyplot as plt

# Create the reader to manage I/O
reader = espatools.RasterSetReader(filename='metadata.xml')

# Perform the read and yield a raster set
raster = reader.read()

# Get an RGB color scheme
color = raster.get_rgb('false_a')

# Now plot the false color image
plt.imshow(color)

The results of the above code yield the following false color image:

RGB False Color

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

espatools-0.1.0.tar.gz (9.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: espatools-0.1.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/2.7.15

File hashes

Hashes for espatools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3c0a17fc89785b46681645ea7e0879aafec3f9616ee2e8bab614463a58293d69
MD5 f5083f575f65048cfd5e6064a2f58a83
BLAKE2b-256 1c88e40cd17112282726ab79e59cdfdb9bc576f3bf81d1a185216d591fb6a3d6

See more details on using hashes here.

Supported by

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