library(terra)
terra 1.8.5
LANDSAT, NDWI
Wesley Rancher
December 19, 2024
January 21, 2025
Let’s read in a raster and set a color palette to visualize by. This example file is a modified normalized difference water index image within interior Alaska.
colors <- colorRampPalette(c("white", "lightblue",
"blue", "darkblue", "black"))(100)
r <- rast("../FullComp_Dalton_2015.tif", lyr = 24)
plot(r, col = colors)
Looks great. Now if we want to increase the contrast between different pixel values. We can do this