aboutsummaryrefslogtreecommitdiff
path: root/src/PJ_healpix.c
AgeCommit message (Collapse)Author
2018-12-26cpp conversion: minimal steps to fix compilation errors, not warningsEven Rouault
2018-12-24Fixed rHealpix projection, closing #1206.Phil Elson
Numerical test results based on function output, rather than mathematical derivation. Verified global coverage with graphical eyeballing through cartopy.
2018-10-06Make PROJ_HEAD descriptions more uniformIvan Veselov
Before that, approximately half of the descriptions had a period at the end, e.g. 'Cyl.' or 'Sph.' and the other half did not have those periods. This commit drops all the dots in PROJ_HEAD descriptions.
2018-05-15IWYU: Partial PJ_gstmerc.c..PJ_molodensky.cKurt Schwehr
2018-05-04Convert errno literals to corresponding PJD symbolKurt Schwehr
2018-03-11Remove 'pj_' prefix from static functionsKristian Evers
Functions should only be prefixed with 'pj_' when they can be used in other parts of the code base and not just within a single file. Takes care of the last step in #675.
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-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-25Overhaul ellipsoid handling (#682)Thomas Knudsen
Improve error messaging for cct and gie, and do some clean ups in the ellipsoid handling - partially to squash bugs, partially to improve naming consistency which, in turn, improves the readability of the ellipsoid handling code. Renamed functions: pj_inherit_ellipsoid_defs has been renamed pj_inherit_ellipsoid_def, while pj_calc_ellps_params has been renamed pj_calc_ellipsoid_params. The code in get_opt (part of pj_init.c), which handles whether or not an ellipsoid definition should be dragged in from proj_def.dat, has been rewritten. I suspect this was buggy beforehand, and at least the new code is easier to follow (although it may be slightly slower, which is not really a problem as it sits in the setup code, and hence is executed only once).
2017-11-20Replace pj_ell_set with reimplementation... (#675)Thomas Knudsen
* Replace pj_ell_set with reimplementation supporting ellipsoid inheritance * remove unreachable code from pj_ell_set.c * Swap steps, so ellps args are read first, in accordance with historical behaviour * Add ellipsoid tests to CI targets * Reduce some optimistic tolerances OS/X appears to have a slightly off float handling, resulting in differences at the nanometer level. Switching to 10 nm.
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-19Prevent crashes and leaks on allocation failure (#606)Aaron Puchert
* Prevent crashes and leaks on allocation failure Memory allocation can fail. We need to gracefully handle this case and prevent dereferencing null pointers. * Make NULL checks consistent within a file * Properly report allocation errors * Improve cleanup in pj_gc_reader.c * Implement pj_strdup and use instead of strdup The function strdup is not part of ANSI C 89, but a POSIX extension. Therefore we can not rely on it being available on all platforms.
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-28Enable cppcheck and fix related mostly false-positive warningsEven Rouault
2017-02-26Raise MSVC warning level to /W4Even Rouault
2017-02-26Recent clang (e.g MacOSX) warning fixes related to double to _Bool implicit ↵Even Rouault
conversions
2017-02-26Fix warnings related to -Wshadow -Wnull-dereference -Wfloat-conversionr ↵Even Rouault
-Wmissing-prototypes -Wmissing-declarations
2016-12-18Not using proper spherical earth in tests that use a spherical projection. ↵Kristian Evers
+a replaced with +R
2016-12-12Add a scripts/fix_typos.sh script and correct reported errorsEven Rouault
2016-10-14Replace calls to fabls with fabs (not using long doubles anyway). Fixes #426.Kristian Evers
2016-08-22Changed self-test build behaviour from opt-out to opt-inKristian Evers
2016-07-13Cosmetic changes to improve readabilityKristian Evers
2016-07-13Fixed a few errors that occured during refactoringKristian Evers
2016-07-13Eliminated load time non-computable initializers in healpixKristian 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-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 healpix and rhealpixKristian Evers
2016-04-18Expanded tabs and removed trailing whitespace in an attempt at getting ↵Kristian Evers
cleaner diffs for upcomming commits.
2015-05-31Remove unused $Id$ keywords.Elliott Sales de Andrade
2015-05-30Fix unused function argument warnings.Elliott Sales de Andrade
2013-10-03fix windows build for healpix (#223)Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2386 4e78687f-474d-0410-85f9-8d5e500ac6b2
2013-07-19major healpix update, fix polar scaling (#219)Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2378 4e78687f-474d-0410-85f9-8d5e500ac6b2
2013-06-25fix variable declaration order to be C (and msvc) legalFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2362 4e78687f-474d-0410-85f9-8d5e500ac6b2
2013-06-19fix unused variable warnings in healpixFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2341 4e78687f-474d-0410-85f9-8d5e500ac6b2
2013-06-18rename and hide sign() functionFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2338 4e78687f-474d-0410-85f9-8d5e500ac6b2
2012-07-05incorporate polar fix (#176)Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2226 4e78687f-474d-0410-85f9-8d5e500ac6b2
2012-02-20fix windows build issues (#133)Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2161 4e78687f-474d-0410-85f9-8d5e500ac6b2
2011-12-14added Healpix projectionFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2125 4e78687f-474d-0410-85f9-8d5e500ac6b2