diff options
| author | Kristian Evers <kristianevers@gmail.com> | 2020-12-13 15:30:47 +0100 |
|---|---|---|
| committer | Kristian Evers <kristianevers@gmail.com> | 2020-12-13 15:30:47 +0100 |
| commit | c3efbd23a5bf26f1dfd5bc55ae3488d5665ace98 (patch) | |
| tree | a204df79f7057d7d420bf7c5358791347617b9cd /src/strerrno.cpp | |
| parent | 126445148d3b742c7f4e31f5f65857be59c48340 (diff) | |
| parent | 6857d1a4a8eb6fcb7b88b0339413913ba2c3351a (diff) | |
| download | PROJ-c3efbd23a5bf26f1dfd5bc55ae3488d5665ace98.tar.gz PROJ-c3efbd23a5bf26f1dfd5bc55ae3488d5665ace98.zip | |
Merge remote-tracking branch 'osgeo/master'
Diffstat (limited to 'src/strerrno.cpp')
| -rw-r--r-- | src/strerrno.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/strerrno.cpp b/src/strerrno.cpp index 5ae0d7e1..3d0131c6 100644 --- a/src/strerrno.cpp +++ b/src/strerrno.cpp @@ -1,4 +1,4 @@ -/* list of projection system pj_errno values */ +/* list of projection system errno values */ #include <stddef.h> #include <stdio.h> @@ -27,7 +27,7 @@ pj_err_list[] = { "invalid x or y", /* -15 */ "improperly formed DMS value", /* -16 */ "non-convergent inverse meridional dist", /* -17 */ - "non-convergent inverse phi2", /* -18 */ + "non-convergent sinh(psi) to tan(phi)", /* -18 */ "acos/asin: |arg| >1.+1e-14", /* -19 */ "tolerance condition error", /* -20 */ "conic lat_1 = -lat_2", /* -21 */ @@ -74,10 +74,11 @@ pj_err_list[] = { "network error", /* -62 */ /* When adding error messages, remember to update ID defines in - projects.h, and transient_error array in pj_transform */ + src/proj_internal.h and src/apps/gie.cpp */ }; -char *pj_strerrno(int err) { + +const char* proj_errno_string(int err) { const int max_error = 9999; static char note[50]; size_t adjusted_err; @@ -98,7 +99,7 @@ char *pj_strerrno(int err) { #endif } - /* PROJ.4 error codes are negative: -1 to -9999 */ + /* PROJ error codes are negative: -1 to -9999 */ adjusted_err = err < -max_error ? max_error : -err - 1; if (adjusted_err < (sizeof(pj_err_list) / sizeof(char *))) return (char *)pj_err_list[adjusted_err]; @@ -107,7 +108,3 @@ char *pj_strerrno(int err) { (err > -max_error) ? err: -max_error); return note; } - -const char* proj_errno_string(int err) { - return pj_strerrno(err); -} |
