s2 (version 1.0.0)

s2_latlng: Create an S2 LatLng Vector

Description

This class represents a latitude and longitude on the Earth's surface. Most calculations in S2 convert this to a as_s2_point(), which is a unit vector representation of this value.

Usage

s2_latlng(lat, lng)

as_s2_latlng(x, ...)

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

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

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

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

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

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

Arguments

lat, lng

Vectors of latitude and longitude values in degrees.

x

A s2_latlng() vector or an object that can be coerced to one.

...

Unused

Value

An object with class s2_latlng

Examples

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

# }

Run the code above in your browser using DataLab