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
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
|
.. _projinfo:
================================================================================
projinfo
================================================================================
.. Index:: projinfo
.. only:: html
.. versionadded:: 6.0.0
Geodetic object and coordinate operation queries
Synopsis
********
| **projinfo**
| [-o formats] [-k crs|operation|ellipsoid] [--summary] [-q]
| [[--area name_or_code] | [--bbox west_long,south_lat,east_long,north_lat]]
| [--spatial-test contains|intersects]
| [--crs-extent-use none|both|intersection|smallest]
| [--grid-check none|discard_missing|sort] [--show-superseded]
| [--pivot-crs always|if_no_direct_transformation|never|{auth:code[,auth:code]*}]
| [--boundcrs-to-wgs84]
| [--main-db-path path] [--aux-db-path path]*
| [--identify]
| [--c-ify] [--single-line]
| {object_definition} | {object_reference} | (-s {srs_def} -t {srs_def})
|
where {object_definition} or {srs_def} is
- a proj-string,
- a WKT string,
- an object code (like "EPSG:4326", "urn:ogc:def:crs:EPSG::4326",
"urn:ogc:def:coordinateOperation:EPSG::1671"),
- a OGC URN combining references for compound coordinate reference systems
(e.g "urn:ogc:def:crs,crs:EPSG::2393,crs:EPSG::5717" or custom abbreviated
syntax "EPSG:2393+5717"),
- a OGC URN combining references for concatenated operations
(e.g. "urn:ogc:def:coordinateOperation,coordinateOperation:EPSG::3895,coordinateOperation:EPSG::1618")
{object_reference} is a filename preceded by the '@' character. The
file referenced by the {object_reference} must contain a valid
{object_definition}.
Description
***********
:program:`projinfo` is a program that can query information on a geodetic object,
coordinate reference system (CRS) or coordinate operation, when the ``-s`` and ``-t``
options are specified, and display it under different formats (PROJ string, WKT string).
It can also be used to query coordinate operations available between two CRS.
The program is named with some reference to the GDAL :program:`gdalsrsinfo` that offers
partly similar services.
The following control parameters can appear in any order:
.. program:: projinfo
.. option:: -o formats
formats is a comma separated combination of:
``all``, ``default``, ``PROJ``, ``WKT_ALL``, ``WKT2_2015``, ``WKT2_2018``, ``WKT1_GDAL``, ``WKT1_ESRI``.
Except ``all`` and ``default``, other formats can be preceded by ``-`` to disable them.
.. option:: -k crs|operation|ellipsoid
When used to query a single object with a AUTHORITY:CODE, determines the (k)ind of the object
in case there are CRS, coordinate operations or ellipsoids with the same CODE.
The default is crs.
.. option:: --summary
When listing coordinate operations available between 2 CRS, return the
result in a summary format, mentioning only the name of the coordinate
operation, its accuracy and its area of use.
.. note:: only used for coordinate operation computation
.. option:: -q
Turn on quiet mode. Quiet mode is only available for queries on single objects,
and only one output format is selected. In that mode, only the PROJ or WKT
string is displayed, without other introduction output. The output is then
potentially compatible of being piped in other utilities.
.. option:: --area name_or_code
Specify an area of interest to restrict the results when researching
coordinate operations between 2 CRS. The area of interest can be specified either
as a name (e.g "Denmark - onshore") or a AUTHORITY:CODE (EPSG:3237)
This option is exclusive of :option:`--bbox`.
.. note:: only used for coordinate operation computation
.. option:: --bbox west_long,south_lat,east_long,north_lat
Specify an area of interest to restrict the results when researching
coordinate operations between 2 CRS. The area of interest is specified as a
bounding box with geographic coordinates, expressed in degrees in a
unspecified geographic CRS.
`west_long` and `east_long` should be in the [-180,180] range, and
`south_lat` and `north_lat` in the [-90,90]. `west_long` is generally lower than
`east_long`, except in the case where the area of interest crosses the antimeridian.
.. note:: only used for coordinate operation computation
.. option:: --spatial-test contains|intersects
Specify how the area of use of coordinate operations found in the database
are compared to the area of use specified explicitly with :option:`--area` or :option:`--bbox`,
or derived implicitly from the area of use of the source and target CRS.
By default, projinfo will only keep coordinate operations whose are of use
is strictly within the area of interest (``contains`` strategy).
If using the ``intersects`` strategy, the spatial test is relaxed, and any
coordinate operation whose area of use at least partly intersects the
area of interest is listed.
.. note:: only used for coordinate operation computation
.. option:: --crs-extent-use none|both|intersection|smallest
Specify which area of interest to consider when no explicit one is specified
with :option:`--area` or :option:`--bbox` options.
By default (``smallest`` strategy), the area of
use of the source or target CRS will be looked, and the one that is the
smallest one in terms of area will be used as the area of interest.
If using ``none``, no area of interest is used.
If using ``both``, only coordinate operations that relate (contain or intersect
depending of the :option:`--spatial-test` strategy) to the area of use of both CRS
are selected.
If using ``intersection``, the area of interest is the intersection of the
bounding box of the area of use of the source and target CRS
.. note:: only used for coordinate operation computation
.. option:: --grid-check none|discard_missing|sort
Specify how the presence or absence of a horizontal or vertical shift grid
required for a coordinate operation affects the results returned when
researching coordinate operations between 2 CRS.
The default strategy is ``sort``: in that case, all candidate
operations are returned, but the actual availability of the grids is used
to determine the sorting order. That is, if a coordinate operation involves
using a grid that is not available in the PROJ resource directories
(determined by the :envvar:`PROJ_LIB` environment variable, it will be listed in
the bottom of the results.
The ``none`` strategy completely disables the checks of presence of grids and
this returns the results as if all the grids where available.
The ``discard_missing`` strategy discards results that involve grids not
present in the PROJ resource directories.
.. note:: only used for coordinate operation computation
.. option:: -show-superseded
When enabled, coordinate operations that are superseded by others will be
listed. Note that supersession is not equivalent to deprecation: superseded
operations are still considered valid although they have a better equivalent,
whereas deprecated operations have been determined to be erroneous and are
not considered at all.
.. note:: only used for coordinate operation computation
.. option:: --pivot-crs always|if_no_direct_transformation|never|{auth:code[,auth:code]*}
Determine if intermediate (pivot) CRS can be used when researching coordinate
operation between 2 CRS. A typical example is the WGS84 pivot. By default,
projinfo will consider any potential pivot if there is no direct transformation
( ``if_no_direct_transformation``). If using the ``never`` strategy,
only direct transformations between the source and target CRS will be
used. If using the ``always`` strategy, intermediate CRS will be considered
even if there are direct transformations.
It is also possible to restrict the pivot CRS to consider by specifying
one or several CRS by their AUTHORITY:CODE.
.. note:: only used for coordinate operation computation
.. option:: --boundcrs-to-wgs84
When specified, this option researches a coordinate operation from the
base geographic CRS of the single CRS, source or target CRS to the WGS84
geographic CRS, and if found, wraps those CRS into a BoundCRS object.
This is mostly to be used for early-binding approaches.
.. option:: --main-db-path path
Specify the name and path of the database to be used by projinfo. The
default is proj.db in the PROJ resource directories.
.. option:: --aux-db-path path
Specify the name and path of auxiliary databases, that are to be combined
with the main database. Those auxiliary databases must have a table
structure that is identical to the main database, but can be partly filled
and their entries can refer to entries of the main database.
The option may be repeated to specify several auxiliary databases.
.. option:: --identify
When used with an object definition, this queries the PROJ database to find
known objects, typically CRS, that are close or identical to the object.
Each candidate object is associated with an approximate likelihood percentage.
This is useful when used with a WKT string that lacks a EPSG identifier,
such as ESRI WKT1. This might also be used with PROJ strings.
For example, `+proj=utm +zone=31 +datum=WGS84 +type=crs` will be identified
with a likelihood of 70% to EPSG:32631
.. option:: --c-ify
For developers only. Modify the string output of the utility so that it
is easy to put those strings in C/C++ code
.. option:: --single-line
Output WKT strings on a single line, instead of multiple intended lines by
default.
Examples
********
1. Query the CRS object corresponding to EPSG:4326
.. code-block:: console
projinfo EPSG:4326
Output:
::
PROJ.4 string:
+proj=longlat +datum=WGS84 +no_defs +type=crs
WKT2_2018 string:
GEOGCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["geodetic latitude (Lat)",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
USAGE[
SCOPE["unknown"],
AREA["World"],
BBOX[-90,-180,90,180]],
ID["EPSG",4326]]
2. List the coordinate operations between NAD27 (designed with its CRS name)
and NAD83 (designed with its EPSG code 4269) within an area of interest
.. code-block:: console
projinfo -s NAD27 -t EPSG:4269 --area "USA - Missouri"
Output:
::
DERIVED_FROM(EPSG):1241, NAD27 to NAD83 (1), 0.15 m, USA - CONUS including EEZ
PROJ string:
+proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=unitconvert \
+xy_in=deg +xy_out=rad +step +proj=hgridshift +grids=conus \
+step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1
WKT2_2018 string:
COORDINATEOPERATION["NAD27 to NAD83 (1)",
SOURCECRS[
GEOGCRS["NAD27",
DATUM["North American Datum 1927",
ELLIPSOID["Clarke 1866",6378206.4,294.978698213898,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["geodetic latitude (Lat)",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]]]],
TARGETCRS[
GEOGCRS["NAD83",
DATUM["North American Datum 1983",
ELLIPSOID["GRS 1980",6378137,298.257222101,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["geodetic latitude (Lat)",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]]]],
METHOD["CTABLE2"],
PARAMETERFILE["Latitude and longitude difference file","conus"],
OPERATIONACCURACY[0.15],
USAGE[
SCOPE["unknown"],
AREA["USA - CONUS including EEZ"],
BBOX[23.81,-129.17,49.38,-65.69]],
ID["DERIVED_FROM(EPSG)",1241]]
.. only:: man
See also
********
**cs2cs(1)**, **cct(1)**, **geod(1)**, **gie(1)**, **proj(1)**
Bugs
****
A list of know bugs can be found at https://github.com/OSGeo/proj.4/issues
where new bug reports can be submitted to.
Home page
*********
https://proj.org/
|