Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

intersectPolyCircle

Intersection of a Polygonal and a Circular Domain


Description

This is a unifying wrapper around functionality of various packages dealing with spatial data. It computes the intersection of a circular domain and a polygonal domain (whose class defines the specific method).

Usage

intersectPolyCircle(object, center, radius, ...)

## S3 method for class 'owin'
intersectPolyCircle(object, center, radius, npoly = 32, ...)
## S3 method for class 'SpatialPolygons'
intersectPolyCircle(object, center, radius, npoly = 32, ...)
## S3 method for class 'gpc.poly'
intersectPolyCircle(object, center, radius, npoly = 32,
                   useGEOS = FALSE, ...)

Arguments

object

a polygonal domain of one of the supported classes.

center,radius,npoly

see discpoly.

useGEOS

logical indicating if package rgeos (gIntersection) should be used instead of package gpclib. The latter (default) requires explicit acceptance of gpclib's restricted license via surveillance.options(gpclib=TRUE).

...

potential further arguments (from the generic).

Value

a polygonal domain of the same class as the input object.

Author(s)

Sebastian Meyer

See Also

discpoly to generate a polygonal approximation to a disc

Examples

library("spatstat.geom")
plot(letterR)
plot(intersectPolyCircle(letterR, c(3,2), 1), add=TRUE, col=2, lwd=3)

surveillance

Temporal and Spatio-Temporal Modeling and Monitoring of Epidemic Phenomena

v1.19.1
GPL-2
Authors
Michael H<f6>hle [aut, ths] (<https://orcid.org/0000-0002-0423-6702>), Sebastian Meyer [aut, cre] (<https://orcid.org/0000-0002-1791-9449>), Michaela Paul [aut], Leonhard Held [ctb, ths], Howard Burkom [ctb], Thais Correa [ctb], Mathias Hofmann [ctb], Christian Lang [ctb], Juliane Manitz [ctb], Andrea Riebler [ctb], Daniel Saban<e9>s Bov<e9> [ctb], Ma<eb>lle Salmon [ctb], Dirk Schumacher [ctb], Stefan Steiner [ctb], Mikko Virtanen [ctb], Wei Wei [ctb], Valentin Wimmer [ctb], R Core Team [ctb] (A few code segments are modified versions of code from base R)
Initial release
2021-03-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.