d.geogr2km: Distance between Geographical Points

Description Usage Arguments Details Value

Description

Calculate the distance d (in kilometers) between two geographical points or between one geographical point and a vector of geographical points.

Usage

1
d.geogr2km(pt.ref, pt.list, method)

Arguments

pt.ref

a list of 2 parameters:

  • lon the reference location longitude

  • lat the reference location latitude

pt.list

a list or data frame of 2 parameters:

  • lon the other location longitude(s)

  • lat the other location latitude(s)

method

the method to be used to evaluate d: "fast" or "haversine" (see Details)

Details

The method = "fast" assumes that the surface is flat. The method = "haversine", slower, calculates the haversine distance by using the function geosphere::distHaversine. For regional earthquake catalogues, the error of the fast method is insignificant.

Value

the value(s) of the distance d between pt.ref and pt.list.


amignan/rseismNet documentation built on July 8, 2019, 6:53 p.m.