Description Usage Arguments Value Author(s) See Also Examples
Funtionally similar to drawBuffer but instead of subsampling the polygon, returns the drawn polygon.
1 | drawRegion(x, y, r, numVert = 1000)
|
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. |
An object of class 'SpatialPolygon'
P. A. Harrison
seedSource
, draw.circle
, SpatialPolygons
, SpatialPolygonsDataFrame
, spsample
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.