aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Karney <charles@karney.com>2019-09-19 08:30:21 -0400
committerGitHub <noreply@github.com>2019-09-19 08:30:21 -0400
commit8948068deaa8b1b9cf14e7e509d06abc3a0b8dcf (patch)
treed27e655be51c44ef5d2c26dee0cc22547a36b029 /src
parent72203ca68e123a237c8c748d39131b702ea4b646 (diff)
parent21c6d9cccde9318dd38c60b8bc559508bcee1a91 (diff)
downloadPROJ-8948068deaa8b1b9cf14e7e509d06abc3a0b8dcf.tar.gz
PROJ-8948068deaa8b1b9cf14e7e509d06abc3a0b8dcf.zip
Merge pull request #1618 from cffk/c99-math-update
Remove unneeded C99 compatibility functions from math.cpp and proj_math.h I'll do the clean up of the -std=c89 flags etc. as a separate pull request.
Diffstat (limited to 'src')
-rw-r--r--src/4D_api.cpp2
-rw-r--r--src/Makefile.am4
-rw-r--r--src/apply_vgridshift.cpp2
-rw-r--r--src/apps/gie.cpp2
-rw-r--r--src/conversions/cart.cpp2
-rw-r--r--src/conversions/unitconvert.cpp2
-rw-r--r--src/factors.cpp2
-rw-r--r--src/fwd.cpp2
-rw-r--r--src/geodesic.c4
-rw-r--r--src/init.cpp2
-rw-r--r--src/inv.cpp2
-rw-r--r--src/lib_proj.cmake2
-rw-r--r--src/math.cpp108
-rw-r--r--src/nad_cvt.cpp2
-rw-r--r--src/nad_intr.cpp2
-rw-r--r--src/proj_math.h90
-rw-r--r--src/proj_symbol_rename.h27
-rw-r--r--src/projections/aea.cpp2
-rw-r--r--src/projections/aeqd.cpp2
-rw-r--r--src/projections/bipc.cpp2
-rw-r--r--src/projections/bonne.cpp2
-rw-r--r--src/projections/ccon.cpp2
-rw-r--r--src/projections/eqdc.cpp2
-rw-r--r--src/projections/geos.cpp2
-rw-r--r--src/projections/gnom.cpp2
-rw-r--r--src/projections/isea.cpp2
-rw-r--r--src/projections/laea.cpp2
-rw-r--r--src/projections/lcc.cpp2
-rw-r--r--src/projections/merc.cpp2
-rw-r--r--src/projections/mod_ster.cpp2
-rw-r--r--src/projections/nsper.cpp2
-rw-r--r--src/projections/oea.cpp2
-rw-r--r--src/projections/ortho.cpp2
-rw-r--r--src/projections/robin.cpp2
-rw-r--r--src/projections/sconics.cpp2
-rw-r--r--src/projections/stere.cpp2
-rw-r--r--src/projections/sterea.cpp2
-rw-r--r--src/projections/tmerc.cpp2
-rw-r--r--src/projections/tobmerc.cpp2
-rw-r--r--src/projections/tpeqd.cpp2
-rw-r--r--src/transformations/deformation.cpp2
41 files changed, 60 insertions, 245 deletions
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 <math.h>
#include "geodesic.h"
#include "proj/common.hpp"
diff --git a/src/Makefile.am b/src/Makefile.am
index fe7f2572..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 \
@@ -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/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 <stdio.h>
#include <string.h>
-#include "proj_math.h"
+#include <math.h>
#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 <math.h>
#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 <math.h>
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 <time.h>
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
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 <math.h>
#include <errno.h>
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 <math.h>
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
#define INPUT_UNITS P->left
#define OUTPUT_UNITS P->right
diff --git a/src/geodesic.c b/src/geodesic.c
index 5504cb3b..49c9823e 100644
--- a/src/geodesic.c
+++ b/src/geodesic.c
@@ -24,11 +24,7 @@
*/
#include "geodesic.h"
-#ifdef PJ_LIB__
-#include "proj_math.h"
-#else
#include <math.h>
-#endif
#if !defined(HAVE_C99_MATH)
#define HAVE_C99_MATH 0
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 <math.h>
/**************************************************************************************/
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 <math.h>
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
#define INPUT_UNITS P->right
#define OUTPUT_UNITS P->left
diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake
index d1d6f766..b16032d2 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
@@ -263,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/math.cpp b/src/math.cpp
deleted file mode 100644
index 540ab9eb..00000000
--- a/src/math.cpp
+++ /dev/null
@@ -1,108 +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;
-}
-
-#if !(defined(HAVE_C99_MATH) && HAVE_C99_MATH)
-
-/* 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 ) );
- }
-}
-
-/* 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 = log1p(y * (1 + y/(hypot(1.0, y) + 1)));
- return x > 0 ? y : (x < 0 ? -y : 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)
- 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 { /* Includes NaN */
- t = floor(x);
- return 0.5 < x - t ? t + 1 : t;
- }
-}
-
-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;
- return r;
-}
-
-#endif /* !(defined(HAVE_C99_MATH) && HAVE_C99_MATH) */
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 <math.h>
#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 <math.h>
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 5aea494d..00000000
--- a/src/proj_math.h
+++ /dev/null
@@ -1,90 +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.
- *****************************************************************************/
-
-#ifndef PROJ_MATH_H
-#define PROJ_MATH_H
-
-#include <math.h>
-#include <limits.h>
-
-#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
-
-double pj_hypot(double x, double y);
-double pj_log1p(double x);
-double pj_asinh(double x);
-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
-
-
-#ifdef isnan
-#undef isnan
-#endif
-
-#define isnan pj_isnan
-
-#endif /* !(defined(HAVE_C99_MATH) && HAVE_C99_MATH) */
-
-#ifdef __cplusplus
-}
-#endif
-
-#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 d607c95a..7b5c0fb5 100644
--- a/src/projections/aea.cpp
+++ b/src/projections/aea.cpp
@@ -31,7 +31,7 @@
#include "proj.h"
#include <errno.h>
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
# 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 <errno.h>
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
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 <math.h>
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 <errno.h>
#include "proj.h"
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
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 <errno.h>
#include "proj.h"
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
#define EPS10 1e-10
diff --git a/src/projections/eqdc.cpp b/src/projections/eqdc.cpp
index 00aacfda..84e37910 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 <math.h>
namespace { // anonymous namespace
struct pj_opaque {
diff --git a/src/projections/geos.cpp b/src/projections/geos.cpp
index 7999b21f..fcd7d4ee 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 <math.h>
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 <math.h>
PROJ_HEAD(gnom, "Gnomonic") "\n\tAzi, Sph";
diff --git a/src/projections/isea.cpp b/src/projections/isea.cpp
index d1aeab4a..c712d7ea 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 <math.h>
#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 <errno.h>
#include "proj.h"
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
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 <errno.h>
#include "proj.h"
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
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 <math.h>
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 <errno.h>
#include "proj.h"
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
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 <errno.h>
#include "proj.h"
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
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 <errno.h>
#include "proj.h"
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
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 <errno.h>
#include "proj.h"
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
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 <math.h>
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 <errno.h>
#include "proj.h"
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
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 <errno.h>
#include "proj.h"
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
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 <errno.h>
#include "proj.h"
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
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 <math.h>
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 <math.h>
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 <errno.h>
#include "proj.h"
-#include "proj_math.h"
+#include <math.h>
#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 <errno.h>
#include "proj.h"
#include "proj_internal.h"
-#include "proj_math.h"
+#include <math.h>
PROJ_HEAD(deformation, "Kinematic grid shift");