Description Usage Arguments Details Value Examples
This function displays satellite images with the usual format in geographic information systems (GIS), i.e., adding a scale, north arrow, and the border of the region of interest (optional).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
r |
a |
region |
a |
breaks |
a |
labels |
a |
zlim |
a |
layout |
a |
proj |
a |
nbreaks |
a |
nlabels |
a |
as.grid |
a |
compass.rm |
a |
scale.bar.rm |
a |
... |
argument for nested functions:
|
This is a wrapper function of tmap and hence displays any
Raster* object and accepts all of its parameters. The function adds a
scale, a north arrow and a polygon in the area of interest. If necessary, the
function automatically reprojects the polygon to match the projection of the
raster. The projection of the map can be changed by modifying the
proj argument. For futher help on tmap arguements, please go the
tmap reference manual.
tmap class containing the plot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | ## 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)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.