s2_point: Create an S2 Point Vector

View source: R/s2-point.R

s2_pointR Documentation

Create an S2 Point Vector

Description

In S2 terminology, a "point" is a 3-dimensional unit vector representation of an s2_point(). Internally, all s2 objects are stored as 3-dimensional unit vectors.

Usage

s2_point(x, y, z)

s2_point_crs()

as_s2_point(x, ...)

## Default S3 method:
as_s2_point(x, ...)

## S3 method for class 'wk_xy'
as_s2_point(x, ...)

## S3 method for class 'wk_xyz'
as_s2_point(x, ...)

Arguments

x, y, z

Vectors of latitude and longitude values in degrees.

...

Unused

Value

An object with class s2_point

Examples

point <- s2_lnglat(-64, 45) # Halifax, Nova Scotia!
as_s2_point(point)
as.data.frame(as_s2_point(point))


s2 documentation built on May 31, 2023, 9:33 p.m.