Description Usage Arguments Details Value Note References Examples

Calculates the geodesic distance between two points specified by latitude and longitude using the Haversine formula

1 | ```
gcd_hf(long1, lat1, long2, lat2)
``` |

`long1` |
- Longitudinal value of first point in decimal degrees |

`lat1` |
- Latitudinal value of first point in decimal degrees |

`long2` |
- Longitudinal value of second point in decimal degrees |

`lat2` |
- Latitudinal value of second point in decimal degrees |

The Haversine formula can be inaccurate depending on coordinates

Returns the distance between two points on the Earth in kilometers

The haversine method is inaccuarate and should only be used when the vicenty formula fails or over very small distances

[1] Adapted from http://www.r-bloggers.com/great-circle-distance-calculations-in-r/

1 2 3 4 5 | ```
long1<-22
lat1<-44
long2<-52
lat2<-51
gcd_hf(long1,lat1,long2,lat2)
``` |

GeoRange documentation built on June 20, 2017, 9:03 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.