aboutsummaryrefslogtreecommitdiff
path: root/src/PJ_stere.c
AgeCommit message (Collapse)Author
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-12Remove selftests from projection files starting with r,s,t,uThomas Knudsen
2017-11-06Use enumerations where appropriateAaron Puchert
Enumerations have the following advantages over #define: - they clearly connect a variable and the allowed constants, - the meaning of code is not obfuscated by integer values, - they are visible to the compiler, which can warn about (possibly) incorrect usage. There should be no functional change.
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-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-23Avoid zero division in PJ_stere e_forward().Kristian Evers
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=1797 Credit to OSS-Fuzz.
2017-02-26Recent clang (e.g MacOSX) warning fixes related to double to _Bool implicit ↵Even Rouault
conversions
2017-02-25Fix GCC 7 warnings related to misleading indentations, fallthrough cases and ↵Even Rouault
unused variable
2016-12-18Not using proper spherical earth in tests that use a spherical projection. ↵Kristian Evers
+a replaced with +R
2016-10-18Fixed issue #194 (Bug with the stereographic projection at equator) that ↵Kristian Evers
multiplied equatorial coordinates by 2
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-04-14Convert somerc, stere, ups, sterea, kav5, fouc, mbt_s,, qua_autThomas Knudsen
i.e. the files PJ_somerc.c, PJ_stere.c, PJ_sterea.c, PJ_sts.c 47 projections converted so far - 95 to go...
2015-05-29Fix inverse stereo projection on an ellipsoid.Glynn Clements
The problem is that the setup function doesn't initialise all of the values that it needs for the ellipsoid, inverse, equatorial case. In the forward and spherical inverse cases, the equatorial case (|phi0| < 1e-10) is a simplification of the oblique case, and requires fewer parameters. However, for the ellipsoid inverse case (e_inverse), the oblique calculation is used, but the setup function doesn't initialise all of the parameters.
2012-03-03cleanup odd code construct in PJ_stere and extend stere testing a bit (#147)Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2180 4e78687f-474d-0410-85f9-8d5e500ac6b2
2010-06-11roll projCtx through various other low level functionsFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1856 4e78687f-474d-0410-85f9-8d5e500ac6b2
2009-01-26remove SCCSID and lint stuff from all source filesFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1515 4e78687f-474d-0410-85f9-8d5e500ac6b2
2001-02-07Cleaned up various warnings when compiled with -Wall.Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@906 4e78687f-474d-0410-85f9-8d5e500ac6b2
1999-03-18NewFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@776 4e78687f-474d-0410-85f9-8d5e500ac6b2