lonDist: Calculate distance between two longitudes

Description Usage Arguments Value Author(s) Examples

View source: R/lonDist.R

Description

This function is intended to calculate the distance between two longitudes at a given latitude. If only one longitude location is supplied, the length of 1 deg of longitude is calculated at the given latitude.

Usage

1
lonDist(lon_min, lon_max = NULL, lat, to_km = TRUE, ...)

Arguments

lon_min

numeric. The starting longitude.

lon_max

numeric. The (optional) end longitude. If not supplied, the argument automatically equals lon_min + 1.

lat

numeric. The latitude for which to calculate longitude distance.

to_km

logical. Determines whether the calculated distance is returned in kilometers (default) or miles.

...

Currently not in use.

Value

The linear distance between the starting and end longitude at the given latitude or, if argument lon_max is not supplied, the length of 1 deg of longitude at the given latitude.

Author(s)

Florian Detsch

Examples

1
lonDist(lon_min = 0, lat = 0)

environmentalinformatics-marburg/Rsenal documentation built on Sept. 23, 2018, 5:17 a.m.