aboutsummaryrefslogtreecommitdiff
path: root/src/apps/cs2cs.cpp
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; } ```
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-03-07cs2cs: catch exception on bad value for --accuracy (CID 314818)Even Rouault
2020-12-16cs2cs: add --no-ballpark and --accuracy optionsEven Rouault
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-28cs2cs: add --area and --bbox options to restrict candidate coordinate ↵Even Rouault
operations (fixes #2423)
2020-11-20Remove pj_errno and related functionsKristian Evers
2020-11-20Remove pj_ctx_* functions and use their proj_context counterpartsKristian Evers
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-05-09scripts/fix_typos.sh: fix URLs to dictionaries, and fix typos spottedEven Rouault
2020-03-18cs2cs: don't require +to for '{source_crs} {target_crs} filename...' syntax ↵Even Rouault
(fixes #2012)
2020-03-13Tag proj_list_units() as deprecatedEven Rouault
2020-01-13Remove -ld option from proj and cs2csKristian Evers
It promotes use of deprecated paramters +datum and +towgs84 which we don't want to encourage. Closes #1308
2019-11-21Fix typos in code commentsEven Rouault
2019-09-13cs2cs: autopromote CRS to 3D when there's a mix of 2D and 3D (fixes #1563)Even Rouault
2019-08-26Add a proj_cleanup() function to free global resources, typically at process ↵Even Rouault
termination
2019-05-03cs2cs: set time value to HUGE_VAL if not explicitly specifiedEven Rouault
2019-04-20proj/cs2cs: validate value of -f parameter to avoid potential crashes (fixes ↵Even Rouault
#124)
2019-03-27Merge pull request #1373 from rouault/coverity_fixesKristian Evers
Coverity fixes
2019-03-26Merge pull request #1349 from cjmayo/manoptsKristian Evers
Doc: Be consistent in use of +opts
2019-03-26cs2cs: remove dead code that would leak memory. Coverity CID 193534Even Rouault
2019-03-24Doc: consistently use +opt and bracketsChris Mayo
+opt represents one parameter. An ellipsis indicates additional instances of the previous parameter may be given. Spaces are used between parameters and before an ellipsis, not purely to format brackets. See man(1) SYNOPSIS conventions.
2019-03-24Make cs2cs support 4D coordinates.Kristian Evers
This is a bit of a hack, 4D coordinates *will* be written to STDOUT but the output format speficied with -f is not respected for the t component, rather it is forward verbatim from the input. Fixes #1354
2019-02-20typo fixes: s/Explictly/Explicitly/ and s/instanciat/instantiat/Even Rouault
2019-01-22cs2cs: improve detection of 'cs2cs [-....] SRC DST' syntaxEven Rouault
2019-01-17Remove proj_create_from_proj_string() and proj_create_from_user_input(), and ↵Even Rouault
make proj_create() do more or less what proj_create_from_user_input() did before (fixes #1214)
2019-01-17import/export PROJ strings from ISO19111 code: require/output +type=crs for ↵Even Rouault
CRS objects (refs #1214)
2019-01-02Typo fixesEven Rouault
2018-12-30Rename proj_obj_XXX as proj_XXX and PJ_OBJ_XXX as PJ_XXXEven Rouault
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-30Remove PJ_OBJ type since it is now merged into PJEven Rouault
2018-12-26cpp conversion: move source files in apps/ iso19111/ conversions/ ↵Even Rouault
projections/ transformations/ tests/ subdirectories