aboutsummaryrefslogtreecommitdiff
path: root/src/conversions
AgeCommit message (Collapse)Author
2020-12-15Remap ENOMEM from PROJ_ERR_INVALID_OP to PROJ_ERR_OTHEREven Rouault
2020-12-15Various operations: remove explicit short name prefixing in log messages now ↵Even Rouault
that it is automatically added
2020-12-15Revise error codes to have a reduced set exposed in the public API.Even Rouault
Fixes #2482 And also add proj_context_errno_string() Revise gie 'expect failure errno XXXX' strings
2020-12-02fix buildEven Rouault
2020-12-02Merge pull request #2444 from rouault/topocentricEven Rouault
Add +proj=topocentric geocentric->topocentric conversion (fixes #500)
2020-11-23Add +proj=topocentric geocentric->topocentric conversion (fixes #500)Even Rouault
2020-11-20Remove old pj_ memory (de)allocation functionsKristian Evers
Gone are pj_malloc, pj_calloc, pj_dalloc and pj_dealloc. Their primary function as API memory functions in proj_api.h is no longer there and the other use as a workaround for old errno problems is no longer valid either. Replaced with malloc and free across the codebase.
2020-04-13Merge pull request #2144 from kbevers/proj_degree_inoutputKristian Evers
Add proj_degree_input() and proj_degree_output()
2020-04-12Add proj_degree_input() and proj_degree_output()Kristian Evers
Equivalent to proj_angular_input() and proj_angular_output() but checking for degree units instead. proj_create_crs_to_crs() rarely, if ever, returns pipelines that has radians as input or output so using proj_angular_*() is not a useful check for io units of pipelines. These two new functions should make life a bit easier for users that generally store there angular coordinates in radians. Closes #2027
2020-04-11Inverse cart: speed-up computation by 33%Even Rouault
Saves 2 sincos() and 1 atan2() calls. With the following bench ``` #include "proj.h" #include <stdlib.h> #include <stdio.h> #include <string.h> int main(int argc, char* argv[]) { if( argc != 2 ) { fprintf(stderr, "Usage: bench_inv_cart fwd/inv\n"); exit(1); } PJ* p = proj_create(0, "+proj=cart"); const int dir = strcmp(argv[1], "inv") == 0 ? PJ_INV : PJ_FWD; PJ_COORD coord; if( dir == PJ_FWD ) { coord.xyz.x = 3.14159/2; coord.xyz.y = 3.14159/2; coord.xyz.z = 100; } else { coord.xyz.x = 3e6; coord.xyz.y = 3e6; coord.xyz.z = 3e6; } for(int i = 0; i < 10* 1024 * 1024; i++ ) { proj_trans(p, dir, coord); } proj_destroy(p); return 0; } ``` On Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz Time before: 2.37s Time after: 1.57s
2020-03-17Deprecate proj_list_angular_units(). Follow-up of ↵Even Rouault
https://github.com/OSGeo/PROJ/pull/2065
2020-03-13Tag proj_list_units() as deprecatedEven Rouault
2020-02-06cart: Avoid discontinuity at poles in the inverse caseKristian Evers
This should avoid issues with numerical stability as uncovered in https://github.com/OSGeo/PROJ/issues/1906. Practically speaking this change isn't going to affect real life scenarios since the position of the center of the Earth is rarely expressed in geodetic coordinates.
2020-01-28Add +proj=set operation to set component(s) of a coordinate to a fixed valueEven Rouault
Fixes #1846
2020-01-13unitconvert with mjd time format: avoid potential integer overflowEven Rouault
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20072
2019-12-25Modify verbosity level of some debug/trace messagesEven Rouault
- unitconvert, ell_set and helmert were using debug level, which is too verbose. Using trace instead - proj_trans() was using trace to indicate the operation it selects. Changing it to debug
2019-10-28Various fixes/workarounds to make cppcheck 1.72 (Ubuntu 16.04) and ↵Even Rouault
HEAD/1.90dev happy (fixes #1648)
2019-09-18Delete proj_math.h. Replace includes by <math.h>; we'll see if anyoneCharles Karney
needs <limits.h>. Update scripts/reference_exported_symbols.txt and src/proj_symbol_rename.h.
2019-04-19Inverse cart: better deal with x,y,z equal of very close to zeroEven Rouault
In that case, for a non-spherical ellipsoid, a phi = 180deg was returned, which caused a division by zero in the foward path of moll.cpp Fixup the latitude to be 0 when that happens. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14348 Credit to OSS Fuzz
2019-04-02Merge pull request #1391 from kbevers/noopKristian Evers
Add no-op operation. It does nothing.
2019-04-01Merge pull request #1396 from rouault/ossfuzz_13947_13948Even Rouault
Ossfuzz 13947 13948
2019-03-29unitconvert: prevent division by zeroEven Rouault
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13947 Credit to OSS Fuzz
2019-03-29Remove duplicate instances of #include "proj_internal.h"Chris Mayo
Introduced by "Merge projects.h into proj_internal.h" 8ab6f683.
2019-03-28Add no-op operation. It does nothing.Kristian Evers
2019-01-04Replace PJ_IO_UNITS_WHATEVER with units from neighbour stepsKristian Evers
With this commit we make sure that proj_angular_input() and proj_angular_output return the correct result for any given pipeline.
2019-01-03Rename PJ_IO_UNITS_ANGULAR to PJ_IO_UNITS_RADIANSKristian Evers
This communicates better what the unit actually is. It also opens the door for potentially adding PJ_IO_UNITS_DEGREES in the future in order to coordinates in degrees correctly as well.
2018-12-30Merge projects.h into proj_internal.hEven Rouault
2018-12-30projects.h: remove deprecated XY, XYZ, LP, LPZ, UV, UVW, projUV and projUVW ↵Even Rouault
structures
2018-12-26cpp conversion: remove useless pj_, PJ_ and proj_ filename prefixesEven Rouault
2018-12-26cpp conversion: move source files in apps/ iso19111/ conversions/ ↵Even Rouault
projections/ transformations/ tests/ subdirectories