Lab 08
Lab 08: Multiband Raster
This lab introduces the GIS raster operations using Rasterio and matplotlib libraries, such as read, explore raster data files, and band calculation.
There are four questions in total. Please provide your code answers directly below each question.
Make sure to run all cells so that the answers are stored. Once completed, submit the .ipynb file (ensuring that all answers are included) to Canvas by midnight (11:29 PM) on November 3.
This lab is worth a total of 65 points and contributes 6.5% toward the final grade.
1. Calculating NDWI (20 pts)¶
- Using landsat.tif for Question 1. landsat.tif is Landsat 9 data, check the link here to see the details about band information.
NDWI is used to detect water content.
NDWI = (Green - NIR)/(Green + NIR)
The range for NDWI is -1 to 1
This formula is used to enhance open water features which suppressing vegetation, soil, and other land cover.
import geopandas as gpd
import rasterio
import os
import rasterio.plot
import matplotlib.pyplot as plt
import numpy as np
import rasterio.mask
2. Calculate Normalized Difference Built-Up Index (NDBI) (20 pts)¶
- Using city.tif for Question 2, city.tif is band 9 also.
The Normalized Difference Built-Up Index (NDBI) is an index designed to highlight built-up or urban areas in satellite imagery. It is particularly effective for identifying urban regions, as built-up surfaces (such as buildings and roads) have a higher reflectance in the Shortwave Infrared (SWIR2) than in the Near Infrared (NIR).
NDBI = (SWIR2 - NIR) / (SWIR2 - NIR)
NDBI values range from -1 to 1
4. Comparison of NDWI , NDBI and NDVI (20 pts)¶
Based on visually interpretation, please compare the different indices—NDVI, NDWI, and NDBI—and explain the types of objects or surfaces that each index is designed to highlight.