# NOT RUN {
# Simple plot of NDVI in Navarre
genPlotGIS(ex.ndvi.navarre,
ex.navarre)
# Using tm arguments
genPlotGIS(ex.ndvi.navarre,
ex.navarre,
tm.compass.size=1,
tm.compass.type="rose",
tm.scale.bar.text.size=0.8,
tm.polygon.region.lwd=6,
tm.polygon.region.border.col="#000000",
tm.raster.r.palette=rev(terrain.colors(40)),
tm.raster.r.title="NDVI",
as.grid = TRUE,
tm.graticules.labels.size=1,
tm.graticules.n.x=3,
tm.graticules.n.y=3)
# Using the view mode of tmap for ploting the images in the viewer
tmap_mode("view")
genPlotGIS(ex.ndvi.navarre,
ex.navarre,
tm.raster.r.palette=rev(terrain.colors(40)))+
tm_facets(as.layers=TRUE)
# path to the cropped and cutted MODIS images for the region of Navarre
wdir <- system.file("ExNavarreVar", package = "RGISTools")
# list all the tif files
files.mod <- list.files(wdir, pattern="\\.tif$", recursive = TRUE, full.names = TRUE)
# print the MOD09 bands
getRGISToolsOpt("MOD09BANDS")
# select the red, blue and NIR bands
img.mod.red <- raster(files.mod[1])
img.mod.blue <- raster(files.mod[3])
img.mod.green <- raster(files.mod[4])
img.mod.rgb<-varRGB(img.mod.red,img.mod.green,img.mod.blue)
genPlotGIS(ex.ndvi.navarre,
ex.navarre)+
tm_facets(as.layers = TRUE)+
genPlotGIS(list(img.mod.rgb),
ex.navarre)
# }
Run the code above in your browser using DataLab