Learn R Programming

s2 (version 0.4-0)

S2Polygon_Contains: Test of Containment in S2Polygon

Description

Test whether the given object(s) on the sphere are contained in a polygon. At the moment only point containment can be tested.

Usage

S2Polygon_Contains(poly, x, approx = TRUE)

Arguments

poly

Named list containing an entry called `loops` containing a list of polygon loops represented by three-column matrices.

x

Object(s) to test for containment in `poly`. At the moment only points are handled and they must be specified as a three-column matrix.

approx

Logical to use approximate testing of point in polygon (allows points very slightly outside the polygon). Useful for allowing points directly on the border.