s2contains: Test whether points are inside s2region

View source: R/s2region.R

s2containsR Documentation

Test whether points are inside s2region

Description

Test whether points are inside s2region

Usage

s2contains(coords, region, options = s2::s2_options(model = "closed"))

Arguments

coords

data.frame, matrix or list. Object containing spherical coordinates of the points. This must be either longitude and latitude in degrees or 3D Cartesian coordinates. In the former case two named columns or list entries are required. In the latter three colums or list entries are required and assumed to be in x, y, z order (disregarding any names).

region

Region on the sphere where the points occur. Object of class "s2region".

options

List of class "s2_options" to control how containment is defined for polygonal regions. See s2::s2_options for available options and details.

Value

Logical vector of same length as the number of rows in coords


spatstat/spatstat.sphere documentation built on Jan. 27, 2023, 2:59 a.m.