GDALTRANSFORM(1)

πŸ“¦
version 3.4.3 Β· 2 versions
, in epel 9

πŸ’… 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 that OGRSpatialReference.SetFromUserInput() supports, which includes EPSG PCS and GCSes (i.e. EPSG:4296), PROJ.4 declarations (as above), or the name of a .prj file 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 the OGRSpatialReference.SetFromUserInput() call, which includes EPSG PCS and GCSes (i.e. EPSG:4296), PROJ.4 declarations (as above), or the name of a .prj file 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 a urn:ogc:def:coordinateOperation:EPSG::XXXX URN β€” 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 to GDALCreateGenImgProjTransformer2(). iykyk. πŸ’…
  • -order <n> β€” the order of polynomial used for warping (1 to 3). 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_srs or -gcp parameters. 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. 🫢


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