Spectral Shape Indexes (SSI): calculations using R, an aplication in Andalucía

Palacios et al 2006 first develop angle indexes and explore their utility, since then there have been lots of contributions and aplicactions of this indexes.  Some of this indexes are sensitive at tracking moisture and show a temporal profile distinct from spectral indexes, having higher dynamic range and quicker response time to precipitation. As this indexes also show good potential for deriving clear thresholds that discriminate land cover classes.

The aim of this tutorial  is the ease the process to calculate angle indexes using the package Angle Indexes develop by GEOQuBiDy . For this example we will used MODIS data and all the porcess will be donde using R.

Load Libraries for the estimation of Angle Indexes

## Libraries
############
library(raster) 
rasterOptions(progress = "text", maxmemory = 1e+09)
library(rgdal)

## install and load package to estimate angle indexes for MODIS data
####################################################################
remotes::install_github("klauswiese/AngleIndexes")
library(AngleIndexes)

Load data

#MODIS image from Andalucia
###########################

Andalucia <- stack("https://www.dropbox.com/s/7pom2di45gk9ty6/MODISAndalucia.tif?raw=1")/10000
names(Andalucia) <- c("RED", "NIR", "BLUE", "GREEN", "SWIR1", "SWIR2", "SWIR3")
summary(Andalucia)

#Load political limits of Andalucia
download.file("https://www.dropbox.com/s/lb5dva39b7wc6tu/Andalucia.gpkg?raw=1", destfile = "LimitsAndalucia")
Limits <- readOGR("LimitsAndalucia", "Andalucia")

Mask image and explore data

Andalucia <- mask(Andalucia, Limits) #mask data over the study area

#Plot data
#All bands to be used
plot(Andalucia)

#Composite RGB for the study area
plotRGB(Andalucia, r=1,g=4,b=3, stretch = "hist")
plot(Limits, add=TRUE)


Calculate three of the Angle Indexes: ANIR (Angle in NIR), SANI (Shortwave Angle Normalized Index) and AR (Angle in RED)

#ANIR
ANIR <- ANIRmodis(Andalucia[["RED"]], Andalucia[["NIR"]], Andalucia[["SWIR1"]])
#SANI
SANI <- SASImodis(Andalucia[["NIR"]], Andalucia[["SWIR1"]], Andalucia[["SWIR2"]])
#AR
AR <- ARmodis(Andalucia[["GREEN"]], Andalucia[["RED"]], Andalucia[["NIR"]])

Stack indexes and plot

AngleIndexes <- stack(AR, ANIR, SANI)
names(AngleIndexes) <- c("AR", "ANIR", "SANI")
plot(AngleIndexes)

Posted in index developement, Remote sensing data.

Leave a Reply

Your email address will not be published. Required fields are marked *