aboutsummaryrefslogtreecommitdiff
path: root/src/proj.h
AgeCommit message (Collapse)Author
2018-11-29proj_create_crs_to_crs(): rename arguments, update doc, and add a few test casesEven Rouault
2018-11-29C API extensions and renamingEven Rouault
- proj_obj_create_projected_XXXXX() are renamed to proj_obj_create_conversion_snake_case() and just instanciate a Conversion object - Advanced manipulation functions are moved to a dedicated section at bottom of proj.h - New C API needed for GDAL OGRSpatialReference
2018-11-29Redirect epsg:XXXX and IGNF:XXXX CRS expansions to the database, and remove ↵Even Rouault
the data/epsg and data/IGNF files
2018-11-29cs2cs: upgrade to use proj_create_crs_to_crs()Even Rouault
2018-11-22Make proj_create_crs_to_crs() use proj_obj_create_operations() and use area ↵Even Rouault
of use argument, and make createFromUserInput() recognize init=epsg: / init=IGNF: in legacy mode, that is when proj_context_get_use_proj4_init_rules() is used
2018-11-14Implement RFC 2: Initial integration of "GDAL SRS barn" workEven Rouault
This work mostly consists of: - a C++ implementation of the ISO-19111:2018 / OGC Topic 2 "Referencing by coordinates" classes to represent Datums, Coordinate systems, CRSs (Coordinate Reference Systems) and Coordinate Operations. - methods to convert between this C++ modeling and WKT1, WKT2 and PROJ string representations of those objects - management and query of a SQLite3 database of CRS and Coordinate Operation definition - a C API binding part of those capabilities This is all-in-one squashed commit of the work of https://github.com/OSGeo/proj.4/pull/1040
2018-11-10Remove proj_geocentric_latitude from public APIKristian Evers
Closes #1107
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-09-15Bump version numbers after 5.2.0 releaseKristian Evers
2018-06-08bump version numbers to 5.2.0Kristian Evers
2018-04-19Rename level -> log_level for proj_log_level to match function definitionKurt Schwehr
Found on https://github.com/OSGeo/proj.4/commit/2f082b70cbdafdea49bb123e027406089e7ad65b http://clang.llvm.org/extra/clang-tidy/checks/readability-inconsistent-declaration-parameter-name.html function 'proj_log_level' has a definition with different parameter names src/pj_internal.c:374:14: the definition seen here src/proj.h:364:14: differing parameters are named here: ('level'), in definition: ('log_level')
2018-04-12Move logging functions to proj.h APIKristian Evers
2018-03-22proj.h: update PROJ_VERSION_MAJOR.PROJ_VERSION_MINOR to 5.1Even Rouault
This will help avoiding issues for people tracking proj master and GDAL See https://lists.osgeo.org/pipermail/gdal-dev/2018-March/048285.html
2018-03-11Merge pull request #847 from kbevers/proj_strerrnoKristian Evers
Add proj_errno_string function
2018-03-09Add proj_errno_string functionKristian Evers
Equivalent to pj_strerrno.
2018-03-08Use consistent names for PJ_COORD's in declarationsKristian Evers
Changes use of 'PJ_COORD coo' to 'PJ_COORD coord' so that variable names in public function prototypes are consistent. Closes #842.
2018-02-11Add proj_context_errno to API and missing proj_geod to proj.def (#791)Thomas Knudsen
2018-02-10Make the 4D API fully 4D (#788)Thomas Knudsen
Make 4D API fully 4D: Remove PJ_XY, PJ_LP, PJ_XYZ, PJ_LPZ etc. from the API surface and make all formal parameters of the API fully 4D PJ_COORD. This operation primarily influences the proj_XXX_dist functions, which mostly work by calling Charles Karney's geodesic subsystem, keeping the distance, and throwing away the start and end azimuths for the geodesic computed. Also a PJ_GEOD(esic) persona is introduced for the PJ_COORD type. The proj_geod function returns a PJ_GEOD, representing the geodesic between the points represented by its PJ_COORD arguments. Finally, the proj_factors functions had its lp argument changed from PJ_LP to PJ_COORD.
2018-02-09Avoid XY, LP and UV datatype clashes with other libraries.Kristian Evers
Remove unnecessary definitions of UV and UVW from project.h that collides with external libraries. To prevent similar problems in the future the datatypes XY, LP, UV, XYZ, LPZ and UVW has been prefixed by PJ_ in proj.h and proj_internal.h
2018-02-07Shrink PJ_XXX_INFO structs, but keep same syntax. (#775)Thomas Knudsen
* Shrink PJ_XXX_INFO structs, but keep same syntax. A number of the fixed length strings in the INFO structs are simply reflections of material that already exists as static strings at a number of places in the library (or in the case of PJ_INFO, really *should* exist, and now is implemented). This PR replaces these cases of constant length strings with const char pointers. The usage syntax is unchanged, and so is the nice property of having the return value allocated on the stack, and hence not requiring explicit memory management by the caller. proj_info now only does setup once - and the searchpath entry of PJ_INFO is not arbitrarily truncated at 512 bytes. Repeated calls simply returns a copy of already prepared material. The id, description and definition entries of PJ_PROJ_INFO are now also guaranteed to hold the entire text of the corresponding static string, by being represented by a const char pointer to that actual static string. PJ_GRID_INFO and PJ_INIT_INFO (i.e. the two smallest INFO structs) are unchanged. * Eliminate pj_strlcpy - not needed anymore: Remining calls could safely be replaced by strncpy. * Extend PROJ_INFO with paths from pj_set_searchpath. NOTE: Need to call pj_set_searchpath before first call to proj_info Huge thanks to Kristian Evers and Even Rouault for comments, debugging and advice.
2018-02-01expand proj_geoc_lat to proj_geocentric_latitude (#751)Thomas Knudsen
2018-02-01make local derivatives available in PJ_FACTORThomas Knudsen
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-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-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-20Increment version number before next releaseKristian Evers
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-15Support numerical factors only (#664)Thomas Knudsen
* Support numerical factors only * Make sure h positive. Improve some comments * Let pole overshoot check have effect even for geocentric latitudes * Factor-typological constants, now all returning false, for backwards compatibility
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-27Linguistics: Clarify this and that, here and there (#632)Thomas Knudsen
* Linguistics: Clarify this and that, here and there * Revert nullification of PJ_cart->fwd, inv
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-20Addition of an "area of use" argument to proj_transform_crs_to_crs (#565)Kristian Evers
In anticipation of a late-binding implementation of the proj_transform_crs_to_crs function an area argument is added to the function prototype. The PJ_AREA struct is not in use yet, but will be when the function is more tightly coupled to the EPSG database in the future.
2017-10-09Remove PJ_DATUMS which was introduced to proj.h by mistakeKristian Evers
2017-10-09Add proj_list_* functions that exposes various internal lists (#579)Kristian Evers
Fixes #173, #187 and #220
2017-10-06Switch proj_roundtrip to accept PJ_COORD, rather than PJ_OBS, and make it do ↵Thomas Knudsen
proper geodesic distances for forward roundtrips
2017-09-22Add 'expected accuracy' member to PJ_PROJ_INFO struct.Kristian Evers
2017-09-21Changed a few occurences of 'const PJ*' to just 'PJ*' since they were making ↵Kristian Evers
promises that couldn't be kept
2017-09-21Use FACTORS and DERIVS structs from projects.h instead of duplicating them ↵Kristian Evers
in proj.h
2017-09-13Make proj_destroy and proj_context_destroy behave in the same way.Kristian Evers
2017-09-13Introduce PJ_DEFAULT_CTX constant that improves code readabilityKristian Evers
2017-09-13make PJ* P argument of proj_lp_dist constKristian Evers
2017-09-13Add typedef for transformation direction enumKristian Evers
2017-09-06Add PJ_FACTORS bit flags to proj.hKristian Evers
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