aboutsummaryrefslogtreecommitdiff
path: root/html/man_cs2cs.html
blob: 4e84b4904f98ae54e47748e78b44cd082ca1373b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<HTML><HEAD><TITLE>Manpage of PROJ</TITLE>
</HEAD><BODY>
<H1>PROJ</H1>
Section: User Commands  (1)<BR>Updated: 2000/03/21 Rel. 4.4<BR><A HREF="#index">Index</A>
<A HREF="../index.html">Return to Main Contents</A><HR>

<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>

cs2cs - cartographic coordinate system filter
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>

<B>cs2cs</B>

[
<B>-eEfIlrstvwW</B>

[
<I>args</I>

] ] [
<B>+opts[=arg]</B>

]
<BR>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&nbsp;<B>+to</B>&nbsp;[<B>+opts</B>[<B>=arg</B>]]&nbsp;]
file[s]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>

<I>Cs2cs</I>

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 geographic 
coordinates as well as the application of datum shifts.
<P>

The following control parameters can appear in any order:
<DL COMPACT>
<DT><B>-I</B>

<DD>
method to specify inverse translation, convert from <B>+to</B> coordinate
system to the primary coordinate system defined.
<DT><B>-t</B><I>a</I>

<DD>
<I>A</I>

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).
<DT><B>-e</B><I> string</I>

<DD>
<I>String</I>

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>-b,</B>

<B>-i</B>

or
<B>-o</B>

options are employed, an error is returned as HUGE_VAL
value for both return values.
<DT><B>-E</B>

<DD>
causes the input coordinates to be copied to the output line
prior to printing the converted values.
<DT><B>-l</B><I>[p|P|=|e|u|d]</I><B>id</B>

<DD>
List projection identifiers with
<B>-l,</B>

<B>-lp</B>

or
<B>-lP (expanded)</B>

that can be selected with
<B>+proj.</B>

<B>-l=</B><I>id</I>

gives expanded description of projection
<I>id.</I>

List ellipsoid identifiers with
<B>-le,</B>

that can be selected with
<B>+ellps,</B>

<B>-lu</B>

list of cartesian to meter conversion factors
that can be selected with
<B>+units</B>

or
<B>-ld</B>

list of datums that can be selected with 
<B>+datum.</B>

<DT><B>-r</B>

<DD>
This options reverses the order of the
expected input from longitude-latitude or x-y to latitude-longitude or y-x.
<DT><B>-s</B>

<DD>
This options reverses the order of the
output from x-y or longitude-latitude to y-x or latitude-longitude.
<DT><B>-f</B><I> format</I>

<DD>
<I>Format</I>

is a
<I>printf</I>

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 decimal degrees.
The default format is &quot;%.2f&quot; for forward projection and DMS
for inverse.
<DT><B>-[w|W]</B><I>n</I>

<DD>
<I>N</I>

is the number of significant fractional digits to employ for
seconds output (when the option is not specified,
<B>-w3</B>

is assumed).
When
<B>-W</B>

is employed the fields will be constant width and with leading zeroes.
<DT><B>-v</B>

<DD>
causes a listing of cartographic control parameters tested for and
used by the program to be printed prior to input data.
</DL>
<P>

The
<B>+args</B>

run-line arguments are associated with cartographic parameters
and usage varies with projection and for a complete description see
<I>Cartographic Projection Procedures for the UNIX Environment---A User's Manual )</I>

and supplementary documentation for Release 4.
<P>

The <I>cs2cs</I> program requires two coordinate system definitions.  The
first (or primary is defined based on all projection parameters not
appearing after the <B>+to</B> argument.  All projection parameters 
appearing after the <B>+to</B> 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 geographic, or one of
each and may have the same or different datums.  
<P>

Additional projection control parameters may be contained in two
auxilliary control files:
the first is optionally referenced with the
<B>+init=</B><I>file:id</I>

and the second is always processed after the name
of the projection has been established from either the run-line
or the contents of
<B>+init</B>

file.
The environment parameter
<B>PROJ_LIB</B>

establishes the default directory for a file reference without
an absolute path.  This is also used for supporting files like
datum shift files.
<P>

One or more
<I>files</I>

(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
<I>stdin.</I>

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.
<P>

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
<B>-w</B>

switch is not employed) and precise to 0.001&quot;
with trailing, zero-valued minute-second fields deleted.
<A NAME="lbAE">&nbsp;</A>
<H2>EXAMPLE</H2>

The following script
<DL COMPACT><DT><DD>
<BR>&nbsp;<TT>cs2cs&nbsp;+proj=latlong&nbsp;+datum=NAD83&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+to&nbsp;+proj=utm&nbsp;+zone=10&nbsp;+datum=NAD27&nbsp;-r&nbsp;&lt;&lt;EOF
<BR>&nbsp;45d15'33.1&quot;<TT>&nbsp;&nbsp;&nbsp;&nbsp;</TT>111.5W<BR>
<BR>&nbsp;45d15.551666667N<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>-111d30<BR>
<BR>&nbsp;+45.25919444444<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>111d30'000w<BR>
<BR>&nbsp;EOF</TT>
</DL>

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:
<DL COMPACT><DT><DD>
<BR>&nbsp;<TT>1402285.99&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5076292.42&nbsp;0.000
</DL>

</TT><A NAME="lbAF">&nbsp;</A>
<H2>SEE ALSO</H2>

<B><A HREF="../man1U/proj.1U.html">proj</A>(1U),</B>

<BR>

<I>Cartographic Projection Procedures for the UNIX Environment---A User's Manual,</I>

(Evenden, 1990, Open-file report 90-284).
<BR>

<I>Map Projections Used by the U. S. Geological Survey</I>

(Snyder, 1984,
USGS Bulletin 1532).
<BR>

<I>Map Projections---A Working Manual</I>

(Synder, 1988, USGS Prof. Paper 1395).
<BR>

<I>An Album of Map Projections</I>

(Snyder &amp; Voxland, 1989, USGS Prof. Paper 1453).
<A NAME="lbAG">&nbsp;</A>
<H2>HOME PAGE</H2>

<A HREF="http://www.remotesensing.org/proj">http://www.remotesensing.org/proj</A>
<P>

<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">EXAMPLE</A><DD>
<DT><A HREF="#lbAF">SEE ALSO</A><DD>
<DT><A HREF="#lbAG">HOME PAGE</A><DD>
</DL>
<HR>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 13:14:44 GMT, October 14, 2005
</BODY>
</HTML>