if (FALSE) {
library(terra)
# see WCS_details() for variable options
WCS_details(wcs = 'soilColor')
# moist soil color at 25cm, 270m version
res <- soilColor.wcs(list(aoi = c(-116, 35, -115.5, 35.5), crs = "EPSG:4326"),
var = 'sc025cm', res = 270)
# note colors and other metadata are stored
# in raster attribute table
plot(res, col = cats(res)[[1]]$col, axes = FALSE, legend = FALSE)
}
Run the code above in your browser using DataLab