Learn R Programming

RGISTools (version 0.9.7)

varNBR: Calculate normalized burn ratio (NBR)

Description

varNBR computes the normalized burn ratio (NBR) from the near-infrared (NIR) and shortwave-infrared 2 (SWIR2) bands.

Usage

varNBR(nir, swir2)

Arguments

nir

a raster with the NIR band of the capture.

swir2

a raster with the SWIR2 band of the capture.

Value

A NBR image in raster format.

Details

The normalized burn ratio (NBR) is an index to identify burned areas by comparing its value before and after the fire event. Is calculated using the NIR and SWIR2 bands garcia1991mappingRGISTools.This function is used within ls7FolderToVar, ls8FolderToVar, modFolderToVar and senFolderToVar.

References

garcia1991mappingRGISTools

Examples

Run this code
# NOT RUN {
# path to the cropped and cutted MODIS images for the region of Navarre
img.dir <- system.file("ExNavarreVar", package = "RGISTools")
# list all the tif files
img.files <- list.files(img.dir, pattern="\\.tif$", recursive = TRUE, full.names = TRUE)
# print the MOD09 bands
getRGISToolsOpt("MOD09BANDS")

# select the NIR and SWIR2 bands
nir <- raster(img.files[2])
swir2 <- raster(img.files[7])
# calculate the NBR image
nbr <- varNBR(nir, swir2)
# plot the image
spplot(nbr,col.regions=rev(heat.colors(20)))
# }

Run the code above in your browser using DataLab