aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-02-23Download BETA2007 grid from proj-datumgrid package in CI scripts.Kristian Evers
Following PR #806 which removed various grids from nad/, we now have to download the BETA2007 grid before that DHDN_ETRS89 test can pass successfully.
2018-02-14revert tolerances for chamb and vandg2 to previous valuesKristian Evers
2018-02-12Rename gie_failing to work around MS wildcard bug (#799)Thomas Knudsen
For reasons unknown to anyone but the geniuses from Redmond: In MSWindows, the wildcard pattern "*.gie" expands to all files having an extension *starting* with ".gie". In other words "dir *.gie" will list files with extension ".gie" *and* with extension ".gie_failing". This means that running "gie test\gigs\*.gie" will run all gigs tests, even the ones known to fail. So rather than getting a quick check for regressions, one gets a lot of noise and no easy way to be sure whether any regressions have appeared. To work around this oddity, we rename all files ending in ".gie_failing" to end in ".gie.failing" - and while at it, adding all the non-failing gigs tests to the AppVeyor test suite. This extends the regression test suite, run at the end of each AppVeyor integration, to over 2500 individual tests. Test coverage, however, is still hovering just below 75%, so there's still plenty of room and reason for additional tests.
2018-02-12Ensure cs2cs emulation gets correct ellipsoid defn (#798)Thomas Knudsen
Copy ellipsoid definition for proj=cart directly into the proj_create call, rather than calling pj_inherit_ellipsoid_def afterwards. Previously, the ellipsoid definition was left out from the call. pj_init_ctx would then pick up WGS84 from proj_def.dat, and the init would succeed (and the possibly wrong ellipsoid definition would later on be overwritten with the correct values by pj_inherit_ellipsoid_def. But if PROJ_LIB was not set or proj_def.dat was inaccessible for other reasons, things went wrong.
2018-02-12Avoid invalid ellps error messages from pj_init (#794)Thomas Knudsen
Reset error type PJD_ERR_MAJOR_AXIS_NOT_GIVEN for operations that do not need an ellipsoid.
2018-02-10Update a few gie testsThomas Knudsen
2018-02-10Relax tolerance slightly for two tests failing on OS/XThomas Knudsen
2018-02-10Handle sign convention for vertical datum shiftsThomas Knudsen
Also make corresponding sign corrections in a number of tests, and comment out a few tests which work correctly, but report failure since gie is not yet ready to handle unusual axis orders in cases with angular output coordinates.
2018-02-10update gie tests to agree with improved gie distance handlingThomas Knudsen
2018-02-09Relaxing tolerances in a few tests to fix #778.Kristian Evers
2018-02-06Use PROJ_LIB explicitly for gie tests and if it is not set change it to nad/Kristian Evers
2018-02-06Skip gie tests that require gridsKristian Evers
2018-02-05Make gie tests in autoconf setup more granular.Kristian Evers
2018-02-05Add EPSG definitions to failing gigs test 5108.gie_failingThomas Knudsen
2018-02-02Remove GIGS Python test suite.Kristian Evers
All the GIGS JSON files have been converted to the gie format and are now covered by running "make check". Therefore we no longer need the Python setup. Removing it from the Travis CI setup should speed up the test execution time a bit.
2018-02-02Improve tests and add test files to automake setup.Kristian Evers
Make sure that the gie files in test/gie and test/gigs are included in the distribution tarball. Tests with gie are set up to run all available files matching *.gie in the gie and gigs directories. For this reason tests that are known to fail in gigs/ have been renamed to *.gie_failing, so that "make check" can be run in-tree in local copies of the git repository.
2018-01-31Test material for the cs2cs emulation in the 4D API.Kristian Evers
The GIGS tests that are known to work are added to the CMake test setup. The GIGS gie files have been auto-translated from the existing json-files and some corrections to tolerances have been necessary since gie uses different norms than GIGS specify. The GIGS tolerances are specified as the infinity norm of angular coordinates, whereas gie uses the actual distances between calculated and expected coordinates (using geodesics). In a few tests +towgs84 is overriden from the EPSG inits to avoid creeping numerical inaccuracy in roundtrips. Co-authored-by: Thomas Knudsen <thokn@sdfe.dk> Co-authored-by: Kristian Evers <kristianevers@gmail.com>
2018-01-31Introduce compatibility for cs2cs-style proj-strings into the 4D API.Thomas Knudsen
Parameters such as towgs84, nadgrids and geoidgrids was previously only handled by pj_transform(). This commit add a compatibility layer in proj_create() by calling the pj_cs2cs_emulation_setup() function. This function sets up a handful of predefined transformation objects on the PJ object that is being created. Each of these transformation objects are related to the cs2cs-style parameters we are trying to emulate in the 4D API. That is, if the +towgs84 parameters is used we create P->helmert with the parameters specified in +towgs84. Similarly for +axis, +nadgrids and +geoidgrids. When these transformation objects exists we use them in the prepare and finalize functions in pj_fwd/ pj_inv. If no cs2cs-style parametes are specified we skip those parts of the prepare and finalizing steps. Co-authored-by:Thomas Knudsen <thokn@sdfe.dk> Co-authored-by:Kristian Evers <kristianevers@gmail.com>
2018-01-17Merge pull request #739 from kbevers/pipeline-inverseKristian Evers
Pipeline and cct inverse fixes
2018-01-17Adding a few more test cases for pipeline, ensuring better test coverageKristian Evers
2018-01-17Fix "double inversions" in pipelines, require a defined forward operation.Kristian Evers
"+proj=pipeline +inv +step +urm5 +n=0.5 +inv" now works as expected, returning the forward operation of urm5. In principle adding more +inv's should also work, resulting in the forward operation when an even number of +inv's are present, and the inverse when an odd number of +inv's are present. "+proj=pipeline +step +urm5 +n=0.5 +inv" fails at initialization since no forward operation can be performed. This is a new requirement, but aligns perfectly with the rest of the library since no operation without a forward method exists.
2018-01-09Convert GIGS tests to gie format and add to CMake testsKristian Evers
2018-01-09Add gie tests to CMake testing facilityKristian Evers
2018-01-09Added json to gie conversion scriptKristian Evers
2018-01-08Allow usage of classic +axis parameter in axisswap.Kristian Evers
Instead of +order the classic PROJ.4 parameter +axis can used instead. This is mostly an inititive to simplify backwars compatibility in the 4D API. P->axis is initialized in pj_init() it can be assumed that it is set up correctly. +order and +axis are mutually exclusive.
2018-01-05Custom unit factors in unitconvert.Kristian Evers
Added the possibility to use custom unit factors. Similar to the classic +to_meter parameter the conversion factor is related to meters, i.e. the factor for conversion from kilometers meters is 1000. The custom unit factors is given using the existing xy_in, xy_out, z_in and z_out parameters, for example: proj=unitconvert xy_in=4.5 +xy_out=mm
2018-01-03Introduce preparation/finalization steps in fwd/inv subsystem, supporting ↵Thomas Knudsen
arbitrary dimensionality in test code * Call trans func of same dimensionality as input in gie * Refactor prep/fin code for pj_fwd/pj_inv 2D,3D,4D * Remove prime meridian handling from pj_transform (now handled in pj_fwd_prepare/pj_inv_finalize) * Introduce prep/fin skips, mostly in support of axisswap and pipeline drivers * Refactor fwd/inv subsystem * pj_transform: Let pj_fwd/inv handle scaling * Let pj_fwd/inv3d fall back to 2D eventually
2017-12-19Some corrections in response to a review by Kristian Evers (#718)Thomas Knudsen
* Some corrections in response to a review by Kristian Evers
2017-12-18fix spelling mistakes in previous commitKristian Evers
2017-12-18Test deformation initialization errors.Kristian 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-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-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-28Merge pull request #691 from busstoptaktik/make_assignments_greedyThomas Knudsen
Free formatting of PROJ key=value pairs
2017-11-28Free formatting of PROJ key=value pairsThomas Knudsen
2017-11-28use full error code checking on failure in more_builtins.gieThomas Knudsen
2017-11-28Add tests for GDA2020 (#688)Thomas Knudsen
Add GDA2020 tests, and correct the PJ_helmert bug they revealed
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-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-16Reintroduce the gie-internal tests.Thomas Knudsen
These were accidentally dropped during PR #669
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-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-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