spEllipse: Produce an circle or ellipse as a SpatialPolygons object

Description Usage Arguments Value

View source: R/mapcomponents.R

Description

This function draw a simple circle or ellipse, centred on a certain coordinate pair and of a certain size (the circle's radius or height, width and azimuth for an ellipse). The smooothness of the circle can be controlled by the chosen number of vertices placed along the perimeter, and the circle can be assigned a projection system if desired.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
spEllipse(
  xc,
  yc,
  a,
  b = a,
  angle = 0,
  nsteps = 360,
  proj4string = CRS(as.character(NA)),
  noSp = FALSE,
  ...
)

Arguments

xc

x coordinate of circle or ellipse centre

yc

y coordinate of circle or ellipse centre

a

the size of the circle radius in map units or the length of the longer axis of the ellipse

b

the size of the shorter axis of the ellipse, if necessary (default is circular with b=a).

angle

the map orientation of the shorter axis of the ellipse, if necessary (default is longer axis is oriented north).

nsteps

the number of vertices used to describe the circle of the ellipse, if necessary (i.e. the smoothness of the plotted circle, default is 360)

Value

a plotted polygon


ahb108/sparch documentation built on Feb. 3, 2021, 1:21 a.m.