aboutsummaryrefslogtreecommitdiff
path: root/src/PJ_isea.c
AgeCommit message (Collapse)Author
2018-05-30Fix warnings found by clang with new warning flags to be added in later commitEven Rouault
Fixes consist in: - no use of comma operator for multi statement purpose - avoid confusing comma in for loops first and third clauses - avoid implicit long to int casts by storing to long, or explicit bound checking before cast
2018-05-24Handle double to int typecasts in ISEA betterKristian Evers
Originally the code was doing double to int conversions like y = (int)(x + 0.5) which results in rounding when typecasting. In an earlier attempt to avoid buffer overflows in integer typecasts this was changed to y = lround(x + 0.5) which doesn't give the origial results. We fix that here by instead doing y = lround(x) It is safe to so as long as x is positive.
2018-05-23Merge branch 'master' into return-nans-quicklyKristian Evers
2018-05-20isea: Use PJ_TODEG and PJ_TORAD (#991)Kurt Schwehr
2018-05-19Partial clean isea defines and includesKurt Schwehr
- Move includes to the top - Move #defines to the top after includes - Get M_PI and DEG90 from projects.h
2018-05-15IWYU: Partial PJ_gstmerc.c..PJ_molodensky.cKurt Schwehr
2018-05-13ISEA_STATIC -> static (#995)Kurt Schwehr
As this is a part of PROJ, having these functions possibly not static is confusing. Time to declare this is just a part of PROJ.
2018-05-08Replace int typecasts with calls to lround to avoid bad conversions on NaN ↵Kristian Evers
input. Added test to check for those cases.
2018-05-07Clean readability-redundant-control-flow clang-tidy warningsKristian Evers
2018-04-22More cleanup and fix last commitKurt Schwehr
Tried building before committing time
2018-04-22PJ_isea.c: change local helper functions to void returnsKurt Schwehr
The return values are not used and do not mean anything. Similar to #423
2018-03-14Add a few cppcheck suppressionsEven Rouault
2018-03-14fixupEven Rouault
2018-03-14PJ_isea.c: Remove unused structureEven Rouault
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
2018-01-09Remove or use unused macrosAaron Puchert
Some macros seemed to be leftover from earlier code, so I removed them. Others seemed like they should have been used, but weren't. There should be no functional change, except the following: in floating- point arithmetic, x / y is not the same as x * (1.0 / y). It can be argued that using the multiplication is significantly faster, and the algorithm is approximative anyway. Otherwise, the constants are obviously not required. Also fixes one location in PJ_aitoff.c, where an enumeration value should have been used.
2017-12-17Declare non-local variables as const where possibleAaron Puchert
Having non-const variables of static lifetime or even global scope is usually a bad idea. These variables are inherently constants, and this should be enforced. This required marking some functions as not modifying input parameters and marking some pointers as pointers to const. One advantage is that the compiler usually puts const static variables in a read-only code segment, so they can't be modified physically. This can be verified with `nm` (on POSIX systems). To avoid changes to the public API, functions returning non-const pointers to data tables were left intact, but the returned data may not be modified. Internally we prefer using the proj_list_* functions over the pj_get_*_ref functions, because the former return const pointers.
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 h, i, j, kThomas Knudsen
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-02-26Raise MSVC warning level to /W4Even Rouault
2017-02-26Fix warnings related to -Wshadow -Wnull-dereference -Wfloat-conversionr ↵Even Rouault
-Wmissing-prototypes -Wmissing-declarations
2016-12-12Add a scripts/fix_typos.sh script and correct reported errorsEven Rouault
2016-08-22Changed self-test build behaviour from opt-out to opt-inKristian Evers
2016-08-18whitespace normalization for proj 4.9.3RC3Howard Butler
2016-04-20Portability cleanups for the code in PR #5Thomas Knudsen
Eliminated load time non-constant initializers, mixed code/declarations and C++ style comments. A lot of non-constant initializers remain in PJ_healpix. Should probably be handled before next release.
2016-04-19Converted iseaKristian Evers
2016-04-18Expanded tabs and removed trailing whitespace in an attempt at getting ↵Kristian Evers
cleaner diffs for upcomming commits.
2015-06-20Remove dead assignments.Elliott Sales de Andrade
These variables are re-written immediately after.
2015-05-30Remove unused variables.Elliott Sales de Andrade
2015-05-30Fix warnings about structure initializers.Elliott Sales de Andrade
2015-05-30Fix unused function argument warnings.Elliott Sales de Andrade
2013-10-21remove unused variablesFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2402 4e78687f-474d-0410-85f9-8d5e500ac6b2
2012-02-26Removed some unused code in an effort to get a clean build.Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2173 4e78687f-474d-0410-85f9-8d5e500ac6b2
2012-02-21try again to fix M_PI for MSVCFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2169 4e78687f-474d-0410-85f9-8d5e500ac6b2
2012-02-21preliminary addition of Icosahedral Snyder Equal Area projection (#111)Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2165 4e78687f-474d-0410-85f9-8d5e500ac6b2