Learn R Programming

s2 (version 1.1.7)

s2_point: 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, ...)

# S3 method for default as_s2_point(x, ...)

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

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

Value

An object with class s2_point

Arguments

x, y, z

Vectors of latitude and longitude values in degrees.

...

Unused

Examples

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

Run the code above in your browser using DataLab