aboutsummaryrefslogtreecommitdiff
path: root/nad
AgeCommit message (Collapse)Author
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-08-14Fix ITRF2014Mike Toews
2017-08-07Add ITRF init files (#552)Kristian Evers
* Add ITRF init files, that makes it easy to use ITRF transformations in pipelines * Added ITRF* files to the build systems
2017-08-07Adding info functions to proj.h API. (#551)Kristian Evers
* Adding info functions to proj.h API. Four new functions are added with this commit: proj_info(), proj_pj_info(), proj_grid_info() and proj_init_info(). Additionally four new data types are added: PJ_INFO, PJ_PROJ_INFO, PJ_GRID_INFO and PJ_INIT_INFO. The functions return the corresponding data types. These functions allows users of the PROJ.4 library to get information about various PROJ.4 entities and the library itself. The new data types are structs that contain specific information about either the library instance, a PJ instance, a grid or an init file. Together the four new functions cover a big part of the functionality in the semi-public projects.h API and should hopefully make it easier for user to migrate their code to the proj.h API in the future. Besides covering already existing functionality in the old API, this commit introduces the ability to add metadata to init-files. This is primarily added to give users a way of knowing which version of the EPSG database they are using, but it also comes in handy for other init-files. The init-file metadata is added directly to the init-file as a special "projection" called "metadata". The info projection of the epsg init-file is thus described as: <metadata> +version=9.0.0 +origin=EPSG +lastupdate=2017-01-10 The proj_init_info() function uses the internal pj_param() to read the metadata. As a consequence, "metadata" will not be available as a the name of a projection in the future. This is a reasonable price to pay considering the ease of the implementation of adding metadata to init-files this way, and of course that "metadata" is a very unlikely name for a projection in any case. A metadata tag has been added to all init-files in the nad-directory. For most only a subset of the possible parameters has been added. * Replaced calls to sprintf and strncpy with safer options. Added pj_strlcpy for internal use. * Fail gracefully when getting non-initialized PJ in proj_pj_info() * Change length of filename member in PJ_INIT_INFO and PJ_GRID_INFO to 260 (MAX_PATH)
2017-02-26nad/esri: replace no_defs by +no_defs and remove duplicates (#494)Even Rouault
2017-01-10Update to EPSG v9.0 database (#477)Even Rouault
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-09-02fix #407 -- nad2bin and convertdata interaction in cmakeHoward Butler
2016-08-17EPSG db 8.9 update -- previous updates missed Kyrg codesHoward Butler
2016-08-16continuing update to EPSG db 8.9 (no substantive changes)Howard Butler
2016-08-16update EPSG db to v8.9Howard Butler
2016-04-04Test revisions #3Bojan Savric
2016-04-04Test revisions #2Bojan Savric
2016-04-04Test revisionsBojan Savric
2016-04-04The Natural Earth II testsBojan Savric
2016-04-04The Compact Miller test revisions #5Bojan Savric
2016-04-04The Compact Miller test revisions #4Bojan Savric
2016-04-04The Compact Miller test revisions #3Bojan Savric
2016-04-04The Compact Miller test revisions #2Bojan Savric
2016-04-04The Compact Miller test revisionsBojan Savric
2016-04-04Adding Natural Earth II and Compact MillerBojan Savric
2016-03-27Add Patterson Cylindrical projection. Add tests for projection.Micah Cochran
2016-02-29Add testmbull
2016-01-13nad/epsg: update to EPSG database v8.8Even Rouault
2015-12-16Missing FL.lla -> Fl generation in windows buildbartoli
2015-12-13add test for hammer projection (forward and inverse)Jeff Whitaker
2015-10-30Order of lat/lon is interpreted correctly for SCHPiyush Agram
2015-10-27Tests: Test nzmg forward and inverseEven Rouault
2015-10-27Merge branch 'master' of https://github.com/piyushrpt/proj.4Even Rouault
Conflicts: nad/tv_out.dist
2015-10-24Switch utm to use etmerc to address issue #316.Charles Karney
Add a test to check this. Output of an existing test changed in 7th decimal place.
2015-10-23- API Extension to include fwd3d / inv3dPiyush Agram
- New SCH coordinate system for radar imaging systems
2015-10-05testvarious: shave one digit off the requested output for test bug 244Charles Karney
to ensure that tests succeed.
2015-10-01Take 2 of the fix to dmstor.Charles Karney
I'm making this pull request soon after the release of 4.9.2. It will cause the results that people get out of proj.4 to change very slightly. If there are problems, we'll get a chance to iron them out well before the next release. The important change is to use DEG_TO_RAD for degree to radian conversions in dmstor.c instead of the slightly inaccurate number used earlier. This necessitates a change to geod_interface.c (which previously had to work aroung the previous bad behavior). PJ_aeqd.c now does conversions in a compatible manner. In src/proj_api.h, DEG_TO_RAD and RAD_TO_DEG are both given to 17 significant figures (this is just a cosmetic change). I've "fixed" the testvarious tests so that they still pass (on my system at least). Everyone should be suitably skeptical of my fixes. (1) Minor changes to "Test bug 244" and only ask for nanometer (instead of picometer) accuracy on positions. (2) 2 lon_wrap tests now return 0dE instead of 360dE (now it's tight?) (3) The results for the forward healpix projection of (-180, +90) and (-180, -90) are now different. I have put the new values into tv_out.dist. I'm fairly confident that the new values are OK, since this projection has various cuts which meet at the poles. It would be good if someone who knows about this projection can verify this.
2015-09-10BLD: Remove generated files.Elliott Sales de Andrade
2015-09-10BLD: Remove Makefile.in.Elliott Sales de Andrade
These files are generated by automake.
2015-09-09Regenerate nad/Makefile.in as a follow-up of ↵Even Rouault
https://github.com/OSGeo/proj.4/pull/301
2015-09-09Don't install test & build files.Bas Couwenberg
These files should be included in the distribution tarballs, but not installed by `make install`.
2015-09-09Don't include files in proj dist, also included in proj-datumgrids dist.Bas Couwenberg
As discussed in the [Missing proj_def.dat in 4.9.1 release](http://lists.maptools.org/pipermail/proj/2015-September/007229.html) thead on the proj list, `make dist` for proj shouldn't include the datumgrid files also included in the proj-datumgrid distributions. The following files shouldn't be included in proj, because they're in proj-datumgrids already: * nad/ntf_r93.gsb (included in proj-datumgrids <= 1.6RC1) * nad/ntv1_can.dat (included in proj-datumgrids <= 1.6RC1) * nad/null.lla (included in proj-datumgrids <= 1.5) * nad/nzgd2kgrid0005.gsb (included in proj-datumgrids <= 1.6RC1) This change comprises two (partial) reverts: 1) Revert "nad/Makefile.am: add missing 'null.lla ntf_r93.gsb nzgd2kgrid0005.gsb ntv1_can.dat' to EXTRA_DIST" This reverts commit a4c7892a94667e62d62caa053ac4b51ef790741c. 2) Partial Revert "add files to EXTRA_DIST so they are removed by make uninstall" This partially reverts commit 0a7eda807da1e17f60558acebd89a08872b5b6e9.
2015-09-08autogen'd stuffHoward Butler
2015-09-08add files to EXTRA_DIST so they are removed by make uninstallHoward Butler
2015-09-07Regenerate nad/Makefile.inEven Rouault
2015-09-07nad/Makefile.am: add missing 'null.lla ntf_r93.gsb nzgd2kgrid0005.gsb ↵Even Rouault
ntv1_can.dat' to EXTRA_DIST
2015-09-07Add compile (from automake-1.14.1), and regenerate Makefile.in properly ↵Even Rouault
(thus reverting 152e3dcf65c2d8a0f2d210ddb2a3fae8bbe2307e) and nad/Makefile.in (follow-up of #297)
2015-09-07Merge remote branch 'sebastic/include-proj_def.dat-in-dist'Even Rouault
2015-09-07Re-add proj_def.dat in nad/CMakeLists.txt (#274)Even Rouault
2015-09-06Include proj_def.dat in release tarballs too (#274).Bas Couwenberg
Adding proj_def.dat to pkgdata_DATA in ef4c492 is not sufficient to also have the file included in the tarballs generated via `make dist-all`.
2015-09-06Fix typo in script description too.Bas Couwenberg
2015-09-06Fix 'flaky' typo, causing `make dist-all` failure.Bas Couwenberg
nad/Makefile.am uses nad/testflaky, but the file was named nad/testflakey.
2015-07-09Make multistresstext.exe compile, and work, with mingw cross compiler ↵Even Rouault
(autoconf build)