coord_distance: Return the distance (in km) between the latitude/longitude...

View source: R/netcdf_time_series.R

coord_distanceR Documentation

Return the distance (in km) between the latitude/longitude pairs using the Haversine formula.

Description

Return the distance (in km) between the latitude/longitude pairs using the Haversine formula.

Usage

coord_distance(latA, lonA, latB, lonB)

Arguments

latA

The latitude for the first coordinate pair, in decimal-degrees Northing (or a vector of latitudes).

lonA

The longitude for the first coordinate pair, in decimal-degrees Easting (or a vector of longitudes).

latB

The latitude for the second coordinate pair, in decimal-degrees Northing (or a vector of latitudes).

lonB

The longitude for the second coordinate pair, in decimal-degrees Easting (or a vector of longitudes).

Value

The distance (in kilometres) between the coordinate pairs (or a vector of respective distances).

Examples

coord_distance(-34.9257, 138.5832, -34.9285, 138.6007)


biometryhub/BiometryTools documentation built on July 14, 2024, 4:42 p.m.