From 925ae56c40b0cfa7d861f55e4332cb5603168a2c Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Sat, 11 Apr 2020 12:13:46 +0200 Subject: Add proj_degree_input() and proj_degree_output() Equivalent to proj_angular_input() and proj_angular_output() but checking for degree units instead. proj_create_crs_to_crs() rarely, if ever, returns pipelines that has radians as input or output so using proj_angular_*() is not a useful check for io units of pipelines. These two new functions should make life a bit easier for users that generally store there angular coordinates in radians. Closes #2027 --- docs/source/development/reference/functions.rst | 26 ++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/source/development/reference/functions.rst b/docs/source/development/reference/functions.rst index 2d68ff68..14f8bc96 100644 --- a/docs/source/development/reference/functions.rst +++ b/docs/source/development/reference/functions.rst @@ -681,7 +681,7 @@ Various .. c:function:: int proj_angular_input (PJ *P, enum PJ_DIRECTION dir) - Check if a operation expects input in radians or not. + Check if an operation expects input in radians or not. :param `P`: Transformation object :type `P`: const PJ* @@ -699,6 +699,30 @@ Various :type `direction`: PJ_DIRECTION :returns: :c:type:`int` 1 if output units is expected in radians, otherwise 0 +.. c:function:: int proj_degree_input (PJ *P, enum PJ_DIRECTION dir) + + .. versionadded:: 7.1.0 + + Check if an operation expects input in degrees or not. + + :param `P`: Transformation object + :type `P`: const PJ* + :param `direction`: Starting direction of transformation + :type `direction`: PJ_DIRECTION + :returns: :c:type:`int` 1 if input units is expected in degrees, otherwise 0 + +.. c:function:: int proj_degree_output (PJ *P, enum PJ_DIRECTION dir) + + .. versionadded:: 7.1.0 + + Check if an operation returns output in degrees or not. + + :param `P`: Transformation object + :type `P`: const PJ* + :param `direction`: Starting direction of transformation + :type `direction`: PJ_DIRECTION + :returns: :c:type:`int` 1 if output units is expected in degrees, otherwise 0 + Setting custom I/O functions ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -- cgit v1.2.3