aboutsummaryrefslogtreecommitdiff
path: root/src/cct.c
AgeCommit message (Collapse)Author
2018-10-09Fix typosEven Rouault
2018-09-07cct: forward comments to outputKristian Evers
Any text written after the coordinate input will automatically be forwarded to the output stream. Text in columns before the coordinate input is discarded in the output. This works for any combination of -c, -t and -z parameters: $ echo 12 56 100 2018.0 comment comment | cct +proj=merc 1335833.8895 7522963.2411 100.0000 2018.0000 comment commen $ echo text 12 56 100 2018.0 comment | cct -c 2,3,4,5 +proj=merc 1335833.8895 7522963.2411 100.0000 2018.0000 comment $ echo text 12 56 comment | cct -c 2,3 -t0 -z0 +proj=merc 1335833.8895 7522963.2411 0.0000 0.0000 comment $ echo 12 56 comment | cct -t0 -z0 +proj=merc 1335833.8895 7522963.2411 0.0000 0.0000 comment Closes #918
2018-09-05Add -d option to proj, cs2cs and cct (#1109)Søren Holm
Specify number of decimals to display when transforming coordinates with either proj, cs2cs or cct.
2018-05-26cct.c: add missing va_end() in error code path (spotted by cppcheck)Even Rouault
2018-05-23Use proj_strtod.h for proj_strtod and proj_atofKurt Schwehr
2018-05-07Clean readability-inconsistent-declaration-parameter-name clang-tidy warningsKristian Evers
2018-05-05cct usage: add 'I' to docs, re-order usage to same as docsmwtoews
2018-04-13Merge branch 'master' into logging_with_new_apiKristian Evers
2018-04-13Always ignore out-commented lines in cctKristian Evers
Previous to this commit cct would return the following $ cct -c 2,3,4 -t 0 -I +proj=cart +ellps=GRS80 BLAH 3579685.56545 508396.50343 5236837.50646 8.0832413787 55.5578176654 99.9833 0.0000 8.0832413787 55.5578176654 99.9833 0.0000 where the second input should not be parsed as a valid coordinate. With this commit that no longer happens and the input is returned verbatim back to the user. Closes #932
2018-04-12Use PROJ logging facility in cctKristian Evers
2018-04-12Add --skip-lines option to cctKristian Evers
With this it is possible to skip the header when transforming coordinates from a file.
2018-04-03Add --skip-lines option to cctKristian Evers
With this it is possible to skip the header when transforming coordinates from a file.
2018-03-27Print help when calling cct without argumentsKristian Evers
Previously when calling cct without any arguments the following message would be presented to the user: cct: Bad transformation arguments - ((null)) 'cct -h' for help With this change the help instructions are returned instead.
2018-03-27Document --version option in cct and gieKristian Evers
2018-03-14Avoid 'invalidscanf,scanf without field width limits can crash with huge ↵Even Rouault
input data on some versions of libc' with older cppcheck versions
2018-03-14cct.c: fix memory leak (spotted by clang static analyzer)Even Rouault
2018-03-12Fix 'src/cct.c:235,error,resourceLeak,Resource leak: fout' cppcheck warningEven Rouault
2018-03-11Remove angle brackets for proj headers (#849)Thomas Knudsen
* Avoid using angle brackets for PROJ headers. Switching from #include <proj.h> to #include "proj.h", and correspondingly for projects.h and proj_api.h, reduces the risk of accidentally picking up a system installed older version of the header while building a new version of PROJ. * Also handle geodesic.h
2018-02-23Tidy a few typosMike Toews
2018-02-12Make proj_pj_info work correctly for pipelines (#795)Thomas Knudsen
Due to the slightly involved way a pipeline is set up, only a small subset of the definition parameters are directly read by the pj_init code. The remaining parameters will not get their "used" flag set, and for that reason will not be included in the projection definition element of a PJ_PROJ_INFO, returned by proj_pj_info. For now, we force the "used" flag of all elements of a pipeline to be set. The code is tested by introducing cct functionality for printing the projection definition used.
2018-02-04Add --version option to gie and cct.Thomas Knudsen
Additionally correct a spelling error in optargpm.h and remove two lines of leftover cruft from gie.c
2018-01-11Fail gracefully when invalid inverse operation is specified in cct.Kristian Evers
Similar to proj and cs2cs, cct now returns immediately when trying to do an inverse operation that is not possible, for example using proj=urm5 which doesn't have an inverse: $ cct.exe -I +proj=pipeline +step +proj=urm5 +n=0.5 Inverse operation not available
2017-12-20Repair column selector bugThomas Knudsen
2017-12-17Free format everywhere (#693)Thomas Knudsen
* Free format now in cmd lines, in gie, and in init files * Corrected handling of defaults * Add demo of integrated definition and validation * Repair stack-smashing memmove in get_init * repair paralist corruption, clean up debug output * Install test files for nmake builds * Add many improvements following suggestions by @schwehr * Be consistent in requiring lower case everywhere in gie.c Also, this Fixes #703 and Fixes #697
2017-11-25Overhaul ellipsoid handling (#682)Thomas Knudsen
Improve error messaging for cct and gie, and do some clean ups in the ellipsoid handling - partially to squash bugs, partially to improve naming consistency which, in turn, improves the readability of the ellipsoid handling code. Renamed functions: pj_inherit_ellipsoid_defs has been renamed pj_inherit_ellipsoid_def, while pj_calc_ellps_params has been renamed pj_calc_ellipsoid_params. The code in get_opt (part of pj_init.c), which handles whether or not an ellipsoid definition should be dragged in from proj_def.dat, has been rewritten. I suspect this was buggy beforehand, and at least the new code is easier to follow (although it may be slightly slower, which is not really a problem as it sits in the setup code, and hence is executed only once).
2017-11-16Repair double cct io-blunderThomas Knudsen
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-26Repair and improve broken cct output routine (#631)Thomas Knudsen
Repair and improve broken cct output routine and do a few minor cleanups
2017-10-25Repair gie and cct after breakage due to proj_strtod update (#628)Thomas Knudsen
* Repair gie and cct after breakage due to proj_strtod update * Remove unused variables
2017-10-19Parse -I / --inverse properly in cct. Fixes #607.Kristian Evers
2017-09-28Introducing the cct 'Coordinate Conversion and Transformation' program (#574)Thomas Knudsen
* Introducing the cct 'Coordinate Conversion and Transformation' program * cct: Add some rudimentary documentation * Removed documentation again, moving to a separate doc PR * Minor corrections in response to a review by @kbevers