aboutsummaryrefslogtreecommitdiff
path: root/src/proj.def
AgeCommit message (Collapse)Author
2018-10-16Move struct definitions for proj_list_* functions to proj.hKristian Evers
With projects.h not being available to outside users anymore we need to define PJ_UNITS, PJ_ELLPS, PJ_PRIME_MERIDIANS and PJ_OPERATIONS elsewhere. Related pj_get_*_ref() functions have been removed in favour of their proj_ namespaced counterparts. char pointers have been changed to const char pointers. Resolves #983 Resolved #1147 Make char pointers const
2018-06-20Add proj_errno_string() to proj.defKristian Evers
2018-05-23Add pj_isnan to proj.def to avoid linking errors for some MSVC versionsKristian Evers
2018-02-11Add proj_context_errno to API and missing proj_geod to proj.def (#791)Thomas Knudsen
2018-02-01expand proj_geoc_lat to proj_geocentric_latitude (#751)Thomas Knudsen
2018-02-01Remove unnecessary functions and restructure proj.def. Closes #728Kristian Evers
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-31Add pj_has_inverse().Kristian Evers
With the introduction of the "inverted" flag on PJ objects you can no longer rely on checking that the inv, inv3d and inv4d functions are available on said PJ object. The function is used internally a few places and otherwise exposed in proj_api.h to ensure that users of the old programming interface can safely check if an operation has an inverse.
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-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-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-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-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-08Improved IO predicates (#648)Thomas Knudsen
* enter proj_angular_input and proj_angular_output, exit proj_angular_left and proj_angular_right * remove unused variable 'unit' * In gie: remove unused func 'torad_if_needed', and add static keyword where needed * In gie: add some comments
2017-11-06Eliminate the last traces of PJ_OBS (#643)Thomas Knudsen
PJ_OBS eliminated, API adjusted to reflect that we now have only one 4D data type. 2 new API functions added to determine output types of a PJ.
2017-10-25Remove PJ_OBS from the API surface, rename pj_obs_api.c to pj_4D_api.c (#625)Thomas Knudsen
* Remove PJ_OBS from the API surface, rename pj_obs_api.c to pj_4D_api.c * Repair proj.def
2017-10-09Add proj_list_* functions that exposes various internal lists (#579)Kristian Evers
Fixes #173, #187 and #220
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-07-25Expose pj_factors and pj_deriv in public API. (#546)Kristian Evers
Expose pj_factors and pj_deriv in public API. proj_derivatives() and proj_factors() has been introduced to the public proj.h API. The new functions are simply wrappers for the original functions. The h argument of the two functions has been omitted in the new wrappers as it does not seem to be used very much (if at all?).
2017-07-13Add proj_dmstor() and proj_rtodms() to proj.h API. Resolves #172.Kristian Evers
2017-07-13Added proj_has_inverse(). Fixes #155.Kristian Evers
2017-07-13Implemented proj_transform_coord() and proj_transform_obs()Kristian Evers
2017-07-13Implemented proj_create_crs_to_crs()Kristian Evers
2017-07-07obs_api revision and improvements: new namespace etc. (#530)Thomas Knudsen
* obs_api revision and improvements: new namespace etc. * Minor corrections: use unused functions, add missing prototype, added fwd/invcoord to PJ * Minor correction: MSVC barfs on va_arg type specification. Trying once more with added parens * Reverting paren correction, which appears to be a non-solution * Significant improvements to the OBS_API, plus a number of corrections, mostly in test code, to reflect API changes * Added two missing prototypes * Adding the proj_transform function and some related checks * Improvements to proj_transform etc. based on suggestions from Even Rouault * Reducing the libc include footprint of proj.h - again based on suggestions from Even Rouault * A few minor corrections * Eliminate a MSVC warning about non-initialized usage. Not an actual issue, as another check has locked the path, but at least this should calm down MSVC * Improved support for the errno reset/restore paradigm * Introduced the internal header proj_internal.h; Moved most non-API stuff from pj_obs_api.c to pj_internal.c * Adding proj_internal.h to HEADERS_LIBPROJ to solve build problems * Correcting a few pj...proj blunders in PJ_pipeline.c * Correcting a few additional blunders in PJ_pipeline.c * Changed angle-brackets to quotation marks in includes of proj_internal.h * Some minor build system repairs * Some PJ_CONTEXT usage simplifications following suggestions by Kristian Evers @kbevers * Added version numbering to proj.h - Fixes #529 * remove proj_errno_restore macro, provide function implementation * Add proj_get_definition. Fixes #538 * Added library specific deallocator proj_buffer_free, eliminating a potential cross heap issues on Windows. Thx to Even Rouault for spotting this * Got rid of a meaningless cast in proj_buffer_free * Added some missing functions to proj.def (again spotted by @rouault); removed some not-yet-implemented material from proj.h * Renamed proj_get_definition/proj_buffer_free to proj_definition_create/proj_definition_destroy, for symmetry and clarity * Renaming the definition handlers to proj_definition_retrieve / proj_free * Renaming proj_free to proj_release
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-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
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-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-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-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-04-07Fixing windows build with regards to pj_run_selftests. Also adding new ↵Kristian Evers
projections natearth2 and comill to dll-build.
2016-02-16Fix typo in proj.defCharles Karney
2016-02-16Preserve original numbering in proj.def (not sure whether this matters).Charles Karney
2016-02-16Finish the geod_ additions to proj.def.Charles Karney
2016-02-15Update proj.def to include new geod_ functions. Suppress warning from etmerc.Charles Karney
2015-10-23- API Extension to include fwd3d / inv3dPiyush Agram
- New SCH coordinate system for radar imaging systems
2015-07-07Make pj_init() locale safe and no longer modify locale (#226)Even Rouault
Remove setlocale() use in pj_init_ctx(), and replace uses of atof() & strtod() by their locale safe variants pj_atof() and pj_strtod(). Proj versions from now advertize #define PJ_LOCALE_SAFE 1 in proj_api.h and export pj_atof() & pj_strtod()
2013-06-25add pj_get_spheroid_defn (#214) and fileapi entry pointsFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2359 4e78687f-474d-0410-85f9-8d5e500ac6b2
2013-05-10Major upgrade to geodesic support from Charles Karney (#197). Frank Warmerdam
Syncs geodesic routines with GeographicLib. Adds geodesic.3 man page. geod_* api exposed publically. geodesic.h is installed. git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@2333 4e78687f-474d-0410-85f9-8d5e500ac6b2
2011-03-15fix up a few items for windowsFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1985 4e78687f-474d-0410-85f9-8d5e500ac6b2
2010-06-11update to build with vgrid and ctx changesFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1855 4e78687f-474d-0410-85f9-8d5e500ac6b2
2004-10-28added definition list accessors and various private functionsFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1257 4e78687f-474d-0410-85f9-8d5e500ac6b2
2004-10-28removed the LIBRARY statement, it just messes up the linkFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1254 4e78687f-474d-0410-85f9-8d5e500ac6b2
2004-09-16* src/pj_open_lib.c: added pj_set_searchpath() provided by Eric Miller.Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1227 4e78687f-474d-0410-85f9-8d5e500ac6b2
2004-09-15Added some missing entry points.Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1226 4e78687f-474d-0410-85f9-8d5e500ac6b2
2004-04-15Added pj_get_release()Frank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1172 4e78687f-474d-0410-85f9-8d5e500ac6b2
2002-12-14added pj_is_geocentFrank Warmerdam
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1055 4e78687f-474d-0410-85f9-8d5e500ac6b2