aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2021-03-10 20:08:13 +0100
committerKristian Evers <kristianevers@gmail.com>2021-03-10 21:21:23 +0100
commitacca99651325574f498bbb1b5c734c7414ce05c3 (patch)
tree1d90f6e0f6fa1aedda1e435dbca3baa03c7df033
parentce97e244e3c67f3e84a0fb73233ee75f4ebe8b50 (diff)
downloadPROJ-acca99651325574f498bbb1b5c734c7414ce05c3.tar.gz
PROJ-acca99651325574f498bbb1b5c734c7414ce05c3.zip
Improve docs for geodesic distance functions in proj.h
-rw-r--r--docs/source/development/reference/functions.rst37
1 files changed, 35 insertions, 2 deletions
diff --git a/docs/source/development/reference/functions.rst b/docs/source/development/reference/functions.rst
index d06179f3..edb61b08 100644
--- a/docs/source/development/reference/functions.rst
+++ b/docs/source/development/reference/functions.rst
@@ -623,7 +623,13 @@ Distances
Calculate geodesic distance between two points in geodetic coordinates. The
calculated distance is between the two points located on the ellipsoid.
- :param P: Transformation object
+ The coordinates in :c:data:`a` and :c:data:`b` needs to be given as longitude
+ and latitude in radians. Note that the axis order of the :c:data:`P` object
+ is not taken into account in this function, so even though a CRS object comes
+ with axis ordering latitude/longitude coordinates used in this function should
+ be reordered as longitude/latitude.
+
+ :param P: Transformation or CRS object
:type P: const :c:type:`PJ` *
:param PJ_COORD a: Coordinate of first point
:param PJ_COORD b: Coordinate of second point
@@ -635,7 +641,13 @@ Distances
Similar to :c:func:`proj_lp_dist` but also takes the height above the ellipsoid
into account.
- :param P: Transformation object
+ The coordinates in :c:data:`a` and :c:data:`b` needs to be given as longitude
+ and latitude in radians. Note that the axis order of the :c:data:`P` object
+ is not taken into account in this function, so even though a CRS object comes
+ with axis ordering latitude/longitude coordinates used in this function should
+ be reordered as longitude/latitude.
+
+ :param P: Transformation or CRS object
:type P: const :c:type:`PJ` *
:param PJ_COORD a: Coordinate of first point
:param PJ_COORD b: Coordinate of second point
@@ -657,6 +669,27 @@ Distances
:param PJ_COORD b: Second coordinate
:returns: `double` Distance between :c:data:`a` and :c:data:`b` in meters.
+.. c:function:: PJ_COORD proj_geod(const PJ *P, PJ_COORD a, PJ_COORD b)
+
+ Calculate the geodesic distance as well as forward and reverse azimuth
+ between two points on the ellipsoid.
+
+ The coordinates in :c:data:`a` and :c:data:`b` needs to be given as longitude
+ and latitude in radians. Note that the axis order of the :c:data:`P` object
+ is not taken into account in this function, so even though a CRS object comes
+ with axis ordering latitude/longitude coordinates used in this function should
+ be reordered as longitude/latitude.
+
+ :param P: Transformation or CRS object
+ :type P: const :c:type:`PJ` *
+ :param PJ_COORD a: Coordinate of first point
+ :param PJ_COORD b: Coordinate of second point
+ :returns: `PJ_COORD` where the first value is the distance between :c:data:`a`
+ and :c:data:`b` in meters, the second value is the forward azimuth
+ and the thir value is the reverse azimuth. The fourth coordinate
+ value is unused.
+
+
Various
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++