1CS2CS(1)        General Commands Manual        CS2CS(1)
2
3
4

NAME

6       cs2cs - cartographic coordinate system filter
7

SYNOPSIS

9       cs2cs [ -eEfIlrstvwW [ args ] ] [ +opts[=arg] ]
10             [ +to [+opts[=arg]] ] file[s]
11

DESCRIPTION

13       Cs2cs performs transformation between the source
14       and destination cartographic  coordinate  system
15       on a set of input points.  The coordinate system
16       transformation can include  translation  between
17       projected  and geographic coordinates as well as
18       the application of datum shifts.
19
20       The following control parameters can  appear  in
21       any order:
22
23       -I     method  to  specify  inverse translation,
24              convert from +to coordinate system to the
25              primary coordinate system defined.
26
27       -ta    A  specifies  a character employed as the
28              first character to denote a control  line
29              to  be passed through without processing.
30              This option  applicable  to  ascii  input
31              only.  (# is the default value).
32
33       -e string
34              String  is an arbitrary string to be out‐
35              put if an error is detected  during  data
36              transformations.   The  default value is:
37              *\t*.  Note that if  the  -b,  -i  or  -o
38              options   are   employed,   an  error  is
39              returned  as  HUGE_VAL  value  for   both
40              return values.
41
42       -E     causes the input coordinates to be copied
43              to the output line prior to printing  the
44              converted values.
45
46       -l[p|P|=|e|u|d]id
47              List  projection identifiers with -l, -lp
48              or -lP (expanded) that  can  be  selected
49              with   +proj.    -l=id   gives   expanded
50              description  of  projection   id.    List
51              ellipsoid  identifiers with -le, that can
52              be selected  with  +ellps,  -lu  list  of
53              cartesian  to  meter  conversion  factors
54              that can be selected with +units  or  -ld
55              list  of datums that can be selected with
56              +datum.
57
58       -r     This options reverses the  order  of  the
59              expected input from longitude-latitude or
60              x-y to latitude-longitude or y-x.
61
62       -s     This options reverses the  order  of  the
63              output  from x-y or longitude-latitude to
64              y-x or latitude-longitude.
65
66       -f format
67              Format is a printf format string to  con‐
68              trol  the form of the output values.  For
69              inverse projections, the output  will  be
70              in  degrees when this option is employed.
71              If a format is specified for inverse pro‐
72              jection  the output data will be in deci‐
73              mal  degrees.   The  default  format   is
74              "%.2f" for forward projection and DMS for
75              inverse.
76
77       -[w|W]n
78              N is the number of significant fractional
79              digits to employ for seconds output (when
80              the  option  is  not  specified,  -w3  is
81              assumed).  When -W is employed the fields
82              will be constant width and  with  leading
83              zeroes.
84
85       -v     causes  a listing of cartographic control
86              parameters tested for  and  used  by  the
87              program  to  be  printed  prior  to input
88              data.
89
90       The +args run-line arguments are associated with
91       cartographic  parameters  and  usage varies with
92       projection and for a  complete  description  see
93       Cartographic  Projection Procedures for the UNIX
94       Environment—A User's  Manual  and  supplementary
95       documentation for Release 4.
96
97       The cs2cs program requires two coordinate system
98       definitions.  The first (or primary  is  defined
99       based on all projection parameters not appearing
100       after the +to argument.  All projection  parame‐
101       ters  appearing  after the +to argument are con‐
102       sidered the definition of the second  coordinate
103       system.  If there is no second coordinate system
104       defined, a geographic coordinate system based on
105       the datum and ellipsoid of the source coordinate
106       system is assumed.  Note  that  the  source  and
107       destination  coordinate  system can both be pro‐
108       jections, both be geographic, or one of each and
109       may have the same or different datums.
110
111       Additional  projection control parameters may be
112       contained in two auxiliary  control  files:  the
113       first   is   optionally   referenced   with  the
114       +init=file:id and the second is always processed
115       after the name of the projection has been estab‐
116       lished from either the run-line or the  contents
117       of   +init   file.   The  environment  parameter
118       PROJ_LIB establishes the default directory for a
119       file  reference  without an absolute path.  This
120       is also used for  supporting  files  like  datum
121       shift files.
122
123       One  or  more  files (processed in left to right
124       order) specify the source of data to  be  trans‐
125       formed.   A  - will specify the location of pro‐
126       cessing standard input.  If no files are  speci‐
127       fied,  the  input  is  assumed to be from stdin.
128       For input data the two data values  must  be  in
129       the  first  two white space separated fields and
130       when both input and output are ASCII all  trail‐
131       ing  portions  of the input line are appended to
132       the output line.
133
134       Input geographic data (longitude  and  latitude)
135       must  be  in  DMS  or decimal degrees format and
136       input cartesian data must be in units consistent
137       with  the  ellipsoid major axis or sphere radius
138       units.  Output geographic coordinates will  nor‐
139       mally be in DMS format (use -f %.12f for decimal
140       degrees with 12 decimal places), while projected
141       (cartesian)   coordinates   will  be  in  linear
142       (meter, feet) units.
143
144

EXAMPLE

146       The following script
147             cs2cs +proj=latlong +datum=NAD83
148                   +to +proj=utm +zone=10  +datum=NAD27
149            -r <<EOF
150             45d15'33.1"   111.5W
151             45d15.551666667N   -111d30
152             +45.25919444444    111d30'000w
153             EOF
154       will  transform the input NAD83 geographic coor‐
155       dinates into NAD27 coordinates in the  UTM  pro‐
156       jection  with  zone 10 selected.  The geographic
157       values of this example are equivalent and  meant
158       as  examples of various forms of DMS input.  The
159       x-y output data will appear as three lines of:
160             1402285.99      5076292.42 0.000
161

SEE ALSO

163       proj(1),
164       Cartographic Projection Procedures for the  UNIX
165       Environment—A  User's  Manual,  (Evenden,  1990,
166       Open-file report 90-284).
167       Map Projections Used by  the  U.  S.  Geological
168       Survey (Snyder, 1984, USGS Bulletin 1532).
169       Map  Projections—A Working Manual (Snyder, 1988,
170       USGS Prof. Paper 1395).
171       An Album of Map Projections (Snyder  &  Voxland,
172       1989, USGS Prof. Paper 1453).
173

BUGS

175       A    list   of   known   bugs   can   found   at
176       https://github.com/OSGeo/proj.4/issues where new
177       bug reports can be submitted too.
178

HOME PAGE

180       http://proj4.org/
181
182
183
184                  2000/03/21 Rel. 4.4          CS2CS(1)
Impressum