osmium::geom::haversine Namespace Reference

Functions to calculate arc distance on Earth using the haversine formula. More...

## Functions

double | distance (const osmium::geom::Coordinates &c1, const osmium::geom::Coordinates &c2)
double | distance (const osmium::WayNodeList &wnl)

## Variables

constexpr double | EARTH_RADIUS_IN_METERS = 6372797.560856
| Earth's quadratic mean radius for WGS84. More...

## Detailed Description

Functions to calculate arc distance on Earth using the haversine formula.

See http://en.wikipedia.org/wiki/Haversine_formula

Implementation derived from http://blog.julien.cayzac.name/2008/10/arc-and-distance-between-two-points-on.html

## Function Documentation

double osmium::geom::haversine::distance | ( | const osmium::geom::Coordinates & | c1,
|  | const osmium::geom::Coordinates & | c2
| ) |  |

inline

Calculate distance in meters between two sets of coordinates.

double osmium::geom::haversine::distance | ( | const osmium::WayNodeList & | wnl | ) |

inline

Calculate length of way.

## Variable Documentation

constexpr double osmium::geom::haversine::EARTH_RADIUS_IN_METERS = 6372797.560856

Earth's quadratic mean radius for WGS84.