Skip to content

Commit

Permalink
Add false color example to README
Browse files Browse the repository at this point in the history
  • Loading branch information
banesullivan committed Oct 6, 2018
1 parent 9ab8331 commit 83834ce
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,29 @@ We think `espatools` is easy to use; give it a try and let us know what you thin
2. Then checkout `this Jupyter Notebook`_ for a demonstration of some simple plotting after reading Landsat imagery in a Python environment.

.. _this Jupyter Notebook: https://github.com/OpenGeoVis/espatools/blob/master/Example.ipynb


Example False Color
^^^^^^^^^^^^^^^^^^^

.. code-block:: python
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.GetRGB('false_a')
# Now plot the false color image
plt.imshow(color)
The results of the above code yield the following false color image:


.. image:: https://github.com/OpenGeoVis/espatools/raw/master/RGB.png
:alt: RGB False Color

0 comments on commit 83834ce

Please sign in to comment.