s2 (version 1.0.0)

s2_point: Create an S2 Point Vector

Description

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

Usage

s2_point(x, y, z)

as_s2_point(x, ...)

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

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

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

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

# S3 method for s2_point as.data.frame(x, ...)

# S3 method for s2_point as.matrix(x, ...)

Arguments

x, y, z

Vectors of latitude and longitude values in degrees.

...

Unused

Value

An object with class s2_point

Examples

Run this code
# NOT RUN {
latlng <- s2_latlng(45, -64) # Halifax, Nova Scotia!
as_s2_point(latlng)
as.data.frame(as_s2_point(latlng))

# }

Run the code above in your browser using DataLab