Learn R Programming

s2 (version 0.4-2)

S2Cap_Contains: Test of Containment in S2Cap

Description

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

Usage

S2Cap_Contains(cap, x)

Arguments

cap

Named list containing axis and height of cap.

x

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

Examples

Run this code
# NOT RUN {
cap <- list(axis = c(0,1,0), height = 0.1)
S2Cap_Contains(cap, matrix(c(0,1,0),ncol=3))
S2Cap_Contains(cap, matrix(c(1,0,0),ncol=3))
# }

Run the code above in your browser using DataLab