From 6be4e25c66e805218c851d67157e4d1ddc0a761e Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 10 Nov 2020 14:40:17 +0100 Subject: cct: allow @filename syntax 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. --- docs/source/apps/cct.rst | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'docs/source') diff --git a/docs/source/apps/cct.rst b/docs/source/apps/cct.rst index 8f138d92..b8504b8d 100644 --- a/docs/source/apps/cct.rst +++ b/docs/source/apps/cct.rst @@ -17,9 +17,9 @@ Synopsis or - **cct** [**-cIostvz** [args]] {operation_reference} file ... + **cct** [**-cIostvz** [args]] {object_definition} file ... -Where {operation_reference} is one of the possibilities accepted +Where {object_definition} is one of the possibilities accepted by :c:func:`proj_create`, provided it expresses a coordinate operation - a proj-string, @@ -39,6 +39,15 @@ by :c:func:`proj_create`, provided it expresses a coordinate operation operations in :program:`cct`. +or + + **cct** [**-cIostvz** [args]] {object_reference} file ... + +where {object_reference} is a filename preceded by the '@' character. The +file referenced by the {object_reference} must contain a valid +{object_definition}. + + .. versionadded:: 8.0.0 @@ -185,6 +194,20 @@ Should give results comparable to the classic :program:`proj` command $ echo 12 56 100 2018.0 auxiliary data | cct +proj=merc 1335833.8895 7522963.2411 100.0000 2018.0000 auxiliary data +7. Coordinate operation referenced through its code + +.. code-block:: console + + $ echo 3541657.3778 948984.2343 5201383.5231 2020.5 | cct EPSG:8366 + 3541657.9112 948983.7503 5201383.2482 2020.5000 + +8. Coordinate operation referenced through its name + +.. code-block:: console + + $ echo 3541657.3778 948984.2343 5201383.5231 2020.5 | cct "ITRF2014 to ETRF2014 (1)" + 3541657.9112 948983.7503 5201383.2482 2020.5000 + Background ********** -- cgit v1.2.3