aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-05-154-parameter Helmert.Kristian Evers
Completing the Helmert driver with the 4-parameter shift that handles the 2D transformation. The implementation is written in such a way that not only 2D-points but also 3D- and 4D-points can be transformed with the 4-parameter Helmert. The four parameters that can be set in this mode are +x, +y (translations), +s (scale) and +theta (rotation). The presence of the +theta parameter activates the 2D-helmert code, irregardless of the input data's dimensions. The units are meters for the translations as in all the other versions of the Helmert transform. The rotation unit is arcseconds. The units of the scale differ from the 3-, 7- and 14-parameter shift where the unit is ppm. Here it is instead given directly and is as such unitless. The 4-parameter case can also be extended to an 8-parameter shift in the same way as the 7-parameter shift extens to the 14-parameter shift. This might be a bit silly and will probably never be used, but nonetheless, I have included it for the sake of completeness. The rates of change are givens as +dx, +dy, +ds and +dtheta.
2017-05-08Extended Helmert transformation to 14-parametersKristian Evers
Extended Helmert transformation to 14-parameters. This commit extends the Helmert transformationto the fourth dimension and enables spatio-temporal datum shifts in PROJ.4. On top of the usual 7 parameters (+x, +y, +z, +s, +rx, +ry, +rz) the rates of change of the seven parameters can now be used as well. The new parameters are called +dx, +dy, +dx, +ds, +drx, +dry and +drz. To keep track of the datum epoch and coordinate epoch two additional parameters have been added to the Helmert transformation, one of which is mandatory in the 14-parameter case. The mandatory datum epoch is controlled with +epoch (given in YYYY.yyyy format) and the coordinate, or observation, epoch is either controlled in the proj-string with +tobs or by using 4D-coordinates when transformating coordinates with pj_trans(). See the test functions for examples of how to set up the transformation with 14 parameters.
2017-05-02Fixed spelling error: conpute -> computeKristian Evers
2017-05-01Removed unwanted call to pj_log_level().Kristian Evers
When running the self-test with logging was turned off globally when the PJ_cart test was run. As a consequence all test functions called after PJ_cart was not able to output debugging information. In most cases this would go by unnoticed but when calling proj with PROJ_DEBUG=1 (or higher) all debugging output whould get suppressed. This commit removes the call to pj_log_level that turns of debugging output in the self-test.
2017-04-18Fix aea projection return value in case of error (#503)maximchurilin
2017-04-10geodesic.h: Switch to geodesic version 1.48.1.Charles Karney
2017-04-10geodesic.c: fix compiler error, if (x) -> if (x != 0)Charles Karney
2017-04-09Merge is geodesic routines from GeographicLib 1.48. Changes:Charles Karney
- http://geographiclib.sf.net -> http://geographiclib.sourceforge.io - backport fixes for warnings messages from some compilers - change default range for longitude and azimuth to (-180d, 180d] (instead of [-180d, 180d))
2017-03-27Horisontal and vertical gridshift driversKristian Evers
Until now gridshifts has not been working with the new API in proj.h since parsing of +nadgrids and +geoidgrids is build into pj_transform(). This commit introduces the possibility to do both horizontal and vertical gridshift with the pipeline API. The vgridshift and hgridshift kernels are simple wrappers for pj_apply_gridshift3() and pj_apply_vgridshift() that are also used by pj_transform(). Introduced in PR #492.
2017-03-16Add pj_find_file() function to retrieve the full filename of a proj resource ↵Even Rouault
file. Will help GDAL finding where +nadgrids=... or +geoidgrids=... resouces are located to be able to directly open them.
2017-03-15Document messy GDAL hackEven Rouault
2017-03-08fix memory leak in PJ_ob_tran.c (in freeup_new)dusanjovic
freeup_new must not return before both P->opaque and P are deallocated.
2017-03-08Fix commentEven Rouault
2017-02-28Enable cppcheck and fix related mostly false-positive warningsEven Rouault
2017-02-27test228.c: remove unused arguments in main()Even Rouault
2017-02-27Merge pull request #487 from PositiveArrow/c11_compilationEven Rouault
C11 compilation
2017-02-27Merge pull request #495 from rouault/misc_warning_fixesEven Rouault
Fix warnings related to -Wshadow -Wnull-dereference -Wfloat-conversion -Wmissing-prototypes -Wmissing-declarations
2017-02-26Vertical grids: avoid out-of-bounds read on east and south edges (#396)Even Rouault
2017-02-26Typo fixesEven Rouault
2017-02-26Raise MSVC warning level to /W4Even Rouault
2017-02-26PJ_lsat.c: restore d__1 computation that was lost in conversion done in ↵Even Rouault
c9f12e0033474518fa460444b9948f36ce47d51f. Issue raised by VS12
2017-02-26Fix MSVC warnings and add /Wx to appveyor.ymlEven Rouault
2017-02-26Recent clang (e.g MacOSX) warning fixes related to double to _Bool implicit ↵Even Rouault
conversions
2017-02-26test228.c: warning fixesEven Rouault
2017-02-26multistresstest.c: warning fixesEven Rouault
2017-02-26Fix warnings related to -Werror=maybe-uninitializedEven Rouault
2017-02-26Fix warnings in geodtest.cEven Rouault
2017-02-26proj.def: remove symbols no longer public.Even Rouault
See https://ci.appveyor.com/project/OSGeo/proj-4/build/1.0.513/job/chsb12mrfkpbkbqj
2017-02-26Fix warnings related to -Wshadow -Wnull-dereference -Wfloat-conversionr ↵Even Rouault
-Wmissing-prototypes -Wmissing-declarations
2017-02-25Fix GCC 7 warnings related to misleading indentations, fallthrough cases and ↵Even Rouault
unused variable
2017-02-25proj: add missing continue for 'V' switch (raised by GCC 7 ↵Even Rouault
-Wimplicit-fallthrough)
2017-02-15Issue #490 update from geodesic routines from GeographicLib 1.47.Charles Karney
Improve accuracy of area calculation (fixing a flaw introduced in version 1.46). Changed files geodesic.[ch3], geodtest.c, geod.1.
2017-02-10Consistent precision for mathematical macrosEtienne Jacques
2017-02-10Fix compilation with gcc with -std=c11 option.Etienne Jacques
2017-02-03PJ_horner: support for complex polynomia (#482)Thomas Knudsen
* PJ_horner: support for complex polynomia Add Poder/Engsager dual complex Horner and corresponding test case. Removed superfluous test code from original Poder/Engsager gen_pol implementation. * Trim code in response to a review by @kbevers * Clean up a few cases of hard coded constants enum pj_direction symbols replacing hard coded {-1, 0, 1} integer constants
2017-01-18Merge pull request #470 from kbevers/issue-469Kristian Evers
Repairing tests that fails on OS X
2017-01-18Changed +ellps parameters of test pipelines. Originally +ellps was only set ↵Kristian Evers
once in the pipeline which break tests on OSX. Moving the +ellps parameters to each +step of the pipelines seems to fix the OSX tests.
2016-12-18Not using proper spherical earth in tests that use a spherical projection. ↵Kristian Evers
+a replaced with +R
2016-12-18Merge pull request #452 from tfili/no-bins-cmakeEven Rouault
Updated CMakeLists to only set the debug postfix if the target is being built
2016-12-15Horner and helmert (#456)Thomas Knudsen
Introducing the Horner polynomial evaluator also introduces the need for very long +init:tag arguments (a n'th order 2D polynomium has (n+1)(n+2)/2 coefficients, and n is typically in the range 5-10, i.e. up to around 60 coefficients for each polynomium, and there are 4 polynomia in a complete back/forward transformation set). Hence, in this commit, along with the first part of the Horner code, the code for reading +init files has been modified in a (for all practical purposes) backwards compatible way, by making it possible to introduce line continuations by escaping line breaks, i.e. preceding them with a backslash. An escaped line break works (as it would in TeX), by skipping all following whitespace, including interspersed #-comments. This simple extension makes it possible to create very long initialization elements without losing track of the structure (cf. s45b.pol and pj_init_test.c in the examples-directory for a demo). The s45b.pol file was created by hand-editing the output of the software doing the original constrained adjustment for the polynomial coefficients. The simple adding of the “skip following whitespace and comments” feature has made it possible to retain almost all metadata from the source material. This is considered very important, since 1) For the lack of a prior common file format for geodetic polynomial coefficients, there is a good chance that this will become THE standard, at least for the time being, and 2) Without the metadata represented, it will be very hard for a human to debug code involving a slightly misrepresented polynomium. Due to the current architecture of the pj_init.c code (mostly around the fill_buffer() function), it is next to impossible to implement the line continuation functionality in full generality. Hence, it has been necessary to limit this format extension to files smaller than 64 kB. * Correction of spherical HEALpix test case The first HEALpix test case in nad/testvarious is clearly intended to invoke the spherical form of HEALpix. It does, however, specify the spheroid using the +a=1 size parameter, without specifying any shape parameter. But since +no_defs is not specified either, a shape parameter is picked up from the nad/proj_def.dat file (where ellps=WGS84 is given in the <general> section). It appears that this has not happened before I updated the pj_init code to support projection pipelines (see below). I do, however, believe that the present behaviour is the correct one, and rather than retrohacking the pj_init code, to (incorrectly, I believe) reproduce the prior behaviour, I have corrected the test case invocation in nad/testvarious to specify the spheroid using the +R=1 size parameter (which was already used in the following test case). * Repair scaling of projections stomping on value of semimajor axis * Workaround MSVC HUGE_VAL misimplementation. The "return const err object" idiom (i.e. const <type> err = {HUGE_VAL,...}; ... if (bad) return err) is problematic to implement due to MSVC's misimplementation of HUGE_VAL as a non-const. Hence, we need to run-time initialize these. In the pj_inv functions, this was mistakenly done to the wrong object. For pj_fwdobs/invobs and the remaining part of the obs-based API, this is now worked around by providing functions returning a run time HUGE_VAL initialized PJ_OBS or PJ_COO resp. Obnoxious, but given MSVC's market penetration there is really not much else we can do.
2016-12-12Add a scripts/fix_typos.sh script and correct reported errorsEven Rouault
2016-12-12Fix 'run_one_test defined but not used' warning when PJ_SELFTEST is not enabledEven Rouault
2016-12-12PJ_robin: avoid out-of-bounds read on NaN valuesEven Rouault
Found with AFL on gdalinfo on s_inverse(). s_forward() might also have the same issue, so fixing that too.
2016-12-12pj_strerrno(): make it obvious to the compiler that the function always ↵Even Rouault
return a value
2016-11-20Plumbing for pipelines (#453)Thomas Knudsen
* re-enter pipeline The pipeline interface is now internally based on the pj_obs_api, which simplifies the implementation significantly. This is the first mock up - it compiles fine, but is currently untested * pipeline code cleaned up The pipeline code is now based on the PJ_OBS api (although you can still invoke a pipeline through pj_fwd/pj_inv and their 3D brethren). This has made it possible to eliminate scores of funky casts and convoluted workarounds. The code is now way more straightforward and mostly conforming with common C idioms.. Also, the proj.h / obs_api interface to the logging system has been streamlined through the introduction of the pj_log_error, pj_log_debug, and pj_log_trace functions. * Geodesics + minor changes First proj.h style interface to Charles Karney's geodesics code: pj_lp_dist. Also, renamed pj_apply -> pj_trans * Extended Ellipsoidal Parameters Second eccentricity, second and third flattening etc. * Rename pj_debug_set -> pj_log_level ... and add self test code for PJ_pipeline * Clean up missing pj_apply->pj_trans * Clean up missing pj_obs_dist_2d rename * pj_strerrno bug fixed. Some doc/comments added (In response to a review by @kbevers)
2016-11-17Updated CMakeLists to only set the debug postfix if the target is being built.Tom Fili
2016-11-12Pipeline plus api - in continuation of the Genereic Coordinates pull request ↵Thomas Knudsen
(#445) This commit reflects continued work on the new rationalized API with geodetic extensions (see rationale in proj.h). It also reflects the parallel work on the transformation pipeline reimplementation, by introducing the PJ_cart cartesian/ellipsoidal converter. See example/pj_obs_api_test.c for demo example code
2016-11-08Fixing both scaling and wrap-around issues mentioned in #166Kristian Evers
2016-10-24Generic coordinates (#431)Thomas Knudsen
* Pipeline preliminaries Introducing the PJ_OBSERVATION data type as the basis for generic geodetic transformations. Also introducing the elements of a new minimalistic API focused on generic geodetic transformations. This API is documented in the new proj.h header, and is orthogonal (non-intrusive) wrt. the existing API from proj_api.h Finally added a large amount of comments to the somewhat intractable projects.h, and extended the PJ object with a number of additional ellipsoidal parameters of general geodetic usefulness. The PJ elements fwdobs and invobs extend fwd3d and inv3d in a homologous way to how fwd3d and inv3d extend fwd and inv.
2016-10-20Fixes #138 (spherical tmerc with negative northing gives inverted latitude)Kristian Evers