Description Usage Arguments Author(s) See Also Examples
Save a given map in the desire format.
1 2 3 |
map |
raster to be saved or displayed |
outname |
name of the file where the map is saved (without extension). |
outext |
extension of the created map. |
title |
title of the map. |
shapefile |
name of the shape/kml file with objects (points or polygons) to be displayed on the maps. |
shapedir |
path to the shape/kml file. |
shapeext |
extension of the shape/kml file : "shp" for a Esri shapefile or "kml" for a kml file from Google earth . |
label |
name of the label of the points to be displayed on the map. |
pal |
name of the palette of colors used to make the map from the package RColorBrewer. |
... |
further arguments sent to |
Romain Frelat and Bruno Gerard
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #local variables
ndvidirectory=paste(system.file("extdata/VITO_Mzimba",
package="ndvits"), "/", sep="")
region="Mzimba"
#finding the path to the map of the 1st of January 2004
filein=timetoMap(ndvidirectory,region, 2004,1,1)
#loading the raster
map=readpartGDAL(filein)
#executing savemap
savemap(map, outname="Mzimba01012004", title = "NDVI values 1st
of January 2004 in Mzimba")
#adding points to the map
shape="SLP_Mzimba"
shapedir=paste(system.file("extdata/shape", package="ndvits"),
"/", sep="")
savemap(map, outname="Mzimba01012004", title = "NDVI values 1st
of January 2004 in Mzimba", shapefile=shape,
shapedir=shapedir, label="Village")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.