Orthorectification and Affine Transformation
Orthorectification and affine transformation are two common geometric transformation methods in geospatial data processing. They differ significantly in application and purpose.
Orthorectification
Orthorectification is the process of correcting remote sensing imagery or aerial photographs that contain terrain relief and sensor geometric distortion into a nadir ground view, such as a map, so that the position of each pixel in the image strictly corresponds to its real-world ground coordinates. The method starts from a camera or sensor model, such as RPC or a polynomial model, combines it with a digital elevation model (DEM), projects each image pixel into three-dimensional ground space, and then resamples it onto a unified projection plane.
In short:
It straightens a tilted image and corrects for uneven terrain.
| Characteristic | Description |
|---|---|
| Correction target | Terrain relief, tilt, and sensor imaging distortion |
| Input data | Raw image + digital elevation model (DEM) + RPC or geometric model |
| Output image | Orthophoto / orthoimage |
| Accuracy | Highest; suitable for demanding applications such as measurement, cartography, and GIS analysis |
| Overlay capability | Can overlay seamlessly with maps and GIS layers without geometric error |
| Common uses | Aerial photogrammetry, satellite remote sensing, and UAV mapping |
Affine Transformation
An affine transformation is a two-dimensional geometric transformation that preserves straight lines and parallelism. It is used for image geometric correction, such as image registration, mosaicking, and projection transformation. It uses linear algebra to implement an approximate linear mapping between image coordinates and ground coordinates.
Affine Transformation Parameters in GDAL
GDAL uses an array of length 6, called GeoTransform, to describe the affine relationship from pixel space, or raster indices, to geographic space, or map coordinates:
GeoTransform[6] = [GT0, GT1, GT2, GT3, GT4, GT5]
This transformation defines the mapping from raster row and column (i, j) to geographic coordinates (X_geo, Y_geo):
Parameter meanings, based on the official GDAL definition:
| Parameter index | Name | English description | Meaning |
|---|---|---|---|
GT0 | TopLeftX | X coordinate of the top-left corner of the top-left pixel | Map X coordinate of the upper-left pixel, usually projected or geographic coordinates |
GT1 | PixelWidth | W-E pixel resolution / pixel size in X direction | Size of each pixel in the X direction, usually positive |
GT2 | RotationX | Row rotation (typically 0) | X component affected by row-direction rotation, usually 0 |
GT3 | TopLeftY | Y coordinate of the top-left corner of the top-left pixel | Map Y coordinate of the upper-left pixel |
GT4 | RotationY | Column rotation (typically 0) | Y component affected by column-direction rotation, usually 0 |
GT5 | PixelHeight | N-S pixel resolution / pixel size in Y direction (usually negative) | Size of each pixel in the Y direction, usually negative to indicate downward image rows |
References:
Raster Data Model - GDAL documentation
Affine Transformation in GeoTIFF
Affine transformation is the core mechanism that accurately connects GeoTIFF imagery to real-world geographic coordinate systems. GDAL, and most GIS software, uses six GeoTransform parameters plus projection information, such as WKT or EPSG, to transform an image from pixel-grid space into geographic space.
How affine transformation is stored in GeoTIFF:
- TIFF tags:
ModelPixelScaleTag-> corresponds to GT1 and GT5, the pixel sizeModelTiepointTag-> corresponds to GT0 and GT3, the image reference point
- GeoKeyDirectoryTag:
- Stores CRS information such as EPSG code, units, and projection type
- GDAL metadata, in an external
.auxor VRT file:GeoTransformexplicitly represents all six parameters
Comparison Summary
| Item | Orthorectification | Affine Transformation |
|---|---|---|
| Accounts for elevation | Yes; accounts for terrain relief with a DEM | No; ignores terrain height differences |
| Geometric model accuracy | High; supports sensor modeling | Medium; linear model |
| Required data | Image + DEM + geometric model/RPC | Image + control points |
| Application scenarios | Aerial orthophotos and satellite image mapping | Image registration and minor terrain correction |
| Transformation property | Nonlinear projection transformation | Linear geometric transformation |
| Accuracy and cost | High accuracy but computationally complex | Medium accuracy but fast |