1PROJ(1) PROJ PROJ(1)
2
3
4
6 proj - Cartographic projection filter
7
9 proj [-beEfiIlmorsStTvVwW] [args]] [+opt[=arg] ...] file ...
10
11 invproj [-beEfiIlmorsStTvVwW] [args]] [+opt[=arg] ...] file ...
12
14 proj and invproj perform respective forward and inverse conversion of
15 cartographic data to or from cartesian data with a wide range of se‐
16 lectable projection functions.
17
18 invproj may not be available on all platforms; in this case use proj -I
19 instead.
20
21 The following control parameters can appear in any order
22
23 -b Special option for binary coordinate data input and output
24 through standard input and standard output. Data is assumed to
25 be in system type double floating point words. This option is to
26 be used when proj is a child process and allows bypassing for‐
27 matting operations.
28
29 -d <n>
30
31 New in version 5.2.0: Specify the number of decimals to round to in the
32 output.
33
34
35 -i Selects binary input only (see -b).
36
37 -I Alternate method to specify inverse projection. Redundant when
38 used with invproj.
39
40 -o Selects binary output only (see -b).
41
42 -t<a> Where a specifies a character employed as the first character to
43 denote a control line to be passed through without processing.
44 This option applicable to ASCII input only. (# is the default
45 value).
46
47 -e <string>
48 Where string is an arbitrary string to be output if an error is
49 detected during data transformations. The default value is a
50 three character string: *\t*. Note that if the -b, -i or -o op‐
51 tions are employed, an error is returned as HUGE_VAL value for
52 both return values.
53
54 -E Causes the input coordinates to be copied to the output line
55 prior to printing the converted values.
56
57 -l<[=id]>
58 List projection identifiers that can be selected with +proj.
59 proj -l=id gives expanded description of projection id, e.g.
60 proj -l=merc.
61
62 -lp List of all projection id that can be used with the +proj param‐
63 eter. Equivalent to proj -l.
64
65 -lP Expanded description of all projections that can be used with
66 the +proj parameter.
67
68 -le List of all ellipsoids that can be selected with the +ellps pa‐
69 rameters.
70
71 -lu List of all distance units that can be selected with the +units
72 parameter.
73
74 -r This options reverses the order of the expected input from lon‐
75 gitude-latitude or x-y to latitude-longitude or y-x.
76
77 -s This options reverses the order of the output from x-y or longi‐
78 tude-latitude to y-x or latitude-longitude.
79
80 -S Causes estimation of meridional and parallel scale factors, area
81 scale factor and angular distortion, and maximum and minimum
82 scale factors to be listed between <> for each input point. For
83 conformal projections meridional and parallel scales factors
84 will be equal and angular distortion zero. Equal area projec‐
85 tions will have an area factor of 1.
86
87 -m <mult>
88 The cartesian data may be scaled by the mult parameter. When
89 processing data in a forward projection mode the cartesian out‐
90 put values are multiplied by mult otherwise the input cartesian
91 values are divided by mult before inverse projection. If the
92 first two characters of mult are 1/ or 1: then the reciprocal
93 value of mult is employed.
94
95 -f <format>
96 Where format is a printf format string to control the form of
97 the output values. For inverse projections, the output will be
98 in degrees when this option is employed. The default format is
99 "%.2f" for forward projection and DMS for inverse.
100
101 -w<n> Where n is the number of significant fractional digits to employ
102 for seconds output (when the option is not specified, -w3 is as‐
103 sumed).
104
105 -W<n> Where n is the number of significant fractional digits to employ
106 for seconds output. When -W is employed the fields will be con‐
107 stant width with leading zeroes.
108
109 -v Causes a listing of cartographic control parameters tested for
110 and used by the program to be printed prior to input data.
111
112 -V This option causes an expanded annotated listing of the charac‐
113 teristics of the projected point. -v is implied with this op‐
114 tion.
115
116 The +opt run-line arguments are associated with cartographic parame‐
117 ters. Additional projection control parameters may be contained in two
118 auxiliary control files: the first is optionally referenced with the
119 +init=file:id and the second is always processed after the name of the
120 projection has been established from either the run-line or the con‐
121 tents of +init file. The environment parameter PROJ_DATA establishes
122 the default directory for a file reference without an absolute path.
123 This is also used for supporting files like datum shift files.
124
125 One or more files (processed in left to right order) specify the source
126 of data to be converted. A - will specify the location of processing
127 standard input. If no files are specified, the input is assumed to be
128 from stdin. For ASCII input data the two data values must be in the
129 first two white space separated fields and when both input and output
130 are ASCII all trailing portions of the input line are appended to the
131 output line.
132
133 Input geographic data (longitude and latitude) must be in DMS or deci‐
134 mal degrees format and input cartesian data must be in units consistent
135 with the ellipsoid major axis or sphere radius units. Output geographic
136 coordinates will be in DMS (if the -w switch is not employed) and pre‐
137 cise to 0.001" with trailing, zero-valued minute-second fields deleted.
138
140 The following script
141
142 proj +proj=utm +lon_0=112w +ellps=clrk66 -r <<EOF
143 45d15'33.1" 111.5W
144 45d15.551666667N -111d30
145 +45.25919444444 111d30'000w
146 EOF
147
148 will perform UTM forward projection with a standard UTM central merid‐
149 ian nearest longitude 112W. The geographic values of this example are
150 equivalent and meant as examples of various forms of DMS input. The x-y
151 output data will appear as three lines of:
152
153 460769.27 5011648.45
154
156 The proj program is limited to converting between geographic and pro‐
157 jected coordinates within one datum.
158
159 The cs2cs program operates similarly, but allows translation between
160 any pair of definable coordinate reference systems, including support
161 for datum translation.
162
164 cs2cs(1), cct(1), geod(1), gie(1), projinfo(1), projsync(1)
165
167 A list of known bugs can be found at
168 https://github.com/OSGeo/PROJ/issues where new bug reports can be sub‐
169 mitted to.
170
172 https://proj.org/
173
175 Gerald I. Evenden
176
178 1983-2023
179
180
181
182
1839.2.1 Jun 1, 2023 PROJ(1)