pnpmulti: Check if multiple points are within a polygon (2D)

Description Usage Arguments Value See Also Examples

Description

pnpmulti works as pnp but for multiple points.

Usage

1
pnpmulti(vertx, verty, testx, testy)

Arguments

vertx

vector of x axis values of polygon corner points

verty

vector of y axis values of polygon corner points

testx

vector of x axis values of points of interest

testy

vector of y axis values of points of interest

Value

vector with boolean values - TRUE, if the respective point is within the polygon. Otherwise FALSE.

See Also

Other pnpfuncs: pnp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
polydf <- data.frame(
  x = c(1,1,2,2),
  y = c(1,2,1,2)
)

testdf <- data.frame(
  x = c(1.5, 2.5),
  y = c(1.5, 2.5)
)

pnpmulti(polydf$x, polydf$y, testdf$x, testdf$y)

recexcavAAR documentation built on May 1, 2019, 6:48 p.m.