createCircle: createCircle

Description Usage Arguments Examples

Description

This function creates a an approximation of a circle as a SpatialPolygons object.

Usage

1
createCircle(x,y,r,start=0,end=2*pi,nsteps=20)

Arguments

x, y

The coordinates of the center of the circle.

r

The radius of the circle.

start

Angle of the start points in radiants.

end

Angle of the end points in radiants.

nsteps

Number of edges of the polygon approximating the circle.

Examples

1
2
3
# Plot a circle with origin 0,0 and radius 1
library("sp", "sptools")
plot(createCircle(0,0,1))

duccioa/sptools documentation built on May 3, 2019, 1:48 p.m.