1GDALTRANSFORM(1) GDAL GDALTRANSFORM(1)
2
3
4
6 gdaltransform - Transforms coordinates.
7
9 gdaltransform [--help-general]
10 [-i] [-s_srs srs_def] [-t_srs srs_def] [-to "NAME=VALUE"]
11 [-ct proj_string] [-order n] [-tps] [-rpc] [-geoloc]
12 [-gcp pixel line easting northing [elevation]]* [-output_xy]
13 [srcfile [dstfile]]
14
16 The gdaltransform utility reprojects a list of coordinates into any
17 supported projection,including GCP-based transformations.
18
19 -s_srs <srs_def>
20 Set source spatial reference. The coordinate systems that can
21 be passed are anything supported by the OGRSpatialReference.Set‐
22 FromUserInput() call, which includes EPSG PCS and GCSes (i.e.
23 EPSG:4296), PROJ.4 declarations (as above), or the name of a
24 .prj file containing well known text.
25
26 -t_srs <srs_def>
27 set target spatial reference. The coordinate systems that can
28 be passed are anything supported by the OGRSpatialReference.Set‐
29 FromUserInput() call, which includes EPSG PCS and GCSes (i.e.
30 EPSG:4296), PROJ.4 declarations (as above), or the name of a
31 .prj file containing well known text.
32
33 -ct <string>
34 A PROJ string (single step operation or multiple step string
35 starting with +proj=pipeline), a WKT2 string describing a Coor‐
36 dinateOperation, or a urn:ogc:def:coordinateOperation:EPSG::XXXX
37 URN overriding the default transformation from the source to the
38 target CRS. It must take into account the axis order of the
39 source and target CRS.
40
41 New in version 3.0.
42
43
44 -to NAME=VALUE
45 set a transformer option suitable to pass to
46 GDALCreateGenImgProjTransformer2().
47
48 -order <n>
49 order of polynomial used for warping (1 to 3). The default is to
50 select a polynomial order based on the number of GCPs.
51
52 -tps Force use of thin plate spline transformer based on available
53 GCPs.
54
55 -rpc Force use of RPCs.
56
57 -geoloc
58 Force use of Geolocation Arrays.
59
60 -i Inverse transformation: from destination to source.
61
62 -gcp <pixel> <line> <easting> <northing> [<elevation>]
63 Provide a GCP to be used for transformation (generally three or
64 more are required)
65
66 -output_xy
67 Restrict output to "x y" instead of "x y z"
68
69 <srcfile>
70 File with source projection definition or GCP's. If not given,
71 source projection is read from the command-line -s_srs or -gcp
72 parameters
73
74 <dstfile>
75 File with destination projection definition.
76
77 Coordinates are read as pairs, triples (for 3D,) or (since GDAL 3.0.0,)
78 quadruplets (for X,Y,Z,time) of numbers per line from standard input,
79 transformed, and written out to standard output in the same way. All
80 transformations offered by gdalwarp are handled, including gcp-based
81 ones.
82
83 Note that input and output must always be in decimal form. There is
84 currently no support for DMS input or output.
85
86 If an input image file is provided, input is in pixel/line coordinates
87 on that image. If an output file is provided, output is in pixel/line
88 coordinates on that image.
89
91 Reprojection Example
92 Simple reprojection from one projected coordinate system to another:
93
94 gdaltransform -s_srs EPSG:28992 -t_srs EPSG:31370
95 177502 311865
96
97 Produces the following output in meters in the "Belge 1972 / Belgian
98 Lambert 72" projection:
99
100 244510.77404604 166154.532871342 -1046.79270555763
101
102 Image RPC Example
103 The following command requests an RPC based transformation using the
104 RPC model associated with the named file. Because the -i (inverse)
105 flag is used, the transformation is from output georeferenced (WGS84)
106 coordinates back to image coordinates.
107
108 gdaltransform -i -rpc 06OCT20025052-P2AS-005553965230_01_P001.TIF
109 125.67206 39.85307 50
110
111 Produces this output measured in pixels and lines on the image:
112
113 3499.49282422381 2910.83892848414 50
114
115 X,Y,Z,time transform
116 15-term time-dependent Helmert coordinate transformation from ITRF2000
117 to ITRF93 for a coordinate at epoch 2000.0
118
119 gdaltransform -ct "+proj=pipeline +step +proj=unitconvert +xy_in=deg \
120 +xy_out=rad +step +proj=cart +step +proj=helmert +convention=position_vector \
121 +x=0.0127 +dx=-0.0029 +rx=-0.00039 +drx=-0.00011 +y=0.0065 +dy=-0.0002 \
122 +ry=0.00080 +dry=-0.00019 +z=-0.0209 +dz=-0.0006 +rz=-0.00114 +drz=0.00007 \
123 +s=0.00195 +ds=0.00001 +t_epoch=1988.0 +step +proj=cart +inv +step \
124 +proj=unitconvert +xy_in=rad +xy_out=deg"
125 2 49 0 2000
126
127 Produces this output measured in longitude degrees, latitude degrees
128 and ellipsoid height in metre:
129
130 2.0000005420366 49.0000003766711 -0.0222802283242345
131
133 Frank Warmerdam <warmerdam@pobox.com>, Jan Hartmann <j.l.h.hart‐
134 mann@uva.nl>
135
137 1998-2023
138
139
140
141
142 Apr 17, 2023 GDALTRANSFORM(1)