degreelen: Compute the length of 1-degree of latitude and longitude

Description Usage Arguments Author(s) References Examples

View source: R/degreelen.R

Description

Compute the length of 1-degree of latitude and longitude

Usage

1
2
3
degreelen(lat, model)

ellipsoid(model = c("IRTF", "WGS84"))

Arguments

lat

numeric; degrees

model

(optional) character; which ellipsoidal correction should be used?

Author(s)

A.J.Barbour, adapted from degreelen.m by B.W.Crowell

References

http://en.wikipedia.org/wiki/World_Geodetic_System

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
lats <- 30:32
# Lon should be about 111.4 km, and Lat 96 - 94 km
degreelen(lats)

# In most cases there is no discerible effect
# caused by varying the semi-major axis.
#   Not much difference according to this machine:
all.equal(degreelen(lats,"IRTF"), degreelen(lats,"WGS84"), tolerance = .Machine$double.eps)

#   unless the precision of the input is in micrometers, 
#   which is essentially impossible to achieve:
options(digits=13)
lats <- 30.1111111123
rbind(degreelen(lats,"IRTF"),degreelen(lats,"WGS84"))

## End(Not run)

abarbour/deform documentation built on Feb. 15, 2022, 6:24 p.m.