From 5fe21c3e2b88e8248c79311401db03124e88bc52 Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Tue, 17 Sep 2019 10:29:53 -0400 Subject: Add atanh, copysign, cbrt, remainder, remquo to math.cpp. The supported C99 math functions provided by math.cpp are thus hypot log1p asinh atanh copysign cbrt remainder remquo round lround Make compiler checks in CMakeLists.txt and configure.ac consistent with this set. Make geodesic.c use the math.cpp defined (instead of the internally defined) versions of hypot atanh copysign cbrt This is keyed off the presence of the PROJ_LIB macro. I had at one time https://github.com/OSGeo/PROJ/pull/1425 suggested supplying an additional macro PROJ_COMPILATION when compiling geodesic.c. However, PROJ_LIB seems to fill the bill OK. The *next* version of geodesic.c (due out in a few weeks) will also use remainder remquo All of this is only of concern for C compilers without C99 support. So this may become an historical footnote at some point. --- src/geodesic.c | 15 ++++++- src/math.cpp | 131 +++++++++++++++++++++++++++++++++++++++++++------------- src/proj_math.h | 21 ++++++--- 3 files changed, 130 insertions(+), 37 deletions(-) (limited to 'src') diff --git a/src/geodesic.c b/src/geodesic.c index 5504cb3b..887edb42 100644 --- a/src/geodesic.c +++ b/src/geodesic.c @@ -23,8 +23,19 @@ * https://geographiclib.sourceforge.io/ */ +/* The PROJ_COMPILATION flag indicates that this is part of the compilation of + * the PROJ library (keyed off the presence of the PROJ_LIB macro which points + * to the data directory for PROJ). If this is set, we use the PROJ supplied + * implementations of the C99 math functions instead of the ones defined here. + */ +#if defined(PROJ_LIB) +#define PROJ_COMPILATION 1 +#else +#define PROJ_COMPILATION 0 +#endif + #include "geodesic.h" -#ifdef PJ_LIB__ +#if PROJ_COMPILAION #include "proj_math.h" #else #include @@ -122,7 +133,7 @@ enum captype { }; static real sq(real x) { return x * x; } -#if HAVE_C99_MATH +#if HAVE_C99_MATH || PROJ_COMPILATION #define atanhx atanh #define copysignx copysign #define hypotx hypot diff --git a/src/math.cpp b/src/math.cpp index 540ab9eb..0ec4f57f 100644 --- a/src/math.cpp +++ b/src/math.cpp @@ -44,64 +44,137 @@ int pj_isnan (double x) { #if !(defined(HAVE_C99_MATH) && HAVE_C99_MATH) +/* Define C99 compatible versions of + * hypot + * log1p + * asinh + * atanh + * copysign + * cbrt + * remainder + * remquo + * round + * lround + */ + /* Compute hypotenuse */ double pj_hypot(double x, double y) { - x = fabs(x); - y = fabs(y); - if ( x < y ) { - x /= y; - return ( y * sqrt( 1. + x * x ) ); - } else { - y /= (x != 0.0 ? x : 1.0); - return ( x * sqrt( 1. + y * y ) ); - } + x = fabs(x); + y = fabs(y); + if (x < y) { + x /= y; /* y is nonzero */ + return y * sqrt(1 + x * x); + } else { + y /= (x ? x : 1); + return x * sqrt(1 + y * y); + } } /* Compute log(1+x) accurately */ double pj_log1p(double x) { - volatile double - y = 1 + x, - z = y - 1; - /* Here's the explanation for this magic: y = 1 + z, exactly, and z - * approx x, thus log(y)/z (which is nearly constant near z = 0) returns - * a good approximation to the true log(1 + x)/x. The multiplication x * - * (log(y)/z) introduces little additional error. */ - return z == 0 ? x : x * log(y) / z; + volatile double + y = 1 + x, + z = y - 1; + /* Here's the explanation for this magic: y = 1 + z, exactly, and z + * approx x, thus log(y)/z (which is nearly constant near z = 0) returns + * a good approximation to the true log(1 + x)/x. The multiplication x * + * (log(y)/z) introduces little additional error. */ + return z == 0 ? x : x * log(y) / z; } /* Compute asinh(x) accurately */ double pj_asinh(double x) { - double y = fabs(x); /* Enforce odd parity */ - y = log1p(y * (1 + y/(hypot(1.0, y) + 1))); - return x > 0 ? y : (x < 0 ? -y : x); + double y = fabs(x); /* Enforce odd parity */ + y = pj_log1p(y * (1 + y/(pj_hypot(1.0, y) + 1))); + return x > 0 ? y : (x < 0 ? -y : x); /* asinh(-0.0) = -0.0 */ +} + +/* Compute atanh(x) accurately */ +double pj_atanh(double x) { + double y = fabs(x); /* Enforce odd parity */ + y = pj_log1p(2 * y/(1 - y))/2; + return x > 0 ? y : (x < 0 ? -y : x); /* atanh(-0.0) = -0.0 */ +} + +/* Implement copysign(x, y) */ +double pj_copysign(double x, double y) { + /* 1/y trick to get the sign of -0.0 */ + return fabs(x) * (y < 0 || (y == 0 && 1/y < 0) ? -1 : 1); +} + +/* Implement cbrt(x) */ +double pj_cbrt(double x) { + double y = pow(fabs(x), 1/3.0); /* Return the real cube root */ + return x > 0 ? y : (x < 0 ? -y : x); /* cbrt(-0.0) = -0.0 */ +} + +/* Implement remainder(x, y) with ties to even */ +double pj_remainder(double x, double y) { + double z; + y = fabs(y); /* The result doesn't depend on the sign of y */ + z = fmod(x, y); + if (z == 0) + /* This shouldn't be necessary. However, before version 14 (2015), + * Visual Studio had problems dealing with -0.0. Specifically + * VC 10,11,12 and 32-bit compile: fmod(-0.0, 360.0) -> +0.0 + * python 2.7 on Windows 32-bit machines has the same problem. */ + z = pj_copysign(z, x); + else if (2 * fabs(z) == y) + z -= fmod(x, 2 * y) - z; /* Implement ties to even */ + else if (2 * fabs(z) > y) + z += (z < 0 ? y : -y); /* Fold remaining cases to (-y/2, y/2) */ + return z; +} + +/* Implement remquo(x, y, n) with n giving low 3 bits + sign of x/y */ +double pj_remquo(double x, double y, int* n) { + double z = pj_remainder(x, y); + if (n) { + double + a = pj_remainder(x, 2 * y), + b = pj_remainder(x, 4 * y), + c = pj_remainder(x, 8 * y); + *n = (a > z ? 1 : (a < z ? -1 : 0)); + *n += (b > a ? 2 : (b < a ? -2 : 0)); + *n += (c > b ? 4 : (c < b ? -4 : 0)); + if (y < 0) *n *= -1; + if (y != 0) { + if (x/y > 0 && *n <= 0) + *n += 8; + else if (x/y < 0 && *n >= 0) + *n -= 8; + } + } + return z; } +/* Implement round(x) */ double pj_round(double x) { /* The handling of corner cases is copied from boost; see * https://github.com/boostorg/math/pull/8 * with improvements to return -0.0 when appropriate */ double t; - if (x == 0) - return x; /* Retain sign of 0 */ - else if (0 < x && x < 0.5) + if (0 < x && x < 0.5) return +0.0; else if (0 > x && x > -0.5) return -0.0; - else if (x > 0) { + else if (x > 0) { t = ceil(x); return 0.5 < t - x ? t - 1 : t; - } else { /* Includes NaN */ + } else if (x < 0) { t = floor(x); return 0.5 < x - t ? t + 1 : t; - } + } else /* +/-0 and NaN */ + return x; /* retain sign of 0 */ } +/* Implement lround(x) */ long pj_lround(double x) { /* Default value for overflow + NaN + (x == LONG_MIN) */ long r = LONG_MIN; - x = round(x); - if (fabs(x) < -(double)LONG_MIN) /* Assume (double)LONG_MIN is exact */ - r = (int)x; + x = pj_round(x); + if (fabs(x) < -(double)r) /* Assume (double)LONG_MIN is exact */ + r = (long)x; return r; } diff --git a/src/proj_math.h b/src/proj_math.h index 5aea494d..414df805 100644 --- a/src/proj_math.h +++ b/src/proj_math.h @@ -64,16 +64,25 @@ extern "C" { double pj_hypot(double x, double y); double pj_log1p(double x); double pj_asinh(double x); +double pj_atanh(double x); +double pj_copysign(double x, double y); +double pj_cbrt(double x); +double pj_remainder(double x, double y); +double pj_remquo(double x, double y, int* n); double pj_round(double x); long pj_lround(double x); int PROJ_DLL pj_isnan(double x); -#define hypot pj_hypot -#define log1p pj_log1p -#define asinh pj_asinh -#define round pj_round -#define lround pj_lround - +#define hypot pj_hypot +#define log1p pj_log1p +#define asinh pj_asinh +#define atanh pj_atanh +#define copysign pj_copysign +#define cbrt pj_cbrt +#define remainder pj_remainder +#define remquo pj_remquo +#define round pj_round +#define lround pj_lround #ifdef isnan #undef isnan -- cgit v1.2.3 From b154e42c917288124ef64c458b91a0efabd4e568 Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Tue, 17 Sep 2019 11:19:23 -0400 Subject: Fix typo in geodesic.c --- src/geodesic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/geodesic.c b/src/geodesic.c index 887edb42..5183311e 100644 --- a/src/geodesic.c +++ b/src/geodesic.c @@ -35,7 +35,7 @@ #endif #include "geodesic.h" -#if PROJ_COMPILAION +#if PROJ_COMPILATION #include "proj_math.h" #else #include -- cgit v1.2.3 From c080801637b5b3c1fe7462829411a6859ce581dd Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Tue, 17 Sep 2019 11:50:45 -0400 Subject: Fix floating-point number into integer warning in math.cpp --- src/math.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/math.cpp b/src/math.cpp index 0ec4f57f..6c1b6d1b 100644 --- a/src/math.cpp +++ b/src/math.cpp @@ -65,7 +65,7 @@ double pj_hypot(double x, double y) { x /= y; /* y is nonzero */ return y * sqrt(1 + x * x); } else { - y /= (x ? x : 1); + y /= (x != 0 ? x : 1); return x * sqrt(1 + y * y); } } -- cgit v1.2.3 From 93d0f53db70b581718f29601df11f4b819ef943e Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Wed, 18 Sep 2019 07:08:55 -0400 Subject: Try removing C99 math functions from math.cpp (but leave isnan). --- src/math.cpp | 138 -------------------------------------------------------- src/proj_math.h | 21 --------- 2 files changed, 159 deletions(-) (limited to 'src') diff --git a/src/math.cpp b/src/math.cpp index 6c1b6d1b..90d35001 100644 --- a/src/math.cpp +++ b/src/math.cpp @@ -41,141 +41,3 @@ int pj_isnan (double x) { /* cppcheck-suppress duplicateExpression */ return x != x; } - -#if !(defined(HAVE_C99_MATH) && HAVE_C99_MATH) - -/* Define C99 compatible versions of - * hypot - * log1p - * asinh - * atanh - * copysign - * cbrt - * remainder - * remquo - * round - * lround - */ - -/* Compute hypotenuse */ -double pj_hypot(double x, double y) { - x = fabs(x); - y = fabs(y); - if (x < y) { - x /= y; /* y is nonzero */ - return y * sqrt(1 + x * x); - } else { - y /= (x != 0 ? x : 1); - return x * sqrt(1 + y * y); - } -} - -/* Compute log(1+x) accurately */ -double pj_log1p(double x) { - volatile double - y = 1 + x, - z = y - 1; - /* Here's the explanation for this magic: y = 1 + z, exactly, and z - * approx x, thus log(y)/z (which is nearly constant near z = 0) returns - * a good approximation to the true log(1 + x)/x. The multiplication x * - * (log(y)/z) introduces little additional error. */ - return z == 0 ? x : x * log(y) / z; -} - -/* Compute asinh(x) accurately */ -double pj_asinh(double x) { - double y = fabs(x); /* Enforce odd parity */ - y = pj_log1p(y * (1 + y/(pj_hypot(1.0, y) + 1))); - return x > 0 ? y : (x < 0 ? -y : x); /* asinh(-0.0) = -0.0 */ -} - -/* Compute atanh(x) accurately */ -double pj_atanh(double x) { - double y = fabs(x); /* Enforce odd parity */ - y = pj_log1p(2 * y/(1 - y))/2; - return x > 0 ? y : (x < 0 ? -y : x); /* atanh(-0.0) = -0.0 */ -} - -/* Implement copysign(x, y) */ -double pj_copysign(double x, double y) { - /* 1/y trick to get the sign of -0.0 */ - return fabs(x) * (y < 0 || (y == 0 && 1/y < 0) ? -1 : 1); -} - -/* Implement cbrt(x) */ -double pj_cbrt(double x) { - double y = pow(fabs(x), 1/3.0); /* Return the real cube root */ - return x > 0 ? y : (x < 0 ? -y : x); /* cbrt(-0.0) = -0.0 */ -} - -/* Implement remainder(x, y) with ties to even */ -double pj_remainder(double x, double y) { - double z; - y = fabs(y); /* The result doesn't depend on the sign of y */ - z = fmod(x, y); - if (z == 0) - /* This shouldn't be necessary. However, before version 14 (2015), - * Visual Studio had problems dealing with -0.0. Specifically - * VC 10,11,12 and 32-bit compile: fmod(-0.0, 360.0) -> +0.0 - * python 2.7 on Windows 32-bit machines has the same problem. */ - z = pj_copysign(z, x); - else if (2 * fabs(z) == y) - z -= fmod(x, 2 * y) - z; /* Implement ties to even */ - else if (2 * fabs(z) > y) - z += (z < 0 ? y : -y); /* Fold remaining cases to (-y/2, y/2) */ - return z; -} - -/* Implement remquo(x, y, n) with n giving low 3 bits + sign of x/y */ -double pj_remquo(double x, double y, int* n) { - double z = pj_remainder(x, y); - if (n) { - double - a = pj_remainder(x, 2 * y), - b = pj_remainder(x, 4 * y), - c = pj_remainder(x, 8 * y); - *n = (a > z ? 1 : (a < z ? -1 : 0)); - *n += (b > a ? 2 : (b < a ? -2 : 0)); - *n += (c > b ? 4 : (c < b ? -4 : 0)); - if (y < 0) *n *= -1; - if (y != 0) { - if (x/y > 0 && *n <= 0) - *n += 8; - else if (x/y < 0 && *n >= 0) - *n -= 8; - } - } - return z; -} - -/* Implement round(x) */ -double pj_round(double x) { - /* The handling of corner cases is copied from boost; see - * https://github.com/boostorg/math/pull/8 - * with improvements to return -0.0 when appropriate */ - double t; - if (0 < x && x < 0.5) - return +0.0; - else if (0 > x && x > -0.5) - return -0.0; - else if (x > 0) { - t = ceil(x); - return 0.5 < t - x ? t - 1 : t; - } else if (x < 0) { - t = floor(x); - return 0.5 < x - t ? t + 1 : t; - } else /* +/-0 and NaN */ - return x; /* retain sign of 0 */ -} - -/* Implement lround(x) */ -long pj_lround(double x) { - /* Default value for overflow + NaN + (x == LONG_MIN) */ - long r = LONG_MIN; - x = pj_round(x); - if (fabs(x) < -(double)r) /* Assume (double)LONG_MIN is exact */ - r = (long)x; - return r; -} - -#endif /* !(defined(HAVE_C99_MATH) && HAVE_C99_MATH) */ diff --git a/src/proj_math.h b/src/proj_math.h index 414df805..698654dd 100644 --- a/src/proj_math.h +++ b/src/proj_math.h @@ -61,29 +61,8 @@ extern "C" { #endif #endif -double pj_hypot(double x, double y); -double pj_log1p(double x); -double pj_asinh(double x); -double pj_atanh(double x); -double pj_copysign(double x, double y); -double pj_cbrt(double x); -double pj_remainder(double x, double y); -double pj_remquo(double x, double y, int* n); -double pj_round(double x); -long pj_lround(double x); int PROJ_DLL pj_isnan(double x); -#define hypot pj_hypot -#define log1p pj_log1p -#define asinh pj_asinh -#define atanh pj_atanh -#define copysign pj_copysign -#define cbrt pj_cbrt -#define remainder pj_remainder -#define remquo pj_remquo -#define round pj_round -#define lround pj_lround - #ifdef isnan #undef isnan #endif -- cgit v1.2.3 From 9f41f427d0fe6966d187f746f523e84892f240a5 Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Wed, 18 Sep 2019 07:16:30 -0400 Subject: Let geodesic.c use its own versions of C99 math functions if necessary. --- src/geodesic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/geodesic.c b/src/geodesic.c index 5183311e..beb841a0 100644 --- a/src/geodesic.c +++ b/src/geodesic.c @@ -28,7 +28,7 @@ * to the data directory for PROJ). If this is set, we use the PROJ supplied * implementations of the C99 math functions instead of the ones defined here. */ -#if defined(PROJ_LIB) +#if 0 && defined(PROJ_LIB) #define PROJ_COMPILATION 1 #else #define PROJ_COMPILATION 0 -- cgit v1.2.3 From 329e7a9be67c15936488ef37739df065a4b81bf7 Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Wed, 18 Sep 2019 13:27:06 -0400 Subject: Get rid of dead code. The end result of this chain of commits is to eliminate most of math.cpp. All that is left is the handling of isnan (and I've this because math.cpp notes that gie.c uses pj_isnan). geodesic.c now handles supplying C99 math functions internally and this can go away once C99 support is mandated. --- src/geodesic.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src') diff --git a/src/geodesic.c b/src/geodesic.c index beb841a0..49c9823e 100644 --- a/src/geodesic.c +++ b/src/geodesic.c @@ -23,23 +23,8 @@ * https://geographiclib.sourceforge.io/ */ -/* The PROJ_COMPILATION flag indicates that this is part of the compilation of - * the PROJ library (keyed off the presence of the PROJ_LIB macro which points - * to the data directory for PROJ). If this is set, we use the PROJ supplied - * implementations of the C99 math functions instead of the ones defined here. - */ -#if 0 && defined(PROJ_LIB) -#define PROJ_COMPILATION 1 -#else -#define PROJ_COMPILATION 0 -#endif - #include "geodesic.h" -#if PROJ_COMPILATION -#include "proj_math.h" -#else #include -#endif #if !defined(HAVE_C99_MATH) #define HAVE_C99_MATH 0 @@ -133,7 +118,7 @@ enum captype { }; static real sq(real x) { return x * x; } -#if HAVE_C99_MATH || PROJ_COMPILATION +#if HAVE_C99_MATH #define atanhx atanh #define copysignx copysign #define hypotx hypot -- cgit v1.2.3 From 646da7bf3868090ec8ac2d05ab63781de86be64b Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Wed, 18 Sep 2019 14:25:15 -0400 Subject: math.cpp removed since its isnan isn't used. Keep proj_math.h (which just includes math.h and limits.h) since it's included in a score of places. --- src/Makefile.am | 2 +- src/lib_proj.cmake | 1 - src/math.cpp | 43 ------------------------------------------- src/proj_math.h | 46 +--------------------------------------------- 4 files changed, 2 insertions(+), 90 deletions(-) delete mode 100644 src/math.cpp (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index fe7f2572..97f32bc7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -200,7 +200,7 @@ libproj_la_SOURCES = \ apply_gridshift.cpp datums.cpp datum_set.cpp transform.cpp \ geocent.cpp geocent.h utils.cpp gridinfo.cpp gridlist.cpp \ jniproj.cpp mutex.cpp initcache.cpp apply_vgridshift.cpp geodesic.c \ - strtod.cpp math.cpp \ + strtod.cpp \ \ 4D_api.cpp pipeline.cpp \ internal.cpp \ diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake index d1d6f766..f414e955 100644 --- a/src/lib_proj.cmake +++ b/src/lib_proj.cmake @@ -249,7 +249,6 @@ set(SRC_LIBPROJ_CORE list.cpp log.cpp malloc.cpp - math.cpp mlfn.cpp msfn.cpp mutex.cpp diff --git a/src/math.cpp b/src/math.cpp deleted file mode 100644 index 90d35001..00000000 --- a/src/math.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/****************************************************************************** - * Project: PROJ - * Purpose: Make C99 math functions available on C89 systems - * Author: Kristian Evers - * - ****************************************************************************** - * Copyright (c) 2018, Kristian Evers - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - *****************************************************************************/ - -#include "proj_math.h" - -/* pj_isnan is used in gie.c which means that is has to */ -/* be exported in the Windows DLL and therefore needs */ -/* to be declared even though we have isnan() on the */ -/* system. */ - -#ifdef HAVE_C99_MATH -int pj_isnan (double x); -#endif - -/* Returns 0 if not a NaN and non-zero if val is a NaN */ -int pj_isnan (double x) { - /* cppcheck-suppress duplicateExpression */ - return x != x; -} diff --git a/src/proj_math.h b/src/proj_math.h index 698654dd..ac7fc51d 100644 --- a/src/proj_math.h +++ b/src/proj_math.h @@ -1,6 +1,6 @@ /****************************************************************************** * Project: PROJ - * Purpose: Make C99 math functions available on C89 systems + * Purpose: Math support for PROJ -- now provided by system libraries * Author: Kristian Evers * ****************************************************************************** @@ -31,48 +31,4 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - -#if !(defined(HAVE_C99_MATH) && HAVE_C99_MATH) - -#ifndef PROJ_DLL -#ifdef PROJ_MSVC_DLL_EXPORT -#define PROJ_DLL __declspec(dllexport) -#elif defined(PROJ_MSVC_DLL_IMPORT) -#define PROJ_DLL __declspec(dllimport) -#elif defined(__GNUC__) -#define PROJ_DLL __attribute__ ((visibility("default"))) -#else -#define PROJ_DLL -#endif -#endif - -#ifdef PROJ_RENAME_SYMBOLS -#include "proj_symbol_rename.h" -#endif - -#ifndef NAN -#ifdef _WIN32 -#define NAN sqrt(-1.0) -#else -#define NAN 0.0/0.0 -#endif -#endif - -int PROJ_DLL pj_isnan(double x); - -#ifdef isnan -#undef isnan -#endif - -#define isnan pj_isnan - -#endif /* !(defined(HAVE_C99_MATH) && HAVE_C99_MATH) */ - -#ifdef __cplusplus -} -#endif - #endif /* PROJ_MATH_H */ -- cgit v1.2.3 From aa215ceeaaf6e5120f0eb2d28887471a8d819f10 Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Wed, 18 Sep 2019 16:29:35 -0400 Subject: Delete proj_math.h. Replace includes by ; we'll see if anyone needs . Update scripts/reference_exported_symbols.txt and src/proj_symbol_rename.h. --- src/4D_api.cpp | 2 +- src/Makefile.am | 2 +- src/apply_vgridshift.cpp | 2 +- src/apps/gie.cpp | 2 +- src/conversions/cart.cpp | 2 +- src/conversions/unitconvert.cpp | 2 +- src/factors.cpp | 2 +- src/fwd.cpp | 2 +- src/init.cpp | 2 +- src/inv.cpp | 2 +- src/lib_proj.cmake | 1 - src/nad_cvt.cpp | 2 +- src/nad_intr.cpp | 2 +- src/proj_math.h | 34 ---------------------------------- src/proj_symbol_rename.h | 27 +++++++++++++++++++++++---- src/projections/aea.cpp | 2 +- src/projections/aeqd.cpp | 2 +- src/projections/bipc.cpp | 2 +- src/projections/bonne.cpp | 2 +- src/projections/ccon.cpp | 2 +- src/projections/eqdc.cpp | 2 +- src/projections/geos.cpp | 2 +- src/projections/gnom.cpp | 2 +- src/projections/isea.cpp | 2 +- src/projections/laea.cpp | 2 +- src/projections/lcc.cpp | 2 +- src/projections/merc.cpp | 2 +- src/projections/mod_ster.cpp | 2 +- src/projections/nsper.cpp | 2 +- src/projections/oea.cpp | 2 +- src/projections/ortho.cpp | 2 +- src/projections/robin.cpp | 2 +- src/projections/sconics.cpp | 2 +- src/projections/stere.cpp | 2 +- src/projections/sterea.cpp | 2 +- src/projections/tmerc.cpp | 2 +- src/projections/tobmerc.cpp | 2 +- src/projections/tpeqd.cpp | 2 +- src/transformations/deformation.cpp | 2 +- 39 files changed, 59 insertions(+), 75 deletions(-) delete mode 100644 src/proj_math.h (limited to 'src') diff --git a/src/4D_api.cpp b/src/4D_api.cpp index 70eaac6a..db1d9516 100644 --- a/src/4D_api.cpp +++ b/src/4D_api.cpp @@ -45,7 +45,7 @@ #include "proj.h" #include "proj_experimental.h" #include "proj_internal.h" -#include "proj_math.h" +#include #include "geodesic.h" #include "proj/common.hpp" diff --git a/src/Makefile.am b/src/Makefile.am index 97f32bc7..79ca75d7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -46,7 +46,7 @@ libproj_la_LDFLAGS = -no-undefined -version-info 17:0:2 libproj_la_LIBADD = @SQLITE3_LIBS@ libproj_la_SOURCES = \ - pj_list.h proj_internal.h proj_math.h \ + pj_list.h proj_internal.h \ \ iso19111/static.cpp \ iso19111/util.cpp \ diff --git a/src/apply_vgridshift.cpp b/src/apply_vgridshift.cpp index 377e36e0..0c1db3dd 100644 --- a/src/apply_vgridshift.cpp +++ b/src/apply_vgridshift.cpp @@ -32,7 +32,7 @@ #include #include -#include "proj_math.h" +#include #include "proj_internal.h" static int is_nodata(float value, double vmultiplier) diff --git a/src/apps/gie.cpp b/src/apps/gie.cpp index 2f401984..4ae97130 100644 --- a/src/apps/gie.cpp +++ b/src/apps/gie.cpp @@ -115,7 +115,7 @@ Thomas Knudsen, thokn@sdfe.dk, 2017-10-01/2017-10-08 #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include #include "proj_strtod.h" #include "optargpm.h" diff --git a/src/conversions/cart.cpp b/src/conversions/cart.cpp index c1f6f09d..a7817443 100644 --- a/src/conversions/cart.cpp +++ b/src/conversions/cart.cpp @@ -43,7 +43,7 @@ #define PJ_LIB__ #include "proj_internal.h" -#include "proj_math.h" +#include PROJ_HEAD(cart, "Geodetic/cartesian conversions"); diff --git a/src/conversions/unitconvert.cpp b/src/conversions/unitconvert.cpp index 7ef07311..377f384e 100644 --- a/src/conversions/unitconvert.cpp +++ b/src/conversions/unitconvert.cpp @@ -71,7 +71,7 @@ Last update: 2017-05-16 #include #include "proj_internal.h" -#include "proj_math.h" +#include PROJ_HEAD(unitconvert, "Unit conversion"); diff --git a/src/factors.cpp b/src/factors.cpp index 7c59ee7a..ff733d07 100644 --- a/src/factors.cpp +++ b/src/factors.cpp @@ -2,7 +2,7 @@ #define PJ_LIB__ #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include #include diff --git a/src/fwd.cpp b/src/fwd.cpp index c267045a..3eb03582 100644 --- a/src/fwd.cpp +++ b/src/fwd.cpp @@ -32,7 +32,7 @@ #include #include "proj_internal.h" -#include "proj_math.h" +#include #define INPUT_UNITS P->left #define OUTPUT_UNITS P->right diff --git a/src/init.cpp b/src/init.cpp index ba9cddd2..1ed46e5a 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -39,7 +39,7 @@ #include "geodesic.h" #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include /**************************************************************************************/ diff --git a/src/inv.cpp b/src/inv.cpp index b9520c53..17eb15b4 100644 --- a/src/inv.cpp +++ b/src/inv.cpp @@ -31,7 +31,7 @@ #include #include "proj_internal.h" -#include "proj_math.h" +#include #define INPUT_UNITS P->right #define OUTPUT_UNITS P->left diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake index f414e955..b16032d2 100644 --- a/src/lib_proj.cmake +++ b/src/lib_proj.cmake @@ -262,7 +262,6 @@ set(SRC_LIBPROJ_CORE pj_list.h pr_list.cpp proj_internal.h - proj_math.h proj_mdist.cpp qsfn.cpp release.cpp diff --git a/src/nad_cvt.cpp b/src/nad_cvt.cpp index 76d2ccd0..79441d0a 100644 --- a/src/nad_cvt.cpp +++ b/src/nad_cvt.cpp @@ -5,7 +5,7 @@ #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include #define MAX_ITERATIONS 10 #define TOL 1e-12 diff --git a/src/nad_intr.cpp b/src/nad_intr.cpp index 8dc2f652..36ab0a99 100644 --- a/src/nad_intr.cpp +++ b/src/nad_intr.cpp @@ -2,7 +2,7 @@ #define PJ_LIB__ #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include PJ_LP nad_intr(PJ_LP t, struct CTABLE *ct) { PJ_LP val, frct; diff --git a/src/proj_math.h b/src/proj_math.h deleted file mode 100644 index ac7fc51d..00000000 --- a/src/proj_math.h +++ /dev/null @@ -1,34 +0,0 @@ -/****************************************************************************** - * Project: PROJ - * Purpose: Math support for PROJ -- now provided by system libraries - * Author: Kristian Evers - * - ****************************************************************************** - * Copyright (c) 2018, Kristian Evers - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - *****************************************************************************/ - -#ifndef PROJ_MATH_H -#define PROJ_MATH_H - -#include -#include - -#endif /* PROJ_MATH_H */ diff --git a/src/proj_symbol_rename.h b/src/proj_symbol_rename.h index b6e887ca..d71331ca 100644 --- a/src/proj_symbol_rename.h +++ b/src/proj_symbol_rename.h @@ -14,12 +14,12 @@ #define geod_lineinit internal_geod_lineinit #define geod_polygon_addedge internal_geod_polygon_addedge #define geod_polygon_addpoint internal_geod_polygon_addpoint -#define geod_polygonarea internal_geod_polygonarea #define geod_polygon_clear internal_geod_polygon_clear #define geod_polygon_compute internal_geod_polygon_compute #define geod_polygon_init internal_geod_polygon_init #define geod_polygon_testedge internal_geod_polygon_testedge #define geod_polygon_testpoint internal_geod_polygon_testpoint +#define geod_polygonarea internal_geod_polygonarea #define geod_position internal_geod_position #define geod_setdistance internal_geod_setdistance #define pj_acquire_lock internal_pj_acquire_lock @@ -69,7 +69,6 @@ #define pj_inv3d internal_pj_inv3d #define pj_is_geocent internal_pj_is_geocent #define pj_is_latlong internal_pj_is_latlong -#define pj_isnan internal_pj_isnan #define pj_latlong_from_proj internal_pj_latlong_from_proj #define pj_log internal_pj_log #define pj_malloc internal_pj_malloc @@ -91,9 +90,13 @@ #define proj_area_destroy internal_proj_area_destroy #define proj_area_set_bbox internal_proj_area_set_bbox #define proj_as_proj_string internal_proj_as_proj_string -#define proj_assign_context internal_proj_assign_context +#define proj_as_projjson internal_proj_as_projjson #define proj_as_wkt internal_proj_as_wkt +#define proj_assign_context internal_proj_assign_context +#define proj_cleanup internal_proj_cleanup #define proj_clone internal_proj_clone +#define proj_concatoperation_get_step internal_proj_concatoperation_get_step +#define proj_concatoperation_get_step_count internal_proj_concatoperation_get_step_count #define proj_context_create internal_proj_context_create #define proj_context_destroy internal_proj_context_destroy #define proj_context_errno internal_proj_context_errno @@ -101,6 +104,7 @@ #define proj_context_get_database_path internal_proj_context_get_database_path #define proj_context_get_use_proj4_init_rules internal_proj_context_get_use_proj4_init_rules #define proj_context_guess_wkt_dialect internal_proj_context_guess_wkt_dialect +#define proj_context_set_autoclose_database internal_proj_context_set_autoclose_database #define proj_context_set_database_path internal_proj_context_set_database_path #define proj_context_set_file_finder internal_proj_context_set_file_finder #define proj_context_set_search_paths internal_proj_context_set_search_paths @@ -115,6 +119,7 @@ #define proj_coordoperation_get_param_count internal_proj_coordoperation_get_param_count #define proj_coordoperation_get_param_index internal_proj_coordoperation_get_param_index #define proj_coordoperation_get_towgs84_values internal_proj_coordoperation_get_towgs84_values +#define proj_coordoperation_has_ballpark_transformation internal_proj_coordoperation_has_ballpark_transformation #define proj_coordoperation_is_instantiable internal_proj_coordoperation_is_instantiable #define proj_create internal_proj_create #define proj_create_argv internal_proj_create_argv @@ -187,8 +192,10 @@ #define proj_create_conversion_wagner_vi internal_proj_create_conversion_wagner_vi #define proj_create_conversion_wagner_vii internal_proj_create_conversion_wagner_vii #define proj_create_crs_to_crs internal_proj_create_crs_to_crs +#define proj_create_crs_to_crs_from_pj internal_proj_create_crs_to_crs_from_pj #define proj_create_cs internal_proj_create_cs #define proj_create_ellipsoidal_2D_cs internal_proj_create_ellipsoidal_2D_cs +#define proj_create_ellipsoidal_3D_cs internal_proj_create_ellipsoidal_3D_cs #define proj_create_engineering_crs internal_proj_create_engineering_crs #define proj_create_from_database internal_proj_create_from_database #define proj_create_from_name internal_proj_create_from_name @@ -208,12 +215,16 @@ #define proj_crs_alter_parameters_linear_unit internal_proj_crs_alter_parameters_linear_unit #define proj_crs_create_bound_crs internal_proj_crs_create_bound_crs #define proj_crs_create_bound_crs_to_WGS84 internal_proj_crs_create_bound_crs_to_WGS84 +#define proj_crs_create_bound_vertical_crs_to_WGS84 internal_proj_crs_create_bound_vertical_crs_to_WGS84 +#define proj_crs_create_projected_3D_crs_from_2D internal_proj_crs_create_projected_3D_crs_from_2D #define proj_crs_get_coordinate_system internal_proj_crs_get_coordinate_system #define proj_crs_get_coordoperation internal_proj_crs_get_coordoperation #define proj_crs_get_datum internal_proj_crs_get_datum #define proj_crs_get_geodetic_crs internal_proj_crs_get_geodetic_crs #define proj_crs_get_horizontal_datum internal_proj_crs_get_horizontal_datum #define proj_crs_get_sub_crs internal_proj_crs_get_sub_crs +#define proj_crs_info_list_destroy internal_proj_crs_info_list_destroy +#define proj_crs_promote_to_3D internal_proj_crs_promote_to_3D #define proj_cs_get_axis_count internal_proj_cs_get_axis_count #define proj_cs_get_axis_info internal_proj_cs_get_axis_info #define proj_cs_get_type internal_proj_cs_get_type @@ -230,15 +241,21 @@ #define proj_get_area_of_use internal_proj_get_area_of_use #define proj_get_authorities_from_database internal_proj_get_authorities_from_database #define proj_get_codes_from_database internal_proj_get_codes_from_database +#define proj_get_crs_info_list_from_database internal_proj_get_crs_info_list_from_database +#define proj_get_crs_list_parameters_create internal_proj_get_crs_list_parameters_create +#define proj_get_crs_list_parameters_destroy internal_proj_get_crs_list_parameters_destroy #define proj_get_ellipsoid internal_proj_get_ellipsoid #define proj_get_id_auth_name internal_proj_get_id_auth_name #define proj_get_id_code internal_proj_get_id_code #define proj_get_name internal_proj_get_name #define proj_get_non_deprecated internal_proj_get_non_deprecated #define proj_get_prime_meridian internal_proj_get_prime_meridian +#define proj_get_remarks internal_proj_get_remarks +#define proj_get_scope internal_proj_get_scope #define proj_get_source_crs internal_proj_get_source_crs #define proj_get_target_crs internal_proj_get_target_crs #define proj_get_type internal_proj_get_type +#define proj_grid_get_info_from_database internal_proj_grid_get_info_from_database #define proj_grid_info internal_proj_grid_info #define proj_identify internal_proj_identify #define proj_info internal_proj_info @@ -257,12 +274,14 @@ #define proj_list_units internal_proj_list_units #define proj_lp_dist internal_proj_lp_dist #define proj_lpz_dist internal_proj_lpz_dist +#define proj_normalize_for_visualization internal_proj_normalize_for_visualization #define proj_operation_factory_context_destroy internal_proj_operation_factory_context_destroy -#define proj_operation_factory_context_set_allowed_intermediate_crs internal_proj_operation_factory_context_set_allowed_intermediate_crs #define proj_operation_factory_context_set_allow_use_intermediate_crs internal_proj_operation_factory_context_set_allow_use_intermediate_crs +#define proj_operation_factory_context_set_allowed_intermediate_crs internal_proj_operation_factory_context_set_allowed_intermediate_crs #define proj_operation_factory_context_set_area_of_interest internal_proj_operation_factory_context_set_area_of_interest #define proj_operation_factory_context_set_crs_extent_use internal_proj_operation_factory_context_set_crs_extent_use #define proj_operation_factory_context_set_desired_accuracy internal_proj_operation_factory_context_set_desired_accuracy +#define proj_operation_factory_context_set_discard_superseded internal_proj_operation_factory_context_set_discard_superseded #define proj_operation_factory_context_set_grid_availability_use internal_proj_operation_factory_context_set_grid_availability_use #define proj_operation_factory_context_set_spatial_criterion internal_proj_operation_factory_context_set_spatial_criterion #define proj_operation_factory_context_set_use_proj_alternative_grid_names internal_proj_operation_factory_context_set_use_proj_alternative_grid_names diff --git a/src/projections/aea.cpp b/src/projections/aea.cpp index 721ea3c9..d1c1ad37 100644 --- a/src/projections/aea.cpp +++ b/src/projections/aea.cpp @@ -31,7 +31,7 @@ #include "proj.h" #include #include "proj_internal.h" -#include "proj_math.h" +#include # define EPS10 1.e-10 diff --git a/src/projections/aeqd.cpp b/src/projections/aeqd.cpp index 04c3662e..a187edb7 100644 --- a/src/projections/aeqd.cpp +++ b/src/projections/aeqd.cpp @@ -30,7 +30,7 @@ #include "proj.h" #include #include "proj_internal.h" -#include "proj_math.h" +#include namespace { // anonymous namespace enum Mode { diff --git a/src/projections/bipc.cpp b/src/projections/bipc.cpp index 9fd2fc6f..9e991ecc 100644 --- a/src/projections/bipc.cpp +++ b/src/projections/bipc.cpp @@ -4,7 +4,7 @@ #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include PROJ_HEAD(bipc, "Bipolar conic of western hemisphere") "\n\tConic Sph"; diff --git a/src/projections/bonne.cpp b/src/projections/bonne.cpp index 31f90907..89f69e6d 100644 --- a/src/projections/bonne.cpp +++ b/src/projections/bonne.cpp @@ -2,7 +2,7 @@ #include #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include PROJ_HEAD(bonne, "Bonne (Werner lat_1=90)") diff --git a/src/projections/ccon.cpp b/src/projections/ccon.cpp index e2312c0d..df995f21 100644 --- a/src/projections/ccon.cpp +++ b/src/projections/ccon.cpp @@ -24,7 +24,7 @@ #include #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include #define EPS10 1e-10 diff --git a/src/projections/eqdc.cpp b/src/projections/eqdc.cpp index e050a593..83443e5b 100644 --- a/src/projections/eqdc.cpp +++ b/src/projections/eqdc.cpp @@ -5,7 +5,7 @@ #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include namespace { // anonymous namespace struct pj_opaque { diff --git a/src/projections/geos.cpp b/src/projections/geos.cpp index 15f51e6f..62b66a19 100644 --- a/src/projections/geos.cpp +++ b/src/projections/geos.cpp @@ -34,7 +34,7 @@ #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include namespace { // anonymous namespace struct pj_opaque { diff --git a/src/projections/gnom.cpp b/src/projections/gnom.cpp index f7cb2635..23dee030 100644 --- a/src/projections/gnom.cpp +++ b/src/projections/gnom.cpp @@ -5,7 +5,7 @@ #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include PROJ_HEAD(gnom, "Gnomonic") "\n\tAzi, Sph"; diff --git a/src/projections/isea.cpp b/src/projections/isea.cpp index c22e143d..b1841338 100644 --- a/src/projections/isea.cpp +++ b/src/projections/isea.cpp @@ -15,7 +15,7 @@ #define PJ_LIB__ #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include #define DEG36 0.62831853071795864768 #define DEG72 1.25663706143591729537 diff --git a/src/projections/laea.cpp b/src/projections/laea.cpp index 8a23c504..a1e4bf8f 100644 --- a/src/projections/laea.cpp +++ b/src/projections/laea.cpp @@ -2,7 +2,7 @@ #include #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include PROJ_HEAD(laea, "Lambert Azimuthal Equal Area") "\n\tAzi, Sph&Ell"; diff --git a/src/projections/lcc.cpp b/src/projections/lcc.cpp index beb2efd1..02530d5b 100644 --- a/src/projections/lcc.cpp +++ b/src/projections/lcc.cpp @@ -2,7 +2,7 @@ #include #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include PROJ_HEAD(lcc, "Lambert Conformal Conic") "\n\tConic, Sph&Ell\n\tlat_1= and lat_2= or lat_0, k_0="; diff --git a/src/projections/merc.cpp b/src/projections/merc.cpp index 10b8bb90..a77d7517 100644 --- a/src/projections/merc.cpp +++ b/src/projections/merc.cpp @@ -5,7 +5,7 @@ #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include PROJ_HEAD(merc, "Mercator") "\n\tCyl, Sph&Ell\n\tlat_ts="; PROJ_HEAD(webmerc, "Web Mercator / Pseudo Mercator") "\n\tCyl, Ell\n\t"; diff --git a/src/projections/mod_ster.cpp b/src/projections/mod_ster.cpp index 8e02ea72..c7a8e899 100644 --- a/src/projections/mod_ster.cpp +++ b/src/projections/mod_ster.cpp @@ -3,7 +3,7 @@ #include #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include PROJ_HEAD(mil_os, "Miller Oblated Stereographic") "\n\tAzi(mod)"; PROJ_HEAD(lee_os, "Lee Oblated Stereographic") "\n\tAzi(mod)"; diff --git a/src/projections/nsper.cpp b/src/projections/nsper.cpp index d641e1b6..059b9f71 100644 --- a/src/projections/nsper.cpp +++ b/src/projections/nsper.cpp @@ -2,7 +2,7 @@ #include #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include namespace { // anonymous namespace enum Mode { diff --git a/src/projections/oea.cpp b/src/projections/oea.cpp index ac0f643f..cbedf0c0 100644 --- a/src/projections/oea.cpp +++ b/src/projections/oea.cpp @@ -2,7 +2,7 @@ #include #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include PROJ_HEAD(oea, "Oblated Equal Area") "\n\tMisc Sph\n\tn= m= theta="; diff --git a/src/projections/ortho.cpp b/src/projections/ortho.cpp index 94764756..34b6b689 100644 --- a/src/projections/ortho.cpp +++ b/src/projections/ortho.cpp @@ -2,7 +2,7 @@ #include #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include PROJ_HEAD(ortho, "Orthographic") "\n\tAzi, Sph"; diff --git a/src/projections/robin.cpp b/src/projections/robin.cpp index c08ac0e2..2e36106a 100644 --- a/src/projections/robin.cpp +++ b/src/projections/robin.cpp @@ -1,7 +1,7 @@ #define PJ_LIB__ #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include PROJ_HEAD(robin, "Robinson") "\n\tPCyl, Sph"; diff --git a/src/projections/sconics.cpp b/src/projections/sconics.cpp index 1a16fe24..60965c21 100644 --- a/src/projections/sconics.cpp +++ b/src/projections/sconics.cpp @@ -2,7 +2,7 @@ #include #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include namespace { // anonymous namespace diff --git a/src/projections/stere.cpp b/src/projections/stere.cpp index 683d484c..afcf5f02 100644 --- a/src/projections/stere.cpp +++ b/src/projections/stere.cpp @@ -2,7 +2,7 @@ #include #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include PROJ_HEAD(stere, "Stereographic") "\n\tAzi, Sph&Ell\n\tlat_ts="; PROJ_HEAD(ups, "Universal Polar Stereographic") "\n\tAzi, Sph&Ell\n\tsouth"; diff --git a/src/projections/sterea.cpp b/src/projections/sterea.cpp index ca3bfd06..55404c86 100644 --- a/src/projections/sterea.cpp +++ b/src/projections/sterea.cpp @@ -27,7 +27,7 @@ #include #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include namespace { // anonymous namespace diff --git a/src/projections/tmerc.cpp b/src/projections/tmerc.cpp index bb56f8ae..5c76b141 100644 --- a/src/projections/tmerc.cpp +++ b/src/projections/tmerc.cpp @@ -17,7 +17,7 @@ #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include PROJ_HEAD(tmerc, "Transverse Mercator") "\n\tCyl, Sph&Ell\n\tapprox"; diff --git a/src/projections/tobmerc.cpp b/src/projections/tobmerc.cpp index 7215f0db..a1616036 100644 --- a/src/projections/tobmerc.cpp +++ b/src/projections/tobmerc.cpp @@ -5,7 +5,7 @@ #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include PROJ_HEAD(tobmerc, "Tobler-Mercator") "\n\tCyl, Sph"; diff --git a/src/projections/tpeqd.cpp b/src/projections/tpeqd.cpp index b306968c..0bc3be87 100644 --- a/src/projections/tpeqd.cpp +++ b/src/projections/tpeqd.cpp @@ -1,7 +1,7 @@ #define PJ_LIB__ #include #include "proj.h" -#include "proj_math.h" +#include #include "proj_internal.h" diff --git a/src/transformations/deformation.cpp b/src/transformations/deformation.cpp index 5bb86909..b9e881eb 100644 --- a/src/transformations/deformation.cpp +++ b/src/transformations/deformation.cpp @@ -55,7 +55,7 @@ grid-values in units of mm/year in ENU-space. #include #include "proj.h" #include "proj_internal.h" -#include "proj_math.h" +#include PROJ_HEAD(deformation, "Kinematic grid shift"); -- cgit v1.2.3