gcdist {ncf}R Documentation

Greater circle distance

Description

Greater circle distance function to calculate spatial distance from lat-long data. Called by various functions.

Usage

    gcdist(x1, y1, x2, y2)

Arguments

x1 longitude 1.
x2 longitude 2.
y1 latitude 1.
y2 latitude 2.

Details

Function for great circle distance – due to T. Keitt. See http://www.census.gov/cgi-bin/geo/gisfaq?Q5.1.

Value

The distance in km is returned

Author(s)

Tim H. Keitt


[Package ncf version 1.1-3 Index]