Skip to content
← Back to GIS Fundamentals
gis-fundamentalsIntermediate· 8 min read

Transformations in GIS: Datum, Coordinate and Image Transformations

The four things GIS calls a transformation: reprojection, datum shifts, georeferencing fits and resampling, with the types, how many control points each needs and how to judge the error.

One word, several meanings

GIS software uses the word transformation for jobs that are quite different. Knowing which one you need saves time and avoids hidden errors.

KindWhat changesWhat it needsExample
ReprojectionCoordinates move from one projection to another on the same datumTwo coordinate systemsLatitude and longitude to UTM
Datum transformationCoordinates move from one datum to anotherTransformation parameters or a grid fileAn old local datum to WGS 84
Geometric (image) transformationAn image or map is fitted to known pointsControl pointsGeoreferencing a scan
ResamplingNew cell values are worked out after a raster is movedA choice of methodWarping a raster to a new CRS

A fifth meaning, the change of values and not of position, is covered at the end.

Reprojection

A map projection is a formula that turns locations on a curved surface into flat coordinates. Reprojection applies one formula backward and another forward. When both coordinate systems use the same datum, the maths is exact and needs no control points. Converting a CSV of latitude and longitude, which is EPSG:4326, to UTM zone 43N, which is EPSG:32643, is a reprojection. Setting a CRS on a layer is not a reprojection. It only changes the label, as the note on coordinate systems explains.

Datum transformation

A datum is the reference model of the Earth that coordinates are measured against. Two datums place the same point at slightly different coordinates. A datum transformation corrects for that. It is done with a set of parameters, a seven-parameter shift in three dimensions, or with a grid file that stores the shift for each area.

These transformations are approximate, and several may exist for the same pair of datums, each with a stated accuracy and area of use. The registry of coordinate systems lists them as operations with codes. If your software offers a choice, pick the one whose area covers your data and whose accuracy suits your work, and record it. The shift can be a few metres, and for old local datums it can reach hundreds of metres. A layer that sits in the wrong place after reprojection often has a datum problem.

Geometric transformations

Georeferencing fits an image to control points. The transformation is the rule for that fit.

TypeWhat it doesParametersFewest points
LinearShifts and scales, without rotation42
HelmertShifts, rotates and scales evenly, so shapes are kept42
Affine, or polynomial order 1Adds shear and unequal scale, so straight lines stay straight63
Polynomial order 2Curved fit126
Polynomial order 3More flexible curved fit2010
ProjectiveCorrects the perspective of a flat object photographed at an angle84
Thin plate splineStretches the image locally to pass through every pointManyMany, well spread

The number of control points must be at least the number of coefficients per axis, and more is better, because extra points show how good the fit is. A higher order can match the points and still distort the image between them. Start with the simplest transformation that fits. For satellite images that are already corrected for terrain, a first order polynomial is usually enough. A scanned map with paper distortion may need more.

Judging the error

Each control point has a residual, which is the distance between where the transformation puts it and where it should be. The root mean square error, or RMSE, summarises them. A point with a much larger residual than the others is usually a mistake. A thin plate spline passes through every point, so its residuals are always zero, and a low RMSE tells you nothing about the places between points. Check the result against points that were not used in the fit, and spread control points over the whole image.

The note on georeferencing gives more detail on residuals.

Resampling

When a raster is moved to a new grid, the new cells do not line up with the old ones, so new values must be worked out. The method matters.

MethodHow it worksSuitsWatch for
Nearest neighbourTakes the value of the closest cellClasses, such as land cover codesBlocky edges, and some cells repeated or skipped
BilinearAverages the four nearest cells by distanceContinuous values, such as elevation or temperatureSmoothing, and new values that were not in the data
Cubic convolutionFits a curve through the sixteen nearest cellsImagery that you will look atSharper, but values can overshoot

Never use bilinear or cubic on class codes. An average of class 2 and class 4 is class 3, which is a different class. Resample once and from the original data, because each resampling blurs the raster.

Value transformations

Some operations in image processing are also called transformations, but they change cell values and not position. Principal component analysis, the tasselled cap and band ratios are examples. The chapter on spectral indices covers the ratios.

Choosing and recording

  1. Ask what needs to change: the projection, the datum, the position of an image or the grid.
  2. Pick the matching kind from the first table.
  3. For an image, choose a transformation type, check the residuals and test against independent points.
  4. For a raster, choose a resampling method that matches the data type.
  5. Record what you did: the source and target coordinate systems, the datum transformation if any, the transformation type, the RMSE and the resampling method.

Example: the QGIS series

In the tutorials, a CSV of coordinates is reprojected from EPSG:4326 to EPSG:32643, which is exact because the datum is the same. An unreferenced Landsat image is georeferenced to a Sentinel-2 image with ten control points and a first order polynomial, then checked against the residuals. A digital elevation model is warped to UTM with bilinear resampling, which suits heights, and a land cover raster would use nearest neighbour.

Common mistakes

  • Treating a change of label as a reprojection.
  • Ignoring the datum when data comes from an old or local source.
  • Using a high-order polynomial because it gives a low RMSE.
  • Trusting a thin plate spline because its residuals are zero.
  • Using bilinear or cubic resampling on classes.
  • Resampling the same raster several times.
  • Not recording the transformation that was used.

Glossary

TermMeaning
ReprojectionConverting coordinates between projections on one datum
Datum transformationConverting coordinates between datums
Control pointA location with known coordinates in both systems
ResidualThe distance between a control point's fitted and true position
RMSEThe root mean square of the residuals
ResamplingWorking out new cell values when a raster changes grid

Practise it

The tutorial Georeferencing tries transformation types and reads the residuals. The tutorial CSV, joins, reprojection and Field Calculator reprojects a layer, and Coordinate reference systems shows how to measure under different CRSs.

Test yourself

1. What is the difference between reprojection and a datum transformation?

Reprojection changes the projection on the same datum, and the maths is exact. A datum transformation changes the datum and is approximate, using parameters or a grid.

2. Why can a high-order polynomial be risky?

It can fit the control points closely and still distort the image between them, so a low RMSE can give false confidence.

3. Which resampling method should you use for a land cover raster?

Nearest neighbour, because it keeps the original class codes. Averaging methods would create classes that do not exist.

Quick quiz

1. How many control points does a second-order polynomial need at least?
2. Which resampling method keeps the original cell values?
3. A layer lands in the wrong place after reprojection although the CRS looked right. What is a likely cause?
0 of 3 answered

Key takeaways