GDALTRANSFORM(1)
π gdaltransform β the GDAL manual page, but make it make sense π«Ά
okay so bestie, welcome to the gdaltransform glow-up β¨ this is the page from the GDAL manual where we learn how to transform coordinates β like, take a point that lives in one coordinate system and yeet it into another one. reprojection, GCPs, the whole thing. no cap, this one's a little powerhouse. π¦
β¨ NAME β¨
gdaltransform β literally just Transforms coordinates. that's her whole job. π
πΈ SYNOPSIS πΈ
gdaltransform [--help-general]
[-i] [-s_srs srs_def] [-t_srs srs_def] [-to "NAME=VALUE"]
[-ct proj_string] [-order n] [-tps] [-rpc] [-geoloc]
[-gcp pixel line easting northing [elevation]]* [-output_xy]
[srcfile [dstfile]]
π DESCRIPTION π
so the gdaltransform utility reprojects a whole list of coordinates into any supported projection, including GCP-based transformations. any of 'em. she's flexible like that. π
π the options (each and every one, bestie)
-s_srs <srs_def>β sets the source spatial reference. and what coordinate systems can you pass in here? literally anything thatOGRSpatialReference.SetFromUserInput()supports, which includes EPSG PCS and GCSes (i.e.EPSG:4296), PROJ.4 declarations (as above), or the name of a.prjfile containing well known text. so many options, so little time. π-t_srs <srs_def>β sets the target spatial reference. same deal as above: the coordinate systems you can pass are anything supported by theOGRSpatialReference.SetFromUserInput()call, which includes EPSG PCS and GCSes (i.e.EPSG:4296), PROJ.4 declarations (as above), or the name of a.prjfile containing well known text. twins! π«Ά-ct <string>β this one's the fancy one. it takes a PROJ string (either a single step operation, or a multiple step string starting with+proj=pipeline), a WKT2 string describing a CoordinateOperation, or aurn:ogc:def:coordinateOperation:EPSG::XXXXURN β and it overrides the default transformation from the source to the target CRS. β οΈ heads up though: it must take into account the axis order of the source and target CRS. no skipping that.
New in version 3.0. β¨
-to NAME=VALUEβ sets a transformer option suitable to pass toGDALCreateGenImgProjTransformer2(). iykyk. π-order <n>β the order of polynomial used for warping (1to3). the default is to select a polynomial order based on the number of GCPs. she picks for you. π-tpsβ force use of thin plate spline transformer based on available GCPs. yes, thin plate spline. iconic name, honestly. π₯-rpcβ force use of RPCs. periodt.-geolocβ force use of Geolocation Arrays. slay. πΈ-iβ inverse transformation: from destination to source. she goes backwards. π (in a good way)-gcp <pixel> <line> <easting> <northing> [<elevation>]β provides a GCP to be used for transformation (generally three or more are required). so like, bring friends. π―ββοΈ-output_xyβ restricts output to"x y"instead of"x y z". no z, no problem. π¦<srcfile>β file with source projection definition or GCP's. if it's not given, the source projection is read from the command-line-s_srsor-gcpparameters. she'll find it. π<dstfile>β file with destination projection definition. π
π§ the whole vibe of how it works
coordinates are read from standard input as pairs, triples (for 3D,) or (since GDAL 3.0.0,) quadruplets (for X,Y,Z,time) of numbers per line β then transformed, then written out to standard output in the same way. all transformations offered by gdalwarp are handled, including gcp-based ones. literally all of them. π
β οΈ note: input and output must always be in decimal form. there is currently no support for DMS input or output. not her era, sorry bestie. π
and if an input image file is provided, input is in pixel/line coordinates on that image. if an output file is provided, output is in pixel/line coordinates on that image. simple as that. π
π₯ EXAMPLES π₯
π« Reprojection Example
simple reprojection from one projected coordinate system to another β look how easy she makes it look:
gdaltransform -s_srs EPSG:28992 -t_srs EPSG:31370
177502 311865
produces the following output in meters in the "Belge 1972 / Belgian Lambert 72" projection:
244510.77404604 166154.532871342 -1046.79270555763
ate. π
π¦ Image RPC Example
the following command requests an RPC based transformation using the RPC model associated with the named file. and because the -i (inverse) flag is used, the transformation is from output georeferenced (WGS84) coordinates back to image coordinates. going back to where it came from, main character energy π«
gdaltransform -i -rpc 06OCT20025052-P2AS-005553965230_01_P001.TIF
125.67206 39.85307 50
produces this output measured in pixels and lines on the image:
3499.49282422381 2910.83892848414 50
π X,Y,Z,time transform
a 15-term time-dependent Helmert coordinate transformation from ITRF2000 to ITRF93 for a coordinate at epoch 2000.0 β yes, that's a lot of terms, she's built different:
gdaltransform -ct "+proj=pipeline +step +proj=unitconvert +xy_in=deg \
+xy_out=rad +step +proj=cart +step +proj=helmert +convention=position_vector \
+x=0.0127 +dx=-0.0029 +rx=-0.00039 +drx=-0.00011 +y=0.0065 +dy=-0.0002 \
+ry=0.00080 +dry=-0.00019 +z=-0.0209 +dz=-0.0006 +rz=-0.00114 +drz=0.00007 \
+s=0.00195 +ds=0.00001 +t_epoch=1988.0 +step +proj=cart +inv +step \
+proj=unitconvert +xy_in=rad +xy_out=deg"
2 49 0 2000
produces this output measured in longitude degrees, latitude degrees and ellipsoid height in metre:
2.0000005420366 49.0000003766711 -0.0222802283242345
obsessed. π
π AUTHOR π
Frank Warmerdam <warmerdam@pobox.com>, Jan Hartmann <j.l.h.hartmann@uva.nl>
legend behaviour, honestly. π«Ά
π COPYRIGHT π
1998-2026
and that's the whole page bestie!! π this was gdaltransform(1) from the GDAL manual β source/version vibes courtesy of GDAL, dated Jan 08, 2026. go transform some coordinates, you've got this. πππ
π¦ where this page comes from
- epel 9: gdal3.4 3.4.3-5.el9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms