aboutsummaryrefslogtreecommitdiff
path: root/src/apps
AgeCommit message (Collapse)Author
2022-02-19Fix nullptr dereference in utilities whan argv[0] == NULLEven Rouault
https://lwn.net/Articles/?offset=50 was an entertaining reading where we learn that the fact that argv[0] contains the name of the binary is purely a convention, normally taken by the shell that launches the process, but not guaranteed by the execve() system call that does the job. The following test program tested against cct, cs2cs, geod, gie and proj make them cause a null pointer dereference ``` #include <unistd.h> #include <stdio.h> extern char **environ; int main() { char* argv[] = { NULL }; printf("%d\n", execve("/path/to/some/proj/binary", argv, environ)); return 0; } ```
2022-02-14CMake: split configuration files for apps and tests (#3048)Mike Taves
2022-01-09Minor cppcheck fixesEven Rouault
2021-10-09geod / proj: accept lt-inv[geod/proj] name for older libtool versionsEven Rouault
2021-09-28projinfo --list-crs / proj_get_crs_info_list_from_database(): make it work ↵Even Rouault
with IAU generic authority name
2021-09-28Add a mapping for versioned authorities, so that one can use IAU:xxxx or ↵Even Rouault
IAU_2015:xxxx transparently
2021-09-08createOperations(): deal with spherical planetocentric geodetic CRSEven Rouault
This also fixes conversion between geocentric latlong and geodetic latlong with cs2cs. This was dealt with in PR 1093, but in the wrong direction (the geocentric latitude must be <= in absolute value to the geodetic one) The issue here was linked to the semantics of the +geoc specifier, which affects the semantics of the input coordinates in the forward direction (+geoc means that the input coordinate is is a geocentric latitude), which defeats the logic of doing A to B by using the inverse path of A and the forward path of B.
2021-09-04Workaround 'Overlapping read/write of union is undefined behavior' cppcheck ↵Even Rouault
warning (but really fixing them would be more involved)
2021-05-23projinfo: fix error message regarding --output-idEven Rouault
2021-05-23code formatting fixEven Rouault
2021-05-17projsync: make it filter out files not intended for the current versionEven Rouault
* Add a PROJ_DATA.VERSION in proj.db to indicate the target PROJ-data package version * Make projsync use that information and the version_added and version_removed properties added in https://github.com/OSGeo/PROJ-data/pull/67 to filter out files that are not relevant * Add --no-version-filtering and --verbose switches
2021-04-23projinfo: increase file size limit of files opened with @filename to 1MB to ↵Even Rouault
be able to read file generated by ossfuzz
2021-04-23projinfo: catch potential exception (master only, CID 193527)Even Rouault
2021-04-12Merge pull request #2659 from rouault/fix_2603Even Rouault
CRS::normalizeForVisualization(): propagate domains/extent of original CRS (fixes #2603)
2021-04-11projinfo --list-crs --area: make it work when multiple areas matches the ↵Even Rouault
specified name
2021-04-11Reformatting fixEven Rouault
2021-04-11projinfo: add option --list-crs (#2663)Javier Jimenez Shaw
2021-04-11projinfo: add a --normalize-axis-order undocument switchEven Rouault
2021-04-10projinfo: remove spurious -- in help message (master only)Even Rouault
2021-03-15projinfo: add a --dump-db-structure switchEven Rouault
2021-03-15SQL output: add capability to restrict the authorities into which to look ↵Even Rouault
for intermediate objects
2021-03-15projinfo: add a '-o SQL --output-id AUTH:CODE' SQL outputEven Rouault
2021-03-07typo fixesEven Rouault
2021-03-07projinfo: catch exception on bad value for --accuracy (CID 314810)Even Rouault
2021-03-07gie.cpp: use correct type in error message (CID 314813)Even Rouault
2021-03-07cs2cs: catch exception on bad value for --accuracy (CID 314818)Even Rouault
2021-03-07cct: remove useless nullptr checking (CID 314822)Even Rouault
2021-03-03Reformat code with clang-format-10 from ubuntu 20.04Even Rouault
2020-12-16cs2cs: add --no-ballpark and --accuracy optionsEven Rouault
2020-12-15projinfo: add a --accuracy option to define the minimum accuracyEven Rouault
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-02cs2cs / proj_create_crs_to_crs_from_pj(): add a --authority switch to ↵Even Rouault
control where coordinate operations are looked for (fixes #2442)
2020-11-30Merge pull request #2466 from rouault/fix_2423Even Rouault
cs2cs: add --area and --bbox options to restrict candidate coordinate operations (fixes #2423)
2020-11-30API cleanup: unexport number of internal symbols, and remove/replace a few ↵Even Rouault
unused ones
2020-11-29Merge pull request #2450 from rouault/setAllowEllipsoidalHeightAsVerticalCRSEven Rouault
Add option to allow export of Geographic/Projected 3D CRS in WKT1_GDAL
2020-11-28cs2cs: add --area and --bbox options to restrict candidate coordinate ↵Even Rouault
operations (fixes #2423)
2020-11-28Use same arguments to printf format string for both radians and degrees in ↵Houder
output by cct (#2453) Currently the output of the cct utility is different between radians and degrees (as expected by cct), because of a bug in cct: $ printf "1 2\n" | cct -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad 1.0000000000 2.0000000000 0.0000 0.0000 $ printf "1 2\n" | cct -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=deg 1.0000 2.0000 0.0000 0.0000 The arguments to the printf format string are as follows: * radians: width 14, precision 10 * degrees: width 13, precision 4 (this is by mistake. bug!) After the suggested fix has been applied, output will be the same for both radians and degrees: $ printf "1 2\n" | cct -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad 1.0000000000 2.0000000000 0.0000 0.0000 $ printf "1 2\n" | cct -z 0 -t 0 +proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=deg 1.0000000000 2.0000000000 0.0000 0.0000 The cause of the bug is that cct does test if it "has radians to output", but "neglects" to test if it "has degrees to output", resulting in using different arguments to the printf format string in the latter case. The fix makes cct test if it "has either radians or degrees to output".
2020-11-26Merge pull request #2403 from kbevers/remove-proj_api.hKristian Evers
Remove proj_api.h
2020-11-24Add option to allow export of Geographic/Projected 3D CRS in WKT1_GDALEven Rouault
as CompoundCRS with a VerticalCRS being an ellipsoidal height, which is not conformant. But needed for LAS 1.4 that only supports WKT1
2020-11-22projinfo.cpp: improve hint when to use --spatial-test intersectsEven 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-11-20Remove pj_errno and related functionsKristian Evers
2020-11-20Remove pj_free() and move it's functional parts to proj_destroy()Kristian Evers
2020-11-20Remove pj_ctx_* functions and use their proj_context counterpartsKristian Evers
2020-11-20Remove ACCEPT_USE_OF_DEPRECATED_PROJ_API_H macroKristian Evers
2020-11-20Remove proj_api.hKristian Evers
Removes proj_api.h from the public API. The contents of the header file has been moved to proj_internal.h verbatim and any references to proj_api.h has been changed to proj_internal.h. The documentation of proj_api.h has been removed. The only exception to this is the API migration guides which still mention the old API. Fixes #837
2020-11-19Replace line feed in input line by null characterJ.H. van de Water
As result of a modification in logging (adding a line feed), many changes had to be made in different places of cct.cpp. However, one missed the line feed in input to cct. As result of missing this, the output from cct showed a superfluous empty line after each output line, but only if the corresponding input line ended with comment. Replacing the LF in the "comment" string (present if the input line ended with comment) by a null character ('\0') solves this issue. Modification in logging? https://github.com/OSGeo/PROJ/commit/37da5e243191c04607597f6b8a77acfa017a5c99 ( cct: revise end-of-line handling in logging, and always output debug ) See also: https://github.com/OSGeo/PROJ/issues/1677 ( cct outputs excessive whitespace comments are included in input data )
2020-11-17cs2cs, cct, proj and geod: fflush(stdout) after each line to emit each ↵Even Rouault
result as soon as it is produced This is needed when working with pipes, when stdout is not an interactive terminal, and thus the behaviour is to have it buffered as a regular file, whereas with an interactive terminal, each newline character causes an implicit flush.
2020-11-10cct: allow @filename syntaxEven Rouault
Similarly as for projinfo, allow "cct @filename" to mean read filename and use its content as if it was provided inline. Useful for WKT or PROJJSON And a tiny improvements, when the object definition contains ':', only try proj_create_from_database() if the left part (authority name) matches a known authority, to avoid a warning.
2020-11-10Allow cct to instantiate operations via object codes or names (#2419)Kristian Evers
Running cct like cct EPSG:8366 or cct "ITRF2014 to ETRF2014 (1)" is now possible.