Vegetation shade from Landsat 8 satellite data
Landsat 8 Surface Reflectance measures the fraction of incoming solar radiation reflected from Earth’s surface to the Landsat sensor. Surface reflection measurements can be used to determine the type of surface. The Landsat 8 available measurements are shown in the table below.
The visible bands (bands 2-4) are 12 bit images with Digital Number (DN) values ranging between 0 and 4,095 associated with each pixel. The more reflectance, the higher the DN. The less reflectance, the lower the DN. There are several ways to determine if vegetation is present using reflectance measurements:
-
Plot band 3 (green) using a GIS. Vegetation will show low DN values since it absorbs green light.
-
Plot band 4 (red) using a GIS. Since vegetation (chlorophyll) absorbs this band, vegetation will show as low DN values.
-
Use the Normalized Difference Vegetation Index (NDVI) defined as
$$\begin{aligned}NDVI=\frac{NIR-VIS_R}{NIR+VIS_R}\end{aligned}$$
where $NIR$ is the near infrared (band 5) DN and $VIS_R$ is the red visible (band 4) DN. NDVI values range from -1.0 to +1.0. Areas of barren rock, sand, or snow usually show very low NDVI values (for example, 0.1 or less). Sparse vegetation such as shrubs and grasslands or senescing crops may result in moderate NDVI values (approximately 0.2 to 0.5). High NDVI values (approximately 0.6 to 0.9) correspond to dense vegetation such as that found in temperate and tropical forests or crops at their peak growth stage.
NDVI using QGIS step-by-step
Download tiles covering the area of interest from EarthExplorer.
- Search Criteria: Use the ‘Predefined Area’ tab, select ‘Add Shape’, and select ‘Texas - Travis County’. Select a data range, in our case, May to September of 2019 to obtain the latest vegetation data, when foliage is greenest, and summer months since our analysis is focused on shade for the summer time.
- Select Your Data Sets: Select ‘Landsat’, ‘Landsat Analysis Ready Data (ARD)’, ‘U.S. Landsat 4-8 ARD’.
- Search Results: Download tiles that cover Travis County. Each tile is a .tar file which includes a .tif file for each band.
Load the .tif files (do not use a number as the first character for your .tif files, it seems QGIS does not like it) corresponding to bands 4 and 5 into QGIS using ‘Layer> Add Layer > Add Raster Layer’. Sometimes, negative DN values may be present in a few pixels, usually in bodies of water or shorelines where sharp color changes occur. If necessary, replace negative DN values in the loaded raster layers with zero by:
- Use the ‘Raster Calculator’ to mask the negative values by applying the expression ‘layer>= 0’. The resulting layer is 0 at pixels which used to have negative DN values and 1 everywhere else.
- Use the ‘Raster Calculator’ to multiply the mask layer and the original raster layer. The resulting layer will have its negative DN values set to zero.
- Repeat 1. and 2. for all raster layers.
Use the ‘Raster Calculator’ to calculate NDVI using the processed rasters. To conveniently visualize the NDVI, select -1 as min, +1 as max, and a color ramp from white to black. Healthy vegetation will look darker and areas with no vegetation will look lighter.
Finally, to convert the NDVI raster to a vector layer:
- If necessary, crop the NDVI raster to your area of interest since the polygonize tool is compute-intensive.
- Use the ‘Raster Calculator’ to ‘bin’ the NDVI raster into, say 3 categories, so that the ‘Polygonize’ tool outputs polygons which make sense. For example, if your raster layer is called ndviCoA, ‘(“ndviCoA” > 0.2) _ 1 + (“ndviCoA” > 0.6) _ 1’ will create a ‘binned’ raster with 3 distinct pixel values, pixels with values below 0.2, between 0.2 and 0.6, and above 0.6.
- Vectorize the binned NDVI by using ‘Raster> Conversion> Polygonize’. If QGIS crashes, use GDAL directly.
- Visualize the vector layer by coloring the values 0, 1, and 2. The values #e5f5f9, #99d8c9, and #2ca25f, from Cynthia Brewer’s ColorBrewer look nice.