dist.calc: Euclidean distance between coordinates

Description Usage Arguments Value Author(s) See Also Examples

Description

Calculation of the euclidean distance between two points with stated coordinates (lat, lon)

Usage

1
dist.calc(lat1, lon1, lat2, lon2, unit = "km")

Arguments

lat1

Latitude of the regarded start point

lon1

Longitude of the regarded start point

lat2

Latitude of the regarded end point

lon2

Longitude of the regarded end point

unit

Unit of the resulting distance: unit="m" for meters, unit="km" for kilometers or unit="miles" for miles

Value

A single numeric value

Author(s)

Thomas Wieland

See Also

dist.buf, dist.mat

Examples

1
2
dist.calc(51.556307, 9.947375, 49.009603, 8.417004)
# about 304 kilometers

Example output

[1] 303.6554

REAT documentation built on Sept. 5, 2021, 5:18 p.m.