Skip to contents

Determine if a point is inside a JamPolygon

Usage

point_in_JamPolygon(
  x,
  jp,
  apply_holes = TRUE,
  nullValue = NA,
  verbose = FALSE,
  ...
)

Arguments

x

list with "x","y" with numeric values, representing one or more points.

jp

JamPolygon

apply_holes

logical (default TRUE) whether internal polygon holes are applied, which requires a point in a solid portion of the polygon. When apply_holes=FALSE a point must only be contained within the outer boundary of the polygon.

nullValue

default NA to define the return value when there is no overlapping polygon for a given point. Another alternative is nullValue=NULL which has the benefit of returning a vector with length 0, convenient to test for presence of any overlaps. In fact, this option is used by has_point_in_JamPolygon() for convenience.

...

additional arguments are ignored.

Value

list with integer index values representing any polygons in jp which contain each point in x. When there is no overlapping polygon, nullValue is returned.