pe_geographic_distance |
Finds the distance and forward and inverse azimuths between two points along a geodesic, loxodrome, or great elliptic
void pe_geodesic_distance (double a, double e2, double lam1, double phi1, double lam2, double phi2, double *distance, double *az12, double *az21, int geographic_linetype);
a | Semimajor axis of the spheroid |
e2 | Eccentricity squared of the spheroid |
lam1 | Longitude value of the first point |
phi1 | Latitude value of the first point |
lam2 | Longitude value of the second point |
phi2 | Latitude value of the second point |
distance | Geodesic distance |
az12 | Azimuth from the first to the second point |
az21 | Azimuth from the second to the first point |
geographic_linetype | Type of line to use |
The pe_geographic_distance function takes a spheroid and two geographic points and calculates the distance and azimuths along a geodesic, a loxodrome, or a great elliptic. The geographic_linetype parameter specifies the type of line to use: geodesic, loxodrome, or great elliptic. A geodesic is the shortest distance between two points on a spheroid. A loxodrome is a line of equal bearing (a straight line in a Mercator projection). A great elliptic is the line created by the intersection of the spheroid surface with a plane formed by the center of the spheroid and two points on its surface. The valid line type values are:
PE_LINETYPE_GEODESIC 0
PE_LINETYPE_LOXODROME 1
PE_LINETYPE_GREAT_ELLIPTIC 2>
Set e2 to zero to calculate distances on a sphere. The geographic coordinates
and the azimuths are in radians. The azimuth value range is -π
≤ azimuth ≤
+π. An azimuth is measured positive
clockwise with North equal to a zero azimuth. The semimajor axis (a) is
usually given in meters, which means that the distance is in meters. To
return the distance in another linear unit of measure, specify the semimajor
axis in that unit of measure. As an example, if the semimajor axis is
in US survey feet, the returned distance is in US survey feet.
Distance and forward and inverse azimuths (in radians)