View source: R/meters.per.degree.lon.R
meters.per.degree.lon | R Documentation |
meters.per.degree.lon
returns meters traveled East-West per decimal degree longitude, given latitude (Northern Hemisphere).
meters.per.degree.lon(theta)
theta |
The decimal degrees of latitude of the Northern Hemisphere location(s) of interest, as number or vector of numbers. |
This function returns the meters traveled East-West per decimal degree longitude, at a given latitude (Northern Hemisphere).
This is an approximation and is less accurate further from the given latitude.
Based on
http://en.wikipedia.org/wiki/Latitude#Length_of_a_degree_of_latitude and
http://en.wikipedia.org/wiki/Longitude#Length_of_a_degree_of_longitude
Input theta is latitude on WGS84.
Function is as follows:
theta.r <- 0.01745329 * theta
ecc2 <- 0.00669438
return( 20037508 * cos(theta.r) / ( 180 * sqrt(1- ecc2 * (sin(theta.r))^2 ) ) )
Based on the following calculations:
The equatorial.radius used is 6378137.0 in meters
2 pi / 360 = 0.01745329
for the WGS84 ellipsoid with a = 6,378,137.0 m and b = 6,356,752.3142 m.
equatorial.radius <- 6378137.0 # a in meters
b=6356752.3142
ecc2 <- (equatorial.radius^2 - b^2)/equatorial.radius^2
ecc2 <- (6378137.0^2 - 6356752.3142^2) / 6378137.0^2
pi * equatorial.radius = 20037508
Also see http://en.wikipedia.org/wiki/Longitude and http://en.wikipedia.org/wiki/Decimal_degrees
Returns meters traveled East-West per decimal degree longitude, as a number or vector of numbers the same length as the input.
meters.per.degree.lat
for a similar function but for travel North-South,
and deltalon.per.km
for the inverse of this function (other than a factor of 1000),
and get.distances.all
and also get.distances
to get distances between points, and related functions.
meters.per.degree.lon(32)
meters.per.degree.lon(c(0,45,72))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.