diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-12-16 15:12:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-16 15:12:51 +0100 |
| commit | 5e077729274f5d28e137e1a41f7d3350146614ef (patch) | |
| tree | d1ef799526f06828328b58ce8ee92c028f723b6a /docs/source/development/reference/functions.rst | |
| parent | 8b1ef9504d0bcfbd8433df943e307bbd1aa30c4f (diff) | |
| parent | a27c0255e7b8e6aab1b91e49fd7870d1ee4e1a80 (diff) | |
| download | PROJ-5e077729274f5d28e137e1a41f7d3350146614ef.tar.gz PROJ-5e077729274f5d28e137e1a41f7d3350146614ef.zip | |
Merge pull request #2487 from rouault/error_mgt_improvements
Error management: revise error codes and expose them to the public API
Diffstat (limited to 'docs/source/development/reference/functions.rst')
| -rw-r--r-- | docs/source/development/reference/functions.rst | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/docs/source/development/reference/functions.rst b/docs/source/development/reference/functions.rst index b37eacdd..08b3e669 100644 --- a/docs/source/development/reference/functions.rst +++ b/docs/source/development/reference/functions.rst @@ -368,13 +368,22 @@ Coordinate transformation Batch transform an array of :c:type:`PJ_COORD`. + Performs transformation on all points, even if errors occur on some points + (new to 8.0. Previous versions would exit early in case of failure on a given point) + + Individual points that fail to transform will have their components set to + ``HUGE_VAL`` + :param P: Transformation object :type P: :c:type:`PJ` * :param `direction`: Transformation direction. :type `direction`: PJ_DIRECTION :param n: Number of coordinates in :c:data:`coord` :type n: `size_t` - :returns: `int` 0 if all observations are transformed without error, otherwise returns error number + :returns: `int` 0 if all observations are transformed without error, otherwise returns error number. + This error number will be a precise error number if all coordinates that fail to transform + for the same reason, or a generic error code if they fail for different + reasons. Error reporting @@ -388,6 +397,8 @@ Error reporting context is read. A text representation of the error number can be retrieved with :c:func:`proj_errno_string`. + Consult :ref:`error_codes` for the list of error codes (PROJ >= 8.0) + :param P: Transformation object :type P: :c:type:`PJ` * @@ -400,6 +411,8 @@ Error reporting transformation. A text representation of the error number can be retrieved with :c:func:`proj_errno_string`. + Consult :ref:`error_codes` for the list of error codes (PROJ >= 8.0) + :param ctx: threading context. :type ctx: :c:type:`PJ_CONTEXT` * @@ -464,6 +477,22 @@ Error reporting Get a text representation of an error number. + .. deprecated:: This function is potentially thread-unsafe, replaced by :c:func:`proj_context_errno_string`. + + :param err: Error number. + :type err: `int` + + :returns: `const char*` String with description of error. + +.. c:function:: const char* proj_context_errno_string(PJ_CONTEXT* ctx, int err) + + .. versionadded:: 8.0.0 + + Get a text representation of an error number. + + :param ctx: threading context. + :type ctx: :c:type:`PJ_CONTEXT` * + :param err: Error number. :type err: `int` |
