aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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
2016-10-19Fix 'Internation' typo, replace with 'International' (to match PJ_imw_p.c).Bas Couwenberg
2016-10-19Incorrect formula used, changed to comply with Snyder and other sources. ↵Kristian Evers
Fixes #331
2016-10-19Reverting to behaviour of previous version of pj_inv(). Definitions of false ↵Kristian Evers
easting/northing in nad/epsg are all given in meters. So in this case a consistent interface (everything is in the same units) does more harm than good.
2016-10-18Convert units for false northing/easting. Fixes #186.Kristian Evers
2016-10-18Allow +alpha=0 and +gamma=0 when using omerc. Applied fix proposed in #195.Kristian Evers
2016-10-18Adjusted coefficient from 1574 to 1575. Changed on basis of #174 which ↵Kristian Evers
refers to the original paper the code is based on.
2016-10-18Fixes #162. Latitude origin was erroneously set to -39 instead of 39. ↵Kristian Evers
Updated origin confirmed in Snyder p.209. Self-test data was based on bad implementation and has been recalculated.
2016-10-18fixes issue #161 [alsk - Inverse problem at the origin long/lat (-152,64)]Kristian Evers
2016-10-18Fixed issue #194 (Bug with the stereographic projection at equator) that ↵Kristian Evers
multiplied equatorial coordinates by 2
2016-10-14Replace calls to fabls with fabs (not using long doubles anyway). Fixes #426.Kristian Evers
2016-10-09Use more consistent description for sch projection.Bas Couwenberg
2016-09-01apply patch for #406 to improve Aitoff performance in some situationsHoward Butler
2016-08-22Changed self-test build behaviour from opt-out to opt-inKristian Evers
2016-08-21Merge pull request #399 from kbevers/non-computable-init-healpixHoward Butler
Eliminate load time non-computable initializers in healpix
2016-08-21Merge pull request #400 from kbevers/times-projectionHoward Butler
Implementation of Times projection
2016-08-18whitespace normalization for proj 4.9.3RC3Howard Butler
2016-08-16fix incorrect Makefile.am definition in de19a33f3003ec4a2c32e40f8421c7fbefbd6e94Howard Butler
2016-08-16add bin_geodtest.cmake and geodtest.c to distributionHoward Butler
2016-08-15increment version numbers for 4.9.3RC1Howard Butler
2016-07-28Implemented Times projectionKristian Evers
2016-07-14Suppressed warning about redefining MUTEX_win32Kristian 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-06-14Merge pull request #395 from kbevers/better-test-dataKristian Evers
Better test data for gs48, gs50 and alsk
2016-06-14Merge pull request #385 from kbevers/krovak-without-C_xKristian Evers
Complete overhaul of Krovak projection code (was "Remove unused C_x parameter from krovak projection.")
2016-06-13Adjusted xy tolerances for alsk, gs48 and gs50 a bitKristian Evers
2016-06-13New test data for gs48, gs50 and alsk which is inside the defined areas for ↵Kristian Evers
the given projections. Also fixed spelling error in header.
2016-06-10Make proj -VC selftest return exit code of number of test failures.Micah Cochran
2016-06-08Added +ellps argument to self-test call since it might be the reason the ↵Kristian Evers
self-test fails on travis
2016-06-07Complete overhaul of Krovak projection. Remove unused and duplicate code. ↵Kristian Evers
Using standard variables from P and added an opaque object to P which has shared values used both in forward and inverse calculations. Added more background information to comments.
2016-05-31correct M_PI_HALFPI valueMicah Cochran
last digit changed to 9
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-05-24Removed unused opaque object (the only parameter, C_x, never used)Kristian Evers