spCircle {sampSurf} | R Documentation |
This function simply creates a circular polygon object that is of class
"SpatialPolygons
". It also creates a
"SpatialPoints
" object holding the center point of
the circle.
spCircle(radius, spUnits = CRS(projargs = as.character(NA)), centerPoint = c(x = 0, y = 0), nptsPerimeter = 100, spID = paste("circle", .StemEnv$randomID(), sep = ":"), ...)
radius |
The radius of the circle in the appropriate units. |
spUnits |
Object of class |
centerPoint |
The circle's center location in the appropriate units. This is a vector of length two with names "x" and "y". |
nptsPerimeter |
The number of points forming the perimeter of the polygon. |
spID |
A unique identifier that will be used in displaying the spatial polygon. |
... |
Not used currently. |
The polygon created for the circle will always have the
individual internal "Polygon
" object named
‘pgCircle
’, while the internal
"Polygons
" object will be named
‘pgsCircle
’. These may need to be renamed in the
returned object to make more sense. See the sp package for more
details.
A list with the following components...
spCircle |
The " |
location |
The " |
Jeffrey H. Gove
The standingTree
constructor.
dbh = 20 sp.dbh = spCircle(dbh/2, centerPoint=c(x=30,y=80), spID='tree.1') plot(sp.dbh$spCircle) plot(sp.dbh$location, add=TRUE, pch=3)