aboutsummaryrefslogtreecommitdiff
path: root/src/PJ_aea.c
AgeCommit message (Collapse)Author
2018-12-26cpp conversion: minimal steps to fix compilation errors, not warningsEven Rouault
2018-04-16Collect custom C99 math functions in proj_math.hKristian Evers
We are relying more and more on C99 math functions. On C89 systems where those functions are not available our own custom versions of those functions are used instead. So far these has been spread across the code base. This commit gathers them in the same file and introduces the proj_math.h header. The build system checks for C99 math functions. If not found the proj_math.h header make sure that C99 functions are defined as their pj_ equivalent. Ideally proj_math.h is included instead of math.h. This removes the need for any checks against HAVE_C99_MATH in the code making it easier to read. For this commit the functions hypot, log1p and asinh has been taken care of.
2018-03-11Remove angle brackets for proj headers (#849)Thomas Knudsen
* Avoid using angle brackets for PROJ headers. Switching from #include <proj.h> to #include "proj.h", and correspondingly for projects.h and proj_api.h, reduces the risk of accidentally picking up a system installed older version of the header while building a new version of PROJ. * Also handle geodesic.h
2017-11-13Removed remaining traces of the built in selftest system (#661)Thomas Knudsen
* Removed remaining traces of the builtin selftest system. Moved all functionality to test/gie * Updated Appveyor and Travis build scripts * Another appveyor script update
2017-11-11Fix various memory leaks. Fixes ↵Even Rouault
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3573 , https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3643 and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3641 . Credit to OSS Fuzz
2017-10-12Remove first batch of internal self tests, now moved to builtins.gie:Thomas Knudsen
All projections starting with "a". Replace with stubs returning 10000. The two PJ_apply_?gridhift.c files have not been touched
2017-10-06Enable default destructor for all PJ objects.Thomas Knudsen
In most cases memory deallocation is completely removed from the code since it can be handled by the default destructor. In a few special cases a local destructor overrides the default destructor and makes sure that locally allocated memored is cleaned up correctly. Move all deallocation from pj_free to pj_default_destructor Rename pj_latlong.c to fit with the conventional format PJ_latlong.c - freeup was missed here due to wrong naming Clean up pj_init to avoid double deallocation; Also resolve #576 by adding z_0 and t_0 options in pj_init, while cleaning Add a prototype for dealloc_params Added missing errno.h include in pj_ctx.c Temporarily removing ob_tran from testvarious, to be sure that is where the trouble is Make PJ_ob_tran.c use proper initialization for the chained projection proj=ob_tran: make it clear, that we disallow ellipsoidal projections, and, for improved backwards compatibility, turns off default settings, which could inject unwanted ellipsoid definitions ... then also remove the ellipsoid definition from the testvarious test case - which is probably buggy anyway Work around cs2cs spherical init bug in testvarious; Forbid defs for ob_tran in pj_init
2017-08-20PJ_aea.c: fix memory leak in error code path. Fixes ↵Even Rouault
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2723. Credit to OSS Fuzz
2017-07-18Expanded *_ERROR* macros.Kristian Evers
Expanded *_ERROR* macros with calls to proj_errno_set() and proper returns when necessary. Defined a bunch of new PJD_ERR_ constants in projects.h that corresponds to the error numbers in pj_strerrno.c. A few unknown error numbers were replaced by existing ones in pj_strerrno.c.
2017-05-24Avoid zero division in PJ_aea.c setup().Kristian Evers
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1791 Credit to OSS-Fuzz.
2017-05-24Mixed whitespace. Replace tabs with spaces.Kristian Evers
2017-04-18Fix aea projection return value in case of error (#503)maximchurilin
2016-12-18Not using proper spherical earth in tests that use a spherical projection. ↵Kristian Evers
+a replaced with +R
2016-08-22Changed self-test build behaviour from opt-out to opt-inKristian Evers
2016-05-28Change math constants, similar to PR #372. Use M_ namespace with the de ↵Micah Cochran
facto standard M_PI and its ilk. Change names that are widely used in the project to be in the M_ namespace, so HALFPI becomes M_HALFPI. HALFPI is #defined as M_PI_2 (the defacto standard name). #defines _USE_MATH_DEFINES for MS Visual Studio (I didn't personally test this part, but Appveyor will not build otherwise).
2016-05-19Removed a few superfluous assignments and an erroneously committed fileThomas Knudsen
An intermediate file, PJ_etmerc.c, was mistakenly committed in 1b17a573ffb07e9565e0df296e2a3a21bce8e971 P->pfree and P->descr were being identically reinitialized in a few of the first files converted - and in the last: proj_etmerc.c
2016-05-18Adding a missing #endifThomas Knudsen
PJ_aea.c lost one line too many when removing the final stubs in the previous commit.
2016-05-18Refactoring and adding self test for the last two projectionsThomas Knudsen
etmerc and utm completes the elimination of the ENTRYx style macros.
2016-05-04Converted schKristian Evers
2016-05-04Converted latlong. Added passing selftest in order to build.Kristian Evers
2016-05-04Converted geocent. Only testing ellipsoidal input/output - need to check the ↵Kristian Evers
spherical case
2016-05-04Converted ob_tranKristian Evers
2016-05-04Converted rouss. proj_rouss.c should probably be renamed to PJ_rouss.c at ↵Kristian Evers
some point.
2016-05-04Converted vandg4Kristian Evers
2016-05-04Converted vandg2 and vandg3Kristian Evers
2016-05-04Converted vandgKristian Evers
2016-05-03Converted eqdcKristian Evers
2016-05-03Converted eqcKristian Evers
2016-05-03Converted aeqdKristian Evers
2016-05-03Converted rpolyKristian Evers
2016-05-03Converted robinKristian Evers
2016-05-03Converted qscKristian Evers
2016-05-03Converted putp6 and putp6pKristian Evers
2016-05-03Converted putp5 and putp5pKristian Evers
2016-05-03Converted putp4p and werenKristian Evers
2016-05-03Converted putp3 and putp3pKristian Evers
2016-05-03Converted putp2Kristian Evers
2016-05-03Converted polyKristian Evers
2016-05-03Converted pattersonKristian Evers
2016-05-03Converted orthoKristian Evers
2016-05-03Converted omerc. Redined Q-variable in e_forward to W in an effort to keep ↵Kristian Evers
the mapping P->opaque = Q the same across all projections
2016-05-02Converted oea. And removed parentheses in return statements in ocea.Kristian Evers
2016-05-02Converted oceaKristian Evers
2016-05-01Converted nzmgKristian Evers
2016-05-01Converted nsper and tpersKristian Evers
2016-05-01Converted nicol, which oddly enough is placed in PJ_nocol.c. Typo?Kristian Evers
2016-05-01Converted nell_hKristian Evers
2016-05-01Converted nellKristian Evers
2016-05-01Converted natearth2Kristian Evers
2016-05-01Converted natearthKristian Evers