drawBuffer: Draw a buffer around a point

Description Usage Arguments Value Author(s) See Also Examples

Description

A helper function for function seedSource. This function first creates a a polygon of class 'SpatialPolygonsDataFrame' and subsamples the polygon to create a uniform point patten of class 'SpatialPoints' which is retunred to an object.

Usage

1
drawBuffer(x, y, r, numVert = 1000, n = 20, mask = NULL)

Arguments

x

The longitude coordinate for the centre of the buffer.

y

The latitude coordinate for the centre of the buffer.

r

The radius (in kilometers) of the buffer.

numVert

The number of vertices to create the buffer.

n

The number of uniform points to create within the buffer

mask

Optinal mask shapefile (.shp) used to clip the buffer.

Value

An object of class 'SpatialPoints'

Author(s)

P. A. Harrison

See Also

seedSource, draw.circle, SpatialPolygons, SpatialPolygonsDataFrame, spsample

Examples

1
2
3
4
5
6
#' #load libraries
library(raster)
library(sp)

tmp <- PUCA::drawBuffer(x = 147.4686, y = -42.008, r = 5)
plot(tmp)

peteraharrison/PUCA documentation built on Sept. 16, 2019, 7:56 a.m.