aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-12-17Merge pull request #713 from kbevers/travis-c89Kristian Evers
Add -std=c89 to travis targets
2017-12-17Add -std=c89 to travis targets.Kristian Evers
The multistresstest code has been made C89 compliant in the process.
2017-12-17Normalize whitespace in multistresstest.cKristian Evers
2017-12-17Free format everywhere (#693)Thomas Knudsen
* Free format now in cmd lines, in gie, and in init files * Corrected handling of defaults * Add demo of integrated definition and validation * Repair stack-smashing memmove in get_init * repair paralist corruption, clean up debug output * Install test files for nmake builds * Add many improvements following suggestions by @schwehr * Be consistent in requiring lower case everywhere in gie.c Also, this Fixes #703 and Fixes #697
2017-12-17Fix integer overflow in unitconvert.Kristian Evers
For sufficiently large values of modified julian date the mjd_to_yyyymmdd function would integer overflow in the calculation of the return value. This is fixed by implicit type conversion. Credit to OSS-Fuzz. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4658 and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4667
2017-12-16Merge pull request #706 from kbevers/deformation-updateKristian Evers
Updates to deformation operation.
2017-12-14Add time unit yyyymmdd to unitconvert operation (#707)Kristian Evers
Add time unit yyyymmdd to unitconvert operation
2017-12-14Updates to deformation operation.Kristian Evers
The initial approach taken in the deformation operation was not geodetically sound. The deformation model grids were required to be indexed in lat/long space with the velocities in the grids being in cartesian space. This is quite confusing and it is not a normal way of making deformation models. The usual approach is to keep everything in the east, north, up, or ENU, space. We adopt that tradition in this commit. The velocities are still applied in cartesian space which requires that the grid-velocities are converted from ENU space to cartesian space. As a consequence of this change the operation is changed so that it only works in full 3D mode. That is, both horizontal and vertical grids need to be applied. The inverse operation is changed slightly to accommodate the now fully 3D transformation. In it's present form it is a modification to the original algorithm that also includes the vertical component in the iteration. This is necessary to get a proper mapping from ENU to cartesian space in the loop. The vertical component is overwritten with the initial z-correction at the end of the loop. This approach is not completely accurate and will introduce errors, especially when doing many roundtrip calculations, but it seems to be good enough for a few roundtrips. The PJ_ENU data type is re-introduced to better communicate the what state the grid corrections are in throughout the code.
2017-12-11Allow including the new API header in proj.cAaron Puchert
This didn't work before because the elaborate type punning scheme was deactivated by including proj.h. Now we use the type punning from the new API header and build our own. This change is required for #674.
2017-12-06Use approximate equations instead of exact as default in Helmert.Kristian Evers
2017-12-06Use t_epoch and t_obs instead of epoch and tobs.Kristian Evers
Prefixing with t_ is more consistent with the existing parameters in PROJ, such as x_0 and friends. t_epoch and t_obs is already used in PJ_deformation. Now users can expect consistency across time-varying transformations.
2017-11-29Fix bad typedef that surfaces when including proj.h and proj_api.h in the ↵Kristian Evers
same file (#687) Fix bad typedef that surfaces when including proj.h and proj_api.h in the same file
2017-11-28Merge remote-tracking branch 'aaronpuchert/static-assert'Even Rouault
2017-11-28Free formatting of PROJ key=value pairsThomas Knudsen
2017-11-28Enable selective debug printout through negative PROJ_DEBUG values (#689)Thomas Knudsen
* Enable selective debug printout through negative PROJ_DEBUG values
2017-11-28Add tests for GDA2020 (#688)Thomas Knudsen
Add GDA2020 tests, and correct the PJ_helmert bug they revealed
2017-11-27Replace some asserts by compile-time assertionsAaron Puchert
Decisions regarding the size of certain types are always made at compile time, hence this is where the assertion should take place. If the assertions fail, there is now a compiler error.
2017-11-27gie support for builtin errcodes, and other improvements (#684)Thomas Knudsen
* gie support for builtin errcodes, and other improvements * allow lower case error constants
2017-11-26pj_ctx_set_debug(): avoid null pointer dereference when called with ctx == ↵Even Rouault
NULL. Found by cppcheck
2017-11-26axisswap: validate axis number. Fixes ↵Even Rouault
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4404. Credit to OSS Fuzz
2017-11-25Improve API (#683)Thomas Knudsen
Increase the focus on PJ_COORD as primary datatype: Eliminate use of PJ_TRIPLET etc. Trim proj.h by removing material that has become unnecessary. Improve constness Make proj_factors work in proj.h space, by providing a trimmed down PJ_FACTORS (which even has more meaningful field names)
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-23Add description for PJD_ERR_INVALID_ARGThomas Knudsen
2017-11-22Merge pull request #680 from busstoptaktik/oss_fuzz-4355_rf-zeroThomas Knudsen
Avoid div-by-zero in rf setup
2017-11-22Merge pull request #679 from busstoptaktik/oss_fuzz-4369-to_meterThomas Knudsen
Avoid div-by-0 in to_meter init
2017-11-22Avoid div-by-zero in rf setupThomas Knudsen
2017-11-22Avoid div-by-0 in to_meter initThomas Knudsen
2017-11-21Central conic projection (gnomonic) implementation (as 'proj=ccon') (#662)Łukasz Komsta
Central conic projection implemented as 'ccon'.
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-20Increment version number before next releaseKristian Evers
2017-11-19Let gie use init-file syntaxThomas Knudsen
2017-11-17Merge pull request #671 from busstoptaktik/use-geoc-in-factorsThomas Knudsen
Switch pj_factors to use proj_geoc_lat
2017-11-16Repair non-standard aggregate initializationThomas Knudsen
2017-11-16Repair double cct io-blunderThomas Knudsen
2017-11-16Switch pj_factors to use proj_geoc_latThomas Knudsen
2017-11-16Introduce geodetic-geocentric conversions ... (#669)Thomas Knudsen
* Introduce geodetic-geocentric conversions, as PJ_xxx style conversion step and as API entry points * minor improvements and minor bug squashing
2017-11-15Merge pull request #667 from busstoptaktik/gie-misleading-errmsgThomas Knudsen
Give definition and def'n line no. in "Invalid operation" message
2017-11-15Adjust adjlon to use canonical M_PI defines (#665)Thomas Knudsen
A year or so ago, @micahcochran put quite some effort into rationalizing the PI usage in PROJ.4, by ensuring that a useful number of M_PI related constants were defined in projects.h. But apparently adjlon.c was left behind still using its own set of definitions - perhaps because it bends the values slightly, to avoid unwanted sign switching near the date line. In this PR the "bending trick" is reimplemented using the rationalized M_PI constants only.
2017-11-15Support numerical factors only (#664)Thomas Knudsen
* Support numerical factors only * Make sure h positive. Improve some comments * Let pole overshoot check have effect even for geocentric latitudes * Factor-typological constants, now all returning false, for backwards compatibility
2017-11-15Give definition and definition line no. in message about invalid operationsThomas Knudsen
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-12Poder autochecking again (WIP) (#652)Thomas Knudsen
* Poder dual autochecking implementation * Debugging aid: Improvements in PJ_vgridshift.c and gie.c * Most likely, the bugbeing tripped is in the gridshift code, so. uncomment suspicious lines in deformation.gie and merge this to support the debugging effort
2017-11-12Merge pull request #660 from busstoptaktik/selftest-removal-vwThomas Knudsen
Remove selftests from projection files starting with v,w
2017-11-12Remove selftests from projection files starting with v,wThomas Knudsen
2017-11-12Merge pull request #659 from busstoptaktik/selftest-removal-rstuThomas Knudsen
Remove selftests from projection files starting with r,s,t,u
2017-11-12Merge pull request #657 from busstoptaktik/selftest-removal-lmThomas Knudsen
Remove selftests from projection files starting with l, m
2017-11-12Merge pull request #658 from busstoptaktik/selftest-removal-nopqThomas Knudsen
Remove selftests from projection files starting with n,o,p,q
2017-11-12Remove selftests from projection files starting with r,s,t,uThomas Knudsen
2017-11-12Remove selftests from projection files starting with n,o,p,qThomas Knudsen
2017-11-12Merge pull request #656 from busstoptaktik/selftest-removal-hijkThomas Knudsen
Remove selftests from projection files starting with h, i, j, k