aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2018-05-05 20:36:01 +0300
committerGitHub <noreply@github.com>2018-05-05 20:36:01 +0300
commitee3412199916b74b5579f3d1c5aa10bd407c06d5 (patch)
treed0b6f0a289b30482f9a7eb7dbc47db143a682602
parent7acf9c95d8eebfa913b86e72c1620f14ed5c5414 (diff)
parentfeb4e98cb856db07b9c2e730eda7073abc4bf48c (diff)
downloadPROJ-ee3412199916b74b5579f3d1c5aa10bd407c06d5.tar.gz
PROJ-ee3412199916b74b5579f3d1c5aa10bd407c06d5.zip
Merge pull request #980 from mwtoews/doc-update
Update docs for apps / manpages
-rw-r--r--docs/source/apps/cct.rst28
-rw-r--r--docs/source/apps/cs2cs.rst111
-rw-r--r--docs/source/apps/geod.rst122
-rw-r--r--docs/source/apps/gie.rst28
-rw-r--r--docs/source/apps/proj.rst123
-rw-r--r--src/cct.c6
-rw-r--r--src/geod.c2
-rw-r--r--src/proj.c2
8 files changed, 217 insertions, 205 deletions
diff --git a/docs/source/apps/cct.rst b/docs/source/apps/cct.rst
index 20aec06c..a08f1471 100644
--- a/docs/source/apps/cct.rst
+++ b/docs/source/apps/cct.rst
@@ -13,18 +13,18 @@ cct
Synopsis
********
- **cct** [ **-cotvz** [ args ] ] *+opts[=arg]* file[s]
+ **cct** [ **-cIostvz** [ args ] ] *+opts[=arg]* file[s]
Description
***********
:program:`cct` a 4D equivalent to the :program:`proj` projection program,
-performs transformation coordinate systems on a set of input points. The
-coordinate system transformation can include translation between projected
+performs transformation coordinate systems on a set of input points. The
+coordinate system transformation can include translation between projected
and geographic coordinates as well as the application of datum shifts.
-The following control parameters can appear in any order:
+The following control parameters can appear in any order:
.. program:: cct
@@ -32,23 +32,27 @@ The following control parameters can appear in any order:
Specify input columns for (up to) 4 input parameters. Defaults to 1,2,3,4.
+.. option:: -I
+
+ Do the inverse transformation.
+
.. option:: -o <output file name>, --output=<output file name>
Specify the name of the output file.
.. option:: -t <time>, --time=<time>
- Specify a fixed observation time to be used for all input data.
+ Specify a fixed observation *time* to be used for all input data.
.. option:: -z <height>, --height=<height>
- Specify a fixed observation height to be used for all input data.
+ Specify a fixed observation *height* to be used for all input data.
-.. option:: s <n>, --skip-lines=<n>
+.. option:: -s <n>, --skip-lines=<n>
.. versionadded:: 5.1.0
- Skip the first *n* lines of input. This applies to any kind of input, wether
+ Skip the first *n* lines of input. This applies to any kind of input, whether
it comes from ``STDIN``, a file or interactive user input.
.. option:: -v, --verbose
@@ -89,7 +93,7 @@ Examples
.. code-block:: console
- echo 12 55 0 0 | cct +proj=utm +zone=32 +ellps=GRS80
+ echo 12 55 0 0 | cct +proj=utm +zone=32 +ellps=GRS80
will transform the input geographic coordinates into UTM zone 32 coordinates.
Hence, the command
@@ -98,7 +102,7 @@ Hence, the command
echo 12 55 | cct -z0 -t0 +proj=utm +zone=32 +ellps=GRS80
-Should give results comparable to the classic proj command
+Should give results comparable to the classic :program:`proj` command
.. code-block:: console
@@ -120,14 +124,14 @@ Should give results comparable to the classic proj command
.. code-block:: console
- cct -c 5,2,1,4 +proj=utm +ellps=GRS80 +zone=32
+ cct -c 5,2,1,4 +proj=utm +ellps=GRS80 +zone=32
5. As (2) but specify fixed height and time, hence needing only 2 cols in
input:
.. code-block:: console
- cct -t 0 -z 0 +proj=utm +ellps=GRS80 +zone=32
+ cct -t 0 -z 0 +proj=utm +ellps=GRS80 +zone=32
Background
diff --git a/docs/source/apps/cs2cs.rst b/docs/source/apps/cs2cs.rst
index ba77aadf..7256a44c 100644
--- a/docs/source/apps/cs2cs.rst
+++ b/docs/source/apps/cs2cs.rst
@@ -11,47 +11,45 @@ cs2cs
Synopsis
********
- **cs2cs** [ **-eEfIlrstvwW** [ args ] ] [ *+opts[=arg]* ] [ +to [*+opts[=arg]*] ] file[s]
+ **cs2cs** [ **-eEfIlrstvwW** [ args ] ] [ *+opts[=arg]* ] [ +to [*+opts[=arg]*] ] file[s]
Description
***********
:program:`cs2cs` performs transformation between the source and destination
-cartographic coordinate system on a set of input points. The coordinate
-system transformation can include translation between projected and
+cartographic coordinate system on a set of input points. The coordinate
+system transformation can include translation between projected and
geographic coordinates as well as the application of datum shifts.
-The following control parameters can appear in any order:
+The following control parameters can appear in any order:
.. program:: cs2cs
.. option:: -I
- method to specify inverse translation, convert from *+to* coordinate system to
+ Method to specify inverse translation, convert from *+to* coordinate system to
the primary coordinate system defined.
.. option:: -t<a>
- A specifies a character employed as the first character to denote a control
- line to be passed through without processing. This option applicable to
- ascii input only. (# is the default value).
+ Where *a* specifies a character employed as the first character to denote a control
+ line to be passed through without processing. This option applicable to
+ ASCII input only. (# is the default value).
.. option:: -e <string>
- String is an arbitrary string to be output if an error is detected during
- data transformations. The default value is: *\t*. Note that if the -b, -i
- or -o options are employed, an error is returned as HUGE_VAL value for both
- return values.
+ Where *string* is an arbitrary string to be output if an error is detected during
+ data transformations. The default value is a three character string: ``*\t*``.
.. option:: -E
- causes the input coordinates to be copied to the output line prior to
- printing the converted values.
+ Causes the input coordinates to be copied to the output line prior to
+ printing the converted values.
.. option:: -l<[=id]>
List projection identifiers that can be selected with *+proj*. ``cs2cs -l=id``
- gives expanded description of projection id, e.g. ``cs2cs -l=merc``.
+ gives expanded description of projection *id*, e.g. ``cs2cs -l=merc``.
.. option:: -lp
@@ -87,21 +85,26 @@ The following control parameters can appear in any order:
.. option:: -f <format>
- Format is a printf format string to control the form of the output values.
+ Where *format* is a printf format string to control the form of the output values.
For inverse projections, the output will be in degrees when this option is
- employed. If a format is specified for inverse projection the output data
- will be in deci- mal degrees. The default format is "%.2f" for forward
+ employed. If a format is specified for inverse projection the output data
+ will be in decimal degrees. The default format is ``"%.2f"`` for forward
projection and DMS for inverse.
-.. option:: -[w|W]<n>
+.. option:: -w<n>
- N is the number of significant fractional digits to employ for seconds
- output (when the option is not specified, -w3 is assumed). When -W is
- employed the fields will be constant width and with leading zeroes.
+ Where *n* is the number of significant fractional digits to employ for seconds
+ output (when the option is not specified, ``-w3`` is assumed).
+
+.. option:: -W<n>
+
+ Where *n* is the number of significant fractional digits to employ for seconds
+ output. When ``-W`` is employed the fields will be constant width
+ with leading zeroes.
.. option:: -v
- causes a listing of cartographic control parameters tested for and used by
+ Causes a listing of cartographic control parameters tested for and used by
the program to be printed prior to input data.
@@ -113,38 +116,38 @@ The following control parameters can appear in any order:
.. only:: html
The *+args* run-line arguments are associated with cartographic
- parameters. Usage varies with projection and for a complete description
+ parameters. Usage varies with projection and for a complete description
consult the :ref:`projection pages <projections>`.
-The :program:`cs2cs` program requires two coordinate system definitions. The first (or
-primary is defined based on all projection parameters not appearing after the
-*+to* argument. All projection parameters appearing after the *+to* argument
-are considered the definition of the second coordinate system. If there is no
+The :program:`cs2cs` program requires two coordinate system definitions. The first (or
+primary is defined based on all projection parameters not appearing after the
+*+to* argument. All projection parameters appearing after the *+to* argument
+are considered the definition of the second coordinate system. If there is no
second coordinate system defined, a geographic coordinate system based on the
-datum and ellipsoid of the source coordinate system is assumed. Note that the
-source and destination coordinate system can both be projections, both be
+datum and ellipsoid of the source coordinate system is assumed. Note that the
+source and destination coordinate system can both be projections, both be
geographic, or one of each and may have the same or different datums.
-Additional projection control parameters may be contained in two auxiliary
-control files: the first is optionally referenced with the
+Additional projection control parameters may be contained in two auxiliary
+control files: the first is optionally referenced with the
*+init=file:id* and the second is always processed after the name of the
-projection has been established from either the run-line or the contents of
-*+init* file. The environment parameter PROJ_LIB establishes the default
-directory for a file reference without an absolute path. This is also used
-for supporting files like datum shift files.
-
-One or more files (processed in left to right order) specify the source of
-data to be transformed. A ``-`` will specify the location of processing standard
-input. If no files are specified, the input is assumed to be from stdin.
-For input data the two data values must be in the first two white space
-separated fields and when both input and output are ASCII all trailing portions
+projection has been established from either the run-line or the contents of
+*+init* file. The environment parameter :envvar:`PROJ_LIB` establishes the default
+directory for a file reference without an absolute path. This is also used
+for supporting files like datum shift files.
+
+One or more files (processed in left to right order) specify the source of
+data to be transformed. A ``-`` will specify the location of processing standard
+input. If no files are specified, the input is assumed to be from stdin.
+For input data the two data values must be in the first two white space
+separated fields and when both input and output are ASCII all trailing portions
of the input line are appended to the output line.
-Input geographic data (longitude and latitude) must be in DMS or decimal
-degrees format and input cartesian data must be in units consistent with the
-ellipsoid major axis or sphere radius units. Output geographic coordinates will
+Input geographic data (longitude and latitude) must be in DMS or decimal
+degrees format and input cartesian data must be in units consistent with the
+ellipsoid major axis or sphere radius units. Output geographic coordinates will
normally be in DMS format (use ``-f %.12f`` for decimal degrees with 12 decimal
-places), while projected (cartesian) coordinates will be in linear
+places), while projected (cartesian) coordinates will be in linear
(meter, feet) units.
@@ -155,18 +158,20 @@ The following script
::
- cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10 +datum=NAD27 -r
- <<EOF 45d15'33.1" 111.5W 45d15.551666667N -111d30 +45.25919444444
- 111d30'000w EOF
+ cs2cs +proj=latlong +datum=NAD83 +to +proj=utm +zone=10 +datum=NAD27 -r <<EOF
+ 45d15'33.1" 111.5W
+ 45d15.551666667N -111d30
+ +45.25919444444 111d30'000w
+ EOF
-will transform the input NAD83 geographic coordinates into NAD27 coordinates in
-the UTM projection with zone 10 selected. The geographic values of this
-example are equivalent and meant as examples of various forms of DMS input.
+will transform the input NAD83 geographic coordinates into NAD27 coordinates in
+the UTM projection with zone 10 selected. The geographic values of this
+example are equivalent and meant as examples of various forms of DMS input.
The x-y output data will appear as three lines of:
::
- 1402285.99 5076292.42 0.000
+ 1402285.99 5076292.42 0.000
.. only:: man
diff --git a/docs/source/apps/geod.rst b/docs/source/apps/geod.rst
index 3b60f461..f5e61de4 100644
--- a/docs/source/apps/geod.rst
+++ b/docs/source/apps/geod.rst
@@ -7,23 +7,23 @@ geod
Synopsis
********
- **geod** *+ellps=<ellipse>* [ **-afFIlptwW** [ args ] ] [ *+args* ] file[s]
+ **geod** *+ellps=<ellipse>* [ **-afFIlptwW** [ args ] ] [ *+args* ] file[s]
- **invgeod** *+ellps=<ellipse>* [ **-afFIlptwW** [ args ] ] [ *+args* ] file[s]
+ **invgeod** *+ellps=<ellipse>* [ **-afFIlptwW** [ args ] ] [ *+args* ] file[s]
Description
***********
-:program:`geod` (direct) and :program:`invgeod` (inverse) perform geodesic
-(Great Circle) computations for determining latitude, longitude and back
-azimuth of a terminus point given a initial point latitude, longitude,
-azimuth and distance (direct) or the forward and back azimuths and distance
-between an initial and terminus point latitudes and longitudes (inverse).
-The results are accurate to round off for :math:`|f| < 1/50`, where
+:program:`geod` (direct) and :program:`invgeod` (inverse) perform geodesic
+(Great Circle) computations for determining latitude, longitude and back
+azimuth of a terminus point given a initial point latitude, longitude,
+azimuth and distance (direct) or the forward and back azimuths and distance
+between an initial and terminus point latitudes and longitudes (inverse).
+The results are accurate to round off for :math:`|f| < 1/50`, where
:math:`f` is flattening.
-:program:`invgeod` may not be available on all platforms; in this case
+:program:`invgeod` may not be available on all platforms; in this case
use :option:`geod -I` instead.
The following command-line options can appear in any order:
@@ -35,16 +35,16 @@ The following command-line options can appear in any order:
.. option:: -I
Specifies that the inverse geodesic computation is to be performed. May be
- used with execution of geod as an alternative to invgeod execution.
+ used with execution of :program:`geod` as an alternative to :program:`invgeod` execution.
.. option:: -a
Latitude and longitudes of the initial and terminal points, forward and
- back azimuths and distance are output.
+ back azimuths and distance are output.
-.. option:: -ta
+.. option:: -t<a>
- A specifies a character employed as the first character to denote a control
+ Where *a* specifies a character employed as the first character to denote a control
line to be passed through without processing.
.. option:: -le
@@ -54,29 +54,29 @@ The following command-line options can appear in any order:
.. option:: -lu
- Gives a listing of all the units that may be selected with the *+units=*
+ Gives a listing of all the units that may be selected with the *+units=*
option.
.. option:: -f <format>
- Format is a printf format string to control the output form of the
+ Where *format* is a printf format string to control the output form of the
geographic coordinate values. The default mode is DMS for geographic
- coordinates and "%.3f" for distance.
+ coordinates and ``"%.3f"`` for distance.
.. option:: -F <format>
- Format is a printf format string to control the output form of the distance
+ Where *format* is a printf format string to control the output form of the distance
value (``-F``). The default mode is DMS for geographic coordinates and
- "%.3f" for distance.
+ ``"%.3f"`` for distance.
.. option:: -w<n>
- N is the number of significant fractional digits to employ for seconds
+ Where *n* is the number of significant fractional digits to employ for seconds
output (when the option is not specified, ``-w3`` is assumed).
.. option:: -W<n>
- N is the number of significant fractional digits to employ for seconds
+ Where *n* is the number of significant fractional digits to employ for seconds
output. When ``-W`` is employed the fields will be constant width
with leading zeroes.
@@ -85,15 +85,15 @@ The following command-line options can appear in any order:
This option causes the azimuthal values to be output as unsigned DMS
numbers between 0 and 360 degrees. Also note :option:`-f`.
-The *+args* command-line options are associated with geodetic
-parameters for specifying the ellipsoidal or sphere to use.
-controls. The options are processed in left to right order
-from the command line. Reentry of an option is ignored with
+The *+args* command-line options are associated with geodetic
+parameters for specifying the ellipsoidal or sphere to use.
+controls. The options are processed in left to right order
+from the command line. Reentry of an option is ignored with
the first occurrence assumed to be the desired value.
.. only:: html
- See :ref:`projections_intro` for full
+ See :ref:`projections_intro` for full
list of these parameters and controls.
.. only:: man
@@ -101,88 +101,88 @@ the first occurrence assumed to be the desired value.
See the PROJ documentation for a full list of these parameters and
controls.
-One or more files (processed in left to right order) specify
-the source of data to be transformed. A ``-`` will specify the
-location of processing standard input. If no files are specified,
+One or more files (processed in left to right order) specify
+the source of data to be transformed. A ``-`` will specify the
+location of processing standard input. If no files are specified,
the input is assumed to be from stdin.
-For direct determinations input data must be in latitude, longitude,
+For direct determinations input data must be in latitude, longitude,
azimuth and distance order and output will be latitude,
-longitude and back azimuth of the terminus point. Latitude,
-longitude of the initial and terminus point are input for the
-inverse mode and respective forward and back azimuth from the
-initial and terminus points are output along with the distance
+longitude and back azimuth of the terminus point. Latitude,
+longitude of the initial and terminus point are input for the
+inverse mode and respective forward and back azimuth from the
+initial and terminus points are output along with the distance
between the points.
-Input geographic coordinates (latitude and longitude) and
-azimuthal data must be in decimal degrees or DMS format and
+Input geographic coordinates (latitude and longitude) and
+azimuthal data must be in decimal degrees or DMS format and
input distance data must be in units consistent with the ellipsoid
-major axis or sphere radius units. The latitude must lie
-in the range [-90d,90d]. Output geographic coordinates will be
+major axis or sphere radius units. The latitude must lie
+in the range [-90d,90d]. Output geographic coordinates will be
in DMS (if the :option:`-f` switch is not employed) to 0.001" with trailing,
-zero-valued minute-second fields deleted. Output distance
-data will be in the same units as the ellipsoid or sphere
+zero-valued minute-second fields deleted. Output distance
+data will be in the same units as the ellipsoid or sphere
radius.
The Earth's ellipsoidal figure may be selected in the same manner
as program :program:`proj` by using *+ellps=*, *+a=*, *+es=*, etc.
-Geod may also be used to determine intermediate points along
-either a geodesic line between two points or along an arc of
-specified distance from a geographic point. In both cases an
-initial point must be specified with *+lat_1=lat* and *+lon_1=lon*
-parameters and either a terminus point *+lat_2=lat* and
-*+lon_2=lon* or a distance and azimuth from the initial point
+:program:`geod` may also be used to determine intermediate points along
+either a geodesic line between two points or along an arc of
+specified distance from a geographic point. In both cases an
+initial point must be specified with *+lat_1=lat* and *+lon_1=lon*
+parameters and either a terminus point *+lat_2=lat* and
+*+lon_2=lon* or a distance and azimuth from the initial point
with *+S=distance* and *+A=azimuth* must be specified.
-If points along a geodesic are to be determined then either
-*+n_S=integer* specifying the number of intermediate points
-and/or *+del_S=distance* specifying the incremental distance
+If points along a geodesic are to be determined then either
+*+n_S=integer* specifying the number of intermediate points
+and/or *+del_S=distance* specifying the incremental distance
between points must be specified.
-To determine points along an arc equidistant from the initial
-point both *+del_A=angle* and *+n_A=integer* must be specified
+To determine points along an arc equidistant from the initial
+point both *+del_A=angle* and *+n_A=integer* must be specified
which determine the respective angular increments and number of
points to be determined.
Examples
********
-The following script determines the geodesic azimuths and distance in U.S.
+The following script determines the geodesic azimuths and distance in U.S.
statute miles from Boston, MA, to Portland, OR:
.. code-block:: console
- geod +ellps=clrk66 <<EOF -I +units=us-mi
- 42d15'N 71d07'W 45d31'N 123d41'W
- EOF
+ geod +ellps=clrk66 <<EOF -I +units=us-mi
+ 42d15'N 71d07'W 45d31'N 123d41'W
+ EOF
which gives the results:
.. code-block:: console
- -66d31'50.141" 75d39'13.083" 2587.504
+ -66d31'50.141" 75d39'13.083" 2587.504
where the first two values are the azimuth from Boston to Portland,
the back azimuth from Portland to Boston followed by the distance.
-An example of forward geodesic use is to use the Boston location
+An example of forward geodesic use is to use the Boston location
and determine Portland's location by azimuth and distance:
.. code-block:: console
- geod +ellps=clrk66 <<EOF +units=us-mi
- 42d15'N 71d07'W -66d31'50.141" 2587.504
- EOF
+ geod +ellps=clrk66 <<EOF +units=us-mi
+ 42d15'N 71d07'W -66d31'50.141" 2587.504
+ EOF
which gives:
.. code-block:: console
- 45d31'0.003"N 123d40'59.985"W 75d39'13.094"
+ 45d31'0.003"N 123d40'59.985"W 75d39'13.094"
.. note::
- Lack of precision in the distance value compromises the
+ Lack of precision in the distance value compromises the
precision of the Portland location.
Further reading
diff --git a/docs/source/apps/gie.rst b/docs/source/apps/gie.rst
index 777c5833..b6c1c166 100644
--- a/docs/source/apps/gie.rst
+++ b/docs/source/apps/gie.rst
@@ -8,7 +8,7 @@ gie
.. only:: html
- The Geospatial Integrity Investigation Environment
+ The Geospatial Integrity Investigation Environment
Synopsis
********
@@ -34,13 +34,13 @@ already employed for compiling the library.
.. option:: -v, --verbose
- Verbose: Provide non-essential informational output. Repeat :option:`-v` for
+ Verbose: Provide non-essential informational output. Repeat :option:`-v` for
more verbosity (e.g. ``-vv``)
.. option:: -q, --quiet
- Quiet: Opposite of verbose. In quiet mode not even errors are
- reported. Only interaction is through the return code (0 on success,
+ Quiet: Opposite of verbose. In quiet mode not even errors are
+ reported. Only interaction is through the return code (0 on success,
non-zero indicates number of FAILED tests)
.. option:: -l, --list
@@ -75,7 +75,7 @@ like:
</gie>
-Parsing of a :program:`gie` file starts at ``<gie>`` and ends when ``</gie>``
+Parsing of a :program:`gie` file starts at ``<gie>`` and ends when ``</gie>``
is reached. Anything before ``<gie>`` and after ``</gie>`` is not considered.
Test cases are created by defining an :option:`operation` which
:option:`accept` an input coordinate and :option:`expect` an output
@@ -142,8 +142,8 @@ gie command language
accepted for one :option:`operation`. For each :option:`accept` an
accompanying :option:`expect` is needed.
- Note that :program:`gie` accepts the underscore ("_") as a thousands
- separator. It is not required (in fact, it is entirely ignored by the
+ Note that :program:`gie` accepts the underscore (``_``) as a thousands
+ separator. It is not required (in fact, it is entirely ignored by the
input routine), but it significantly improves the readability of the very
long strings of numbers typically required in projected coordinates.
@@ -163,7 +163,7 @@ gie command language
In addition to expecting a coordinate it is also possible to expect a
PROJ error code in case an operation can't be created. This is useful when
testing that errors are caught and handled correctly. Below is an example of
- that tests that the pipeline operator fails correctly when a non-invertable
+ that tests that the pipeline operator fails correctly when a non-invertible
pipeline is constructed.
.. code-block:: console
@@ -179,7 +179,7 @@ gie command language
The :option:`tolerance` command controls how much accepted coordinates
can deviate from the expected coordinate. This is handy to test that an
operation meets a certain numerical tolerance threshold. Some operations
- are expexted to be accurate within milimeters where others might only be
+ are expected to be accurate within millimeters where others might only be
accurate within a few meters. :option:`tolerance` should
.. code-block:: console
@@ -251,7 +251,7 @@ gie command language
.. code-block:: console
- operation proj=hgridshift +grids=nzgd2kgrid0005.gsb ellps=GRS80
+ operation proj=hgridshift +grids=nzgd2kgrid0005.gsb ellps=GRS80
tolerance 1 mm
ignore pjd_err_failed_to_load_grid
accept 172.999892181021551 -45.001620431954613
@@ -286,7 +286,7 @@ gie command language
.. option:: skip
- Skip any test after the first occurence of :option:`skip`. In the example below only
+ Skip any test after the first occurrence of :option:`skip`. In the example below only
the first test will be performed. The second test is skipped. This feature is mostly
relevant for debugging when writing new test cases.
@@ -307,12 +307,12 @@ Background
More importantly than being an acronym for "Geospatial Integrity Investigation
Environment", gie were also the initials, user id, and USGS email address of
Gerald Ian Evenden (1935--2016), the geospatial visionary, who, already in the
-1980s, started what was to become the PROJ of today.
+1980s, started what was to become the PROJ of today.
Gerald's clear vision was that map projections are *just special functions*.
Some of them rather complex, most of them of two variables, but all of them
*just special functions*, and not particularly more special than the :c:func:`sin()`,
-:c:func:`cos()`, :c:func:`tan()`, and :c:func:`hypot()` already available in the C standard library.
+:c:func:`cos()`, :c:func:`tan()`, and :c:func:`hypot()` already available in the C standard library.
And hence, according to Gerald, *they should not be particularly much harder
to use*, for a programmer, than the :c:func:`sin()`'s, :c:func:`tan()`'s and
@@ -322,7 +322,7 @@ Gerald's ingenuity also showed in the implementation of the vision, where
he devised a comprehensive, yet simple, system of key-value pairs for
parameterising a map projection, and the highly flexible :c:type:`PJ` struct, storing
run-time compiled versions of those key-value pairs, hence making a map
-projection function call, ``pj_fwd(PJ, point)``, as easy as a traditional function
+projection function call, ``pj_fwd(PJ, point)``, as easy as a traditional function
call like ``hypot(x,y)``.
While today, we may have more formally well defined metadata systems (most
diff --git a/docs/source/apps/proj.rst b/docs/source/apps/proj.rst
index dee4ea89..43e2038c 100644
--- a/docs/source/apps/proj.rst
+++ b/docs/source/apps/proj.rst
@@ -12,21 +12,21 @@ proj
Synopsis
********
- **proj** [ **-bceEfiIlmorsStTvVwW** ] [ args ] ] [ *+args* ] file[s]
+ **proj** [ **-beEfiIlmorsStTvVwW** ] [ args ] ] [ *+args* ] file[s]
- **invproj** [ **-bceEfiIlmorsStTwW** ] [ args ] ] [ *+args* ] file[s]
+ **invproj** [ **-beEfiIlmorsStTvVwW** ] [ args ] ] [ *+args* ] file[s]
Description
***********
-:program:`proj` and :program:`invproj` perform respective forward and inverse
-transformation of cartographic data to or from cartesian data with a wide
-range of selectable projection functions.
+:program:`proj` and :program:`invproj` perform respective forward and inverse
+transformation of cartographic data to or from cartesian data with a wide
+range of selectable projection functions.
-:program:`invproj` may not be available on all platforms; in this case
+:program:`invproj` may not be available on all platforms; in this case
use :option:`proj -I` instead.
-The following control parameters can appear in any order
+The following control parameters can appear in any order
.. program:: proj
@@ -34,7 +34,7 @@ The following control parameters can appear in any order
Special option for binary coordinate data input and output through standard
input and standard output. Data is assumed to be in system type double
- floating point words. This option is to be used when proj is a son process
+ floating point words. This option is to be used when :program:`proj` is a child process
and allows bypassing formatting operations.
.. option:: -i
@@ -43,8 +43,8 @@ The following control parameters can appear in any order
.. option:: -I
- alternate method to specify inverse projection. Redundant when used with
- invproj.
+ Alternate method to specify inverse projection. Redundant when used with
+ :program:`invproj`.
.. option:: -o
@@ -52,26 +52,26 @@ The following control parameters can appear in any order
.. option:: -t<a>
- *a* specifies a character employed as the first character to denote a
- control line to be passed through without processing. This option
- applicable to ascii input only. (# is the default value).
+ Where *a* specifies a character employed as the first character to denote a
+ control line to be passed through without processing. This option
+ applicable to ASCII input only. (# is the default value).
.. option:: -e <string>
- String is an arbitrary string to be output if an error is detected during
- data transformations. The default value is: *\t*. Note that if the
- :option:`-b`, :option:`-i` or :option:`-o` options are employed, an error
- is returned as HUGE_VAL value for both return values.
+ Where *string* is an arbitrary string to be output if an error is detected during
+ data transformations. The default value is a three character string: ``*\t*``.
+ Note that if the :option:`-b`, :option:`-i` or :option:`-o` options are employed, an error
+ is returned as HUGE_VAL value for both return values.
.. option:: -E
- causes the input coordinates to be copied to the output line prior to
+ Causes the input coordinates to be copied to the output line prior to
printing the converted values.
.. option:: -l<[=id]>
List projection identifiers that can be selected with *+proj*. ``proj -l=id``
- gives expanded description of projection id, e.g. ``proj -l=merc``.
+ gives expanded description of projection *id*, e.g. ``proj -l=merc``.
.. option:: -lp
@@ -95,7 +95,6 @@ The following control parameters can appear in any order
List of datums that can be selected with the *+datum* parameter.
-
.. option:: -r
This options reverses the order of the expected input from
@@ -116,28 +115,33 @@ The following control parameters can appear in any order
.. option:: -m <mult>
- The cartesian data may be scaled by the mult parameter. When processing data
+ The cartesian data may be scaled by the *mult* parameter. When processing data
in a forward projection mode the cartesian output values are multiplied by
- mult otherwise the input cartesian values are divided by mult before inverse
- projection. If the first two characters of mult are 1/ or 1: then the
- reciprocal value of mult is employed.
+ *mult* otherwise the input cartesian values are divided by *mult* before inverse
+ projection. If the first two characters of *mult* are 1/ or 1: then the
+ reciprocal value of *mult* is employed.
.. option:: -f <format>
- Format is a printf format string to control the form of the output values.
+ Where *format* is a printf format string to control the form of the output values.
For inverse projections, the output will be in degrees when this option is
- employed. The default format is "%.2f" for forward projection and DMS for
+ employed. The default format is ``"%.2f"`` for forward projection and DMS for
inverse.
-.. option:: -[w|W]<n>
+.. option:: -w<n>
+
+ Where *n* is the number of significant fractional digits to employ for seconds
+ output (when the option is not specified, ``-w3`` is assumed).
+
+.. option:: -W<n>
- N is the number of significant fractional digits to employ for seconds
- output (when the option is not specified, ``-w3`` is assumed). When ``-W``
- is employed the fields will be constant width and with leading zeroes.
+ Where *n* is the number of significant fractional digits to employ for seconds
+ output. When ``-W`` is employed the fields will be constant width
+ with leading zeroes.
.. option:: -v
- causes a listing of cartographic control parameters tested for and used by
+ Causes a listing of cartographic control parameters tested for and used by
the program to be printed prior to input data. Should not be used with the
:option:`-T` option.
@@ -149,24 +153,24 @@ The following control parameters can appear in any order
.. option:: -T <ulow,uhi,vlow,vhi,res[,umax,vmax]>
This option creates a set of bivariate Chebyshev polynomial coefficients
- that approximate the selected cartographic projection on stdout. The values
- low and hi denote the range of the input where the u or v prefixes apply to
+ that approximate the selected cartographic projection on stdout. The values
+ *low* and *hi* denote the range of the input where the *u* or *v* prefixes apply to
respective longitude-x or latitude-y depending upon whether a forward or
- inverse projection is selected. Res is an integer number specifying the
- power of 10 precision of the approximation. For example, a res of -3
- specifies an approximation with an accuracy better than .001. Umax, and vmax
+ inverse projection is selected. The integer *res* is a number specifying the
+ power of 10 precision of the approximation. For example, a *res* of -3
+ specifies an approximation with an accuracy better than 0.001. Optional *umax*, and *vmax*
specify maximum degree of the polynomials (default: 15).
The *+args* run-line arguments are associated with cartographic parameters.
-Additional projection control parameters may be contained in two auxiliary
-control files: the first is optionally referenced with the
+Additional projection control parameters may be contained in two auxiliary
+control files: the first is optionally referenced with the
*+init=file:id* and the second is always processed after the name of the
projection has been established from either the run-line or the contents of
-+init file. The environment parameter :envvar:`PROJ_LIB` establishes the
-default directory for a file reference without an absolute path. This is
-also used for supporting files like datum shift files.
++init file. The environment parameter :envvar:`PROJ_LIB` establishes the
+default directory for a file reference without an absolute path. This is
+also used for supporting files like datum shift files.
.. only:: html
@@ -174,17 +178,17 @@ also used for supporting files like datum shift files.
consult the :ref:`projection pages <projections>`.
-One or more files (processed in left to right order) specify the source of
-data to be transformed. A ``-`` will specify the location of processing standard
-input. If no files are specified, the input is assumed to be from stdin.
-For ASCII input data the two data values must be in the first two white space
-separated fields and when both input and output are ASCII all trailing
+One or more files (processed in left to right order) specify the source of
+data to be transformed. A ``-`` will specify the location of processing standard
+input. If no files are specified, the input is assumed to be from stdin.
+For ASCII input data the two data values must be in the first two white space
+separated fields and when both input and output are ASCII all trailing
portions of the input line are appended to the output line.
-Input geographic data (longitude and latitude) must be in DMS format and input
-cartesian data must be in units consistent with the ellipsoid major axis or
-sphere radius units. Output geographic coordinates will be in DMS (if the
-``-w`` switch is not employed) and precise to 0.001" with trailing, zero-valued
+Input geographic data (longitude and latitude) must be in DMS format and input
+cartesian data must be in units consistent with the ellipsoid major axis or
+sphere radius units. Output geographic coordinates will be in DMS (if the
+``-w`` switch is not employed) and precise to 0.001" with trailing, zero-valued
minute-second fields deleted.
Example
@@ -193,16 +197,15 @@ The following script
.. code-block:: console
- proj +proj=utm +lon_0=112w +ellps=clrk66
- -r <<EOF
- 45d15'33.1" 111.5W
- 45d15.551666667N -111d30
- +45.25919444444 111d30'000w
- EOF
+ proj +proj=utm +lon_0=112w +ellps=clrk66 -r <<EOF
+ 45d15'33.1" 111.5W
+ 45d15.551666667N -111d30
+ +45.25919444444 111d30'000w
+ EOF
-will perform UTM forward projection with a standard UTM central meridian
-nearest longitude 112W. The geographic values of this example are equivalent
-and meant as examples of various forms of DMS input. The x-y output
+will perform UTM forward projection with a standard UTM central meridian
+nearest longitude 112W. The geographic values of this example are equivalent
+and meant as examples of various forms of DMS input. The x-y output
data will appear as three lines of::
460769.27 5011648.45
@@ -216,7 +219,7 @@ data will appear as three lines of::
projected coordinates within one datum.
The :program:`cs2cs` program operates similarly, but allows translation
- between any paor of definable coordinate reference systems, including
+ between any pair of definable coordinate reference systems, including
support for datum translation.
See also
diff --git a/src/cct.c b/src/cct.c
index 956f91b3..d9d25329 100644
--- a/src/cct.c
+++ b/src/cct.c
@@ -101,12 +101,12 @@ static const char usage[] = {
"--------------------------------------------------------------------------------\n"
"Options:\n"
"--------------------------------------------------------------------------------\n"
- " -o /path/to/file Specify output file name\n"
" -c x,y,z,t Specify input columns for (up to) 4 input parameters.\n"
" Defaults to 1,2,3,4\n"
- " -z value Provide a fixed z value for all input data (e.g. -z 0)\n"
- " -t value Provide a fixed t value for all input data (e.g. -t 0)\n"
" -I Do the inverse transformation\n"
+ " -o /path/to/file Specify output file name\n"
+ " -t value Provide a fixed t value for all input data (e.g. -t 0)\n"
+ " -z value Provide a fixed z value for all input data (e.g. -z 0)\n"
" -s n Skip n first lines of a infile\n"
" -v Verbose: Provide non-essential informational output.\n"
" Repeat -v for more verbosity (e.g. -vv)\n"
diff --git a/src/geod.c b/src/geod.c
index e90d71b5..bb52818e 100644
--- a/src/geod.c
+++ b/src/geod.c
@@ -21,7 +21,7 @@ inverse = 0; /* != 0 then inverse geodesic */
*osform = "%.3f", /* output format for S */
pline[50], /* work string */
*usage =
-"%s\nusage: %s [ -afFIptTwW [args] ] [ +opts[=arg] ] [ files ]\n";
+"%s\nusage: %s [ -afFIlptwW [args] ] [ +opts[=arg] ] [ files ]\n";
static void
printLL(double p, double l) {
if (oform) {
diff --git a/src/proj.c b/src/proj.c
index c3b604c9..01b32065 100644
--- a/src/proj.c
+++ b/src/proj.c
@@ -49,7 +49,7 @@ static char
static const char
*oterr = "*\t*", /* output line for unprojectable input */
- *usage = "%s\nusage: %s [ -beEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]\n";
+ *usage = "%s\nusage: %s [ -beEfiIlmorsStTvVwW [args] ] [ +opts[=arg] ] [ files ]\n";
static struct FACTORS facs;