Welcome to Week 7!
Welcome to week 7 of Earth Analytics!
At the end of this week you will be able to:
- Describe what a spectral band is in remote sensing data.
- Create maps of spectral remote sensing data using different band combinations including CIR and RGB.
- Calculate NDVI in
- Get NAIP remote sensing data from Earth Explorer.
- Use the Landsat file naming convention to determine correct band combinations for plotting and calculating NDVI.
- Define additive color model.
Or use earthpy
|20 minutes||Review / questions|
|20-30 minutes||Introduction to multispectral remote sensing|
|Coding part I||Coding Session: Multispectral data in Python using Rasterio|
|Coding part II||Vegetation indices and NDVI in Python|
1a. Remote Sensing Readings
- NASA Overview of Landsat 8
- Penn State e-Education post on multi-spectral data. Note they discuss AVHRR at the top which you won’t use in this lesson but be sure to read about Landsat.
/Users/lewa8222/anaconda3/envs/earth-analytics-python/lib/python3.6/site-packages/earthpy/spatial.py:372: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result. rgb_bands = arr[[rgb]]
The intermediate NDVI plots below are not required for your homework. They are here so you can compare intermediate outputs if you want to! You will need to create these datasets to process the final NDVI difference plot that is a homework item!
/Users/leah-su/anaconda3/envs/earth-analytics-python/lib/python3.6/site-packages/matplotlib/tight_layout.py:177: UserWarning: The left and right margins cannot be made large enough to accommodate all axes decorations. warnings.warn('The left and right margins cannot be made large ' /Users/leah-su/anaconda3/envs/earth-analytics-python/lib/python3.6/site-packages/matplotlib/tight_layout.py:182: UserWarning: The bottom and top margins cannot be made large enough to accommodate all axes decorations. warnings.warn('The bottom and top margins cannot be made large ' /Users/leah-su/anaconda3/envs/earth-analytics-python/lib/python3.6/site-packages/matplotlib/tight_layout.py:209: UserWarning: tight_layout cannot make axes height small enough to accommodate all axes decorations warnings.warn('tight_layout cannot make axes height small enough '
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-33-e68fbe548849> in <module>() 6 # Stack landsat tif files using es.stack_raster_tifs - earthpy 7 ----> 8 landsat_pre, landsat_pre_meta = es.stack_raster_tifs(all_landsat_band_paths, landsat_pre_out) 9 extent_landsat = plotting_extent(landsat_pre, landsat_pre_meta["transform"]) ~/anaconda3/envs/earth-analytics-python/lib/python3.6/site-packages/earthpy/spatial.py in stack_raster_tifs(band_paths, out_path) 80 # save out a stacked gtif file 81 with rio.open(out_path, 'w', **dest_kwargs) as dest: ---> 82 return stack(sources, dest) 83 84 ~/anaconda3/envs/earth-analytics-python/lib/python3.6/site-packages/earthpy/spatial.py in stack(sources, dest) 100 # raise ValueError("The output directory path that you provided does not exist") 101 --> 102 if not type(sources) == rio._io.RasterReader: 103 raise ValueError("The sources object should be of type: rasterio.RasterReader") 104 AttributeError: module 'rasterio._io' has no attribute 'RasterReader'