dtAntipode: dt Antipode

Description Usage Arguments Value Examples

Description

Calculates the antipodal coordiantes for a given pair of coordinates

Usage

1
dtAntipode(lat, lon)

Arguments

lat

latitude coordinate

lon

longitude coordinate

Value

a list of length 2, the first element being the latitude coordinates, and the second element being the longitude coordinates

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

 dt <- data.table(lat = c(-37,-36,-35),
                  lon = c(143,144,145))

 ## return just the antipodes
 dt[, dtAntipode(lat, lon)]

 ## return a new columns of antipodes
 dt[, c("AntLat", "AntLon") := dtAntipode(lat, lon)]


## End(Not run)

SymbolixAU/spatial.data.table documentation built on May 9, 2019, 3:30 p.m.