Description Usage Arguments Details Value Warning Author(s) See Also Examples
Extract time series from a file containing a list of images
1 2 | ExtractFile(shapefile, shapedir, listfile, outfile, period,
shapeext = "shp")
|
shapefile |
name of the shape/kml file with multi-points or polygons from where time series are extracted. |
shapedir |
path to the shape/kml file. |
listfile |
file containing a list of images |
outfile |
name of the file where the time series are saved (extension ".txt"). |
period |
number of observation per year |
shapeext |
extension of the shape/kml file : "shp" for a Esri shapefile or "kml" for a kml file from Google earth . |
listfile should respect the following format :
N
path\image1.tif
path\image2.tif
...
path\imageN.tif
with N
the number of image files.
The list of images should be in chronological order, and include the complete path to the file, unless the files are located in the working directory from which R is run. Only the N first images in the file will be processed.
Return the time series of the points/polygons in the shapefile over images in the shapefile.
It is the responsability of the user to have complete and ordered dataset : list of images have to be in chronological order and without missing image.
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 21 22 23 24 25 | #Be carefull : it is only an example !
#It is not the good way to extract time series
#when you have the maps in an accepted nomenclature.
#You should always prefer ExtractVGT, ExtractVITO or
#ExtractGIMMS if possible
#local variables
ndvidirectory=paste(system.file("extdata/VITO_Mzimba",
package="ndvits"), "/", sep="")
region="Mzimba"
Ystart=2004
Yend=2009
list="MzimbaList.txt"
period = 36
shape="SLP_Mzimba"
shapedir=paste(system.file("extdata/shape", package="ndvits"),
"/", sep="")
#executing tolist to get a list
tolist(ndvidirectory, region, Ystart, Yend,
, outfile=list)
#executing ExtractFiles
signal = ExtractFile(shape, shapedir, list, outfile="TS.txt",
period = period)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.