pointtobuffer: Point to buffer

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Create a shapefile of points around the points given in the kml/shapefile.

Usage

1
pointtobuffer(shapefile, shapedir, ndvidirectory, region, Ystart, shapeext="shp", outshape = "buffer", outdir = ".", rad = 1, type="VITO_CLIP")

Arguments

shapefile

name of the shape/kml file with multi-points from where the buffer is created.
For a shapefile called ‘name.shp’ , shapefile="name".
For a kml file, write the name of the layer.

shapedir

path to the shape/kml file.
For a shapefile, shapedir is the path to the folder containing the shapefile. For example if the directory of the shapefile is ‘C:/Dir/name.shp’, shapefile="C:/Dir/".
For a kml file, shapedir is the full directory of the kml file. For example shapefile="C:/Dir/name.kml".
Please note that paths to files in R can be specified with either "/" or "\\" in Windows OS and "/" in UNIX OS.

ndvidirectory

path to the ndvi images folder (GeoTIFF files).
Please note that paths to files in R can be specified with either "/" or "\\" in Windows OS and with "/" in UNIX OS.

region

name of the region, same as in the name of the ndvi images.
Please refer to details section for more information on the nomenclature.

Ystart

starting year of the analysis (in four-digit format).

shapeext

extension of the shape/kml file : "shp" for a Esri shapefile or "kml" for a kml file from Google earth .
By default, shapeext = "shp".

outshape

name of the new shapefile where the buffer is saved.
By default, outshape = "buffer".

outdir

path to the folder where the new shapefile is saved.
By default, outdir = ".".

rad

radius, maximum distance in pixels.
New points are added to the shapefile if the distance to the points is smaller than rad.
By default, rad=1, 8 points will be added around each points in the given shapefile.

type

type of nomenclature followed by the NDVI images : "VITO_CLIP", "VITO_VGT" or "GIMMS" (see details for more information).
By default, type = "VITO_CLIP".

Details

More about the variable type :
type = GIMMS : nomenclature from Global Land Cover Facility
[RE][YY][MMM][DDD].[SAT]-VIg.tif

type = VITO_VGT : FreeVGT VITO's nomenclature
NDV_[YYYYMMDD]_[REGION]_Extract.tif

type = VITO_CLIP : nomenclature after clipping the images in a particular region.
[REGION][YYYY]M[MM]P[D].tif

Value

Nothing is return, a shapefile is created and saved in the folder outdir, under the name outshape.

Author(s)

Romain Frelat and Bruno Gerard

See Also

polytopoints

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#local variables
shape="SLP_Mzimba"
shapedir=paste(system.file("extdata/shape", package="ndvits"),
    "/", sep="")
ndvidirectory=paste(system.file("extdata/VITO_Mzimba",
    package="ndvits"), "/", sep="")
region="Mzimba"
Ystart=2004
newshape="BufferMzimba"
dirshape="."
#the shapefile will be saved in the current directory.

pointtobuffer(shape, shapedir, ndvidirectory, region, Ystart,
   outshape = newshape, outdir = dirshape) 

ndvits documentation built on May 2, 2019, 4:47 p.m.

Related to pointtobuffer in ndvits...