drawRegion: Draw a region around a point

Description Usage Arguments Value Author(s) See Also Examples

Description

Funtionally similar to drawBuffer but instead of subsampling the polygon, returns the drawn polygon.

Usage

1
drawRegion(x, y, r, numVert = 1000)

Arguments

x

The longitude coordinate for the centre of the region.

y

The latitude coordinate for the centre of the region.

r

The radius (in kilometers) of the region.

numVert

The number of vertices to create the region.

Value

An object of class 'SpatialPolygon'

Author(s)

P. A. Harrison

See Also

seedSource, draw.circle, SpatialPolygons, SpatialPolygonsDataFrame, spsample

Examples

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

# run code
my_region <- PUCA::drawRegion(x = -42.008, y = 147.4686, r = 50)
projection(my_region) <- CRS("+proj=longlat +datum=WGS84")
plot(my_region)

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