| Age | Commit message (Collapse) | Author |
|
|
|
- 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
|
|
the data/epsg and data/IGNF files
|
|
|
|
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
|
|
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
|
|
Closes #1107
|
|
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
|
|
|
|
|
|
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')
|
|
|
|
This will help avoiding issues for people tracking proj master and GDAL
See https://lists.osgeo.org/pipermail/gdal-dev/2018-March/048285.html
|
|
Add proj_errno_string function
|
|
Equivalent to pj_strerrno.
|
|
Changes use of 'PJ_COORD coo' to 'PJ_COORD coord' so that variable names in
public function prototypes are consistent.
Closes #842.
|
|
|
|
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.
|
|
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
|
|
* 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.
|
|
|
|
|
|
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.
|
|
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)
|
|
* 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.
|
|
|
|
* Introduce geodetic-geocentric conversions, as PJ_xxx style conversion step and as API entry points
* minor improvements and minor bug squashing
|
|
* 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
|
|
* 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
|
|
* 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
|
|
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.
|
|
* Linguistics: Clarify this and that, here and there
* Revert nullification of PJ_cart->fwd, inv
|
|
* Remove PJ_OBS from the API surface, rename pj_obs_api.c to pj_4D_api.c
* Repair proj.def
|
|
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.
|
|
|
|
Fixes #173, #187 and #220
|
|
proper geodesic distances for forward roundtrips
|
|
|
|
promises that couldn't be kept
|
|
in proj.h
|
|
|
|
|
|
|
|
|
|
|
|
* 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)
|
|
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?).
|
|
|
|
|
|
|