DM-88 - Coordinate Transformations

Coordinate transformations are needed to align multiple GIS datasets to one coordinate system when they use multiple coordinate systems. To transform coordinates, the properties of the source and target coordinate systems such as datums, projection methods, and their measurement origins and units should be identified carefully. Implemented in most GIS software and GIS data viewers, the on-the-fly projection technology projects GIS datasets automatically without the need for manual coordinate transformations by users. The coordinate transformation mechanisms for vector and raster datasets are different because the raster datasets require pixel value resampling during coordinate transformations. As a case study, eight GIS datasets were downloaded from multiple websites and were reprojected to a coordinate system in QGIS.

Author and Citation Info: 

Seong, J. C. (2023). Coordinate Transformations. The Geographic Information Science & Technology Body of Knowledge (4th Quarter 2022 Edition), John P. Wilson (ed.). DOI: 10.22224/gistbok/2023.1.2.

This entry was published in February 2023.  

The topic is also available in the following editions: 

DiBiase, D., DeMers, M., Johnson, A., Kemp, K., Luck, A. T., Plewe, B., and Wentz, E. (2006). Coordinate Transformations. The Geographic Information Science & Technology Body of Knowledge. Washington, DC: Association of American Geographers. (2nd Quarter 2016, first digital).

Topic Description: 
  1. Definitions
  2. Introduction
  3. Coordinates and Their Properties
  4. Fundamentals of Coordinate Transformations
  5. On-the-fly Coordinate Transformation
  6. Raster Coordinate Transformation and Resampling Errors
  7. Coordinate Transformation with QGIS - a Case Study

 

1. Definitions

Coordinate: a set of numbers designating the position of a point.

Coordinate system: a set of parameters and mathematical rules that defines the size and shape of the Earth, projection method, and measurement origin and units.

Coordinate transformation: a coordinate operation that changes source coordinates to target coordinates where the source and target coordinate systems are different.

Datum: a set of parameters that defines the size and shape of the Earth. Datum is commonly modeled as ellipsoids for horizontal location references.

Geographic coordinate system: a coordinate system that uses longitude and latitude values to locate a point on a three-dimensional spherical surface.

On-the-fly projection: A software technology that projects GIS datasets in multiple coordinate systems into one coordinate system automatically without manual coordinate transformations by users.

Projection: coordinate transformation between angular coordinates and planar coordinates.

Projected (or Cartesian) coordinate system: a coordinate system that uses x and y coordinates on a two-dimensional planar surface.

Reprojection: a coordinate transformation between two different planar coordinate systems.

(Note: For more details about datum, map projection, and coordinate systems, please refer to the Georeferencing Systems section of this GIS&T Body of Knowledge.)

 

2. Introduction

The coordinate transformation of a GIS dataset is a set of mathematical operations that changes source coordinates to target coordinates where their source and target coordinate systems are different. GIS users may apply a coordinate transformation to change map projections, datums, or both in geographic coordinate systems as well as projected coordinate systems.

Globally, many coordinate systems are used because the Earth’s surface is uneven so one projection or datum cannot represent every surface of the Earth accurately. A projection or datum that fits well to a part of the Earth may not fit well to other parts of the Earth. For example, the North American Datum 1983 (NAD83) (NGS 1989) fits well with the North American continent, but it does not fit well with the European continent. Also, local-scale map projections are frequently different from global-scale map projections. Furthermore, geologic tectonic events or surveying technological innovations make existing coordinate systems constantly revised and improved. Currently, there are thousands of map projections and datums used in GIS. Regarding the list of coordinate systems, refer to the Esri list (Esri 2021) or the European Petroleum Survey Group (EPSG) list (https://epsg.org). Using multiple datasets that are created by multiple providers most likely requires coordinate transformations to accurately align them together to one coordinate system.

 

3. Coordinates and Their Properties

A coordinate is a set of numbers designating the position of a point. The coordinate of a geographic point is commonly represented as (Easting, Northing, [Elevation]) in GIS datasets. The easting is a horizontal position, and the northing is a vertical position. The elevation is an optional term so GIS datasets may include it or not.

Coordinates are measured on a coordinate system. A coordinate system is a set of parameters and mathematical rules that defines the size and shape of the Earth, projection methods, and measurement origin and units. A datum is a set of parameters that defines the size and shape of the Earth and is commonly modeled as ellipsoids. Projection methods define how to project the ellipsoidal Earth surface onto a planar surface.

Two coordinate types are frequently used in GIS – geographic and Cartesian. The Cartesian coordinates are the coordinates represented by x and y [and z] values on a two or three-dimensional space. The geographic coordinates use angular units such as longitude and latitude. The longitude and latitude values may be represented in many ways including, but not limited to, DMS (degrees, minutes, and seconds) and DD (decimal degrees). GIS datasets commonly use the decimal degree format. The conversion of DMS to DD uses the equation, DD = D + M/60 + S/3600, where D, M, and S stand for degrees, minutes, and seconds, respectively. For example, a latitude of 32 degrees, 30 minutes, and 0 seconds in the northern hemisphere is equivalent to 32.5 decimal degrees (= 32 + 30/60 + 0/3600). The latitude in the southern hemisphere and the longitude in the western hemisphere become negative values. For example, a longitude of 87 degrees, 30 minutes, 0 seconds in the western hemisphere is -87.5 decimal degrees [= -(87 + 30/60 + 0/3600)].

In GIS datasets, coordinates are implemented differently depending on data types. In the case of the vector data type, coordinates are explicitly represented as (x, y) at each point location. A set of explicit (x, y) points makes a line, and a set of lines makes a polygon. In the case of the raster data type, coordinates are not explicitly written for all pixels. Instead, the coordinate of an origin pixel, usually the upper-left corner pixel, is explicitly noted, and the coordinates of other pixels are implicitly calculated using the pixel size and the relative pixel location from the origin pixel. The coordinate of an origin pixel, pixel size, and the number of rows and columns are, therefore, important to identify the coordinates in a raster dataset.

The properties of a coordinate system such as datum, projection method, and their measurement origin and units are commonly written in the metadata that accompanies the dataset. According to the FGDC Content Standard for Digital Geospatial Metadata (FGDC 1998), coordinate properties are described in the metadata “Spatial Reference Information” section.

 

4. Fundamentals of Coordinate Transformations

4.1 Plane Transformation

The coordinates of geographic features on a planar surface can be transformed using multiple methods such as similarity transformation, affine transformation, and non-linear transformations. The similarity transformation preserves the original shape so that the transformed shape is similar to the original. Scale change, rotation, and translation (or offset) may occur during a similarity transformation.

Affine transformation is different from similarity transformation in that the scale factors along the x-axis and y-axis might be different, resulting in a different shape. Parallelism is, however, preserved. Affine transformation also rotates and translates the original shape.

Non-linear transformations use the second-order or higher-order polynomial equations. As the order increases, the number of parameters increases, and more reference control points are needed to derive the parameters.

Table 1 shows the similarity transformation, the affine transformation, and the second-order polynomial transformation equations, where X and Y are new coordinates, x and y are old coordinates, and the rest, i.e., a through l, are the parameters to be calculated with reference control points (Iliffe, 2000):

Table 1. Examples of Planar Transformation Methods
Transformation Type   Equations 
Similarity transformation

X = ax – by + c

Y = bx + ay + d
Affine transformation 

X = ax + by + c

Y = dx + ey + f
Second-order polynomial transformation 

 X = a + bx + cy + dx2 + ey2 + fxy 

Y = g + hx + iy + jx2 + ky2 + lxy

 

4.2 Projection or Reprojection

During projection, the geographic coordinates of longitude (λ) and latitude (φ) on the spherical Earth are transformed into x and y coordinates on a planar surface using forward (or direct) formulas, x = f1(φ, λ), and y = 2(φ, λ), where fi indicates functions. Conversely, planar x and y coordinates can be converted to geographic longitude and latitude values using inverse formulas, φ = f3 (x, y), and λ = 4 (x, y) (Bugayevskiy and Snyder, 2000). For example, the forward and inverse formulas of coordinate conversions between a sphere and a plane using the cylindrical Mercator projection method are shown in Table 2, where R is the radius of the sphere, λ0 is the longitude of the central meridian, and λ and φ are given in radians (Snyder, 1987):

Table 2. The forward and inverse transformation formulas of the cylindrical Mercator projection between a sphere and a plane.*
Forward Formulas    

x = R (λ – λ0)

                     y = R ln tan (π/4 + φ/2)                     

Inverse Formulas  

x = R (λ – λ0)

     y = R ln tan (π/4 + φ/2)     

* The forward and inverse formulas on an ellipsoid are more complex. For more details, refer to Snyder (1987).

 

Reprojection is a coordinate transformation between two different planar coordinate systems. It may include a datum transformation or not. In the case of a reprojection between two planar coordinates without a datum transformation, inverse formulas are used to calculate latitude and longitude, and then forward formulas are applied to calculate new x and y coordinates. If a datum transformation is necessary, it is applied before using forward formulas.

4.3. Datum Transformation

The coordinates of a point will differ depending on the datum that the coordinates refer to (Janssen, 2009). Datum transformation converts coordinates based on one ellipsoid, datum, and epoch to new coordinates based on another ellipsoid, datum, and epoch (Bugayevskiy and Snyder, 2000). Datum transformations involve ellipsoids and are therefore three-dimensional. Several datum transformation methods have been developed such as Molodensky transformation, Helmert transformation, and the grid-based surface fitting method.

The simplest is the three-parameter Molodensky transformation where three parameters are the offsets along the X, Y, and Z axes. The Molodensky transformation is fast, but its accuracy is relatively poor when compared with other methods. The Helmert transform is also used to perform datum shifts in the Cartesian coordinate system. In the case of the 7-parameter Helmert transformation, also known as the 7-parameter similarity transformation, seven parameters are three translations along three axes (X, Y, and Z), three rotations about the axes, and one scale factor. The most accurate method is the grid-based surface fitting method which supplies users with transformation parameters and transformation accuracy on a regularly spaced grid (Janssen, 2009).

 

5. On-the-Fly Coordinate Transformation

On-the-fly (OTF) projection is a software technology that projects GIS datasets in multiple coordinate systems into one coordinate system automatically without the need for manual coordinate transformations by users. Before the implementation of the OTF projection technology, all datasets had to use one coordinate reference system so they could be aligned together in a GIS system for display and analysis. The OTF projection technology is commonly implemented in GIS software and data viewers. The OTF projection technology transforms source coordinates automatically, i.e., on-the-fly, to a target coordinate system when a dataset in a different coordinate system is added to a display window. The coordinate system of the display window becomes the target coordinate system. The target coordinate system is set by copying the coordinate system of the first dataset that is added to the display window unless otherwise predefined to a coordinate system. Once the target coordinate system is determined, the datasets added to the display window subsequently are automatically transformed to the target coordinate system. The display window’s coordinate system can be changed by users at any time.

QGIS (QGIS.org, 2022), an open-source GIS software, supports the OTF projection. Figure 1 shows an example of the OTF projection that is implemented in the QGIS display window. In this example, the 01_Counties_Geographic_NAD83 dataset was added first so the projection of the display window is set to the geographic coordinate system in NAD83. The rest of the datasets, i.e., the datasets of which names start with 02 through 08, are aligned well with each other because the OTF projection automatically transformed source coordinates if their coordinate systems are different from the target coordinate system. In Figure 1, the spatial extent of the LiDAR dataset is too small to be identified in the viewer.

 

Figure 1. An example of the on-the-fly projection that is implemented in the QGIS display window. The shapes of all layers are severely stretched horizontally due to the use of the geographic coordinate system. Source: author. 

 

The OTF projection is very convenient, particularly, when performing a mapping project in which datasets do not use computing resources heavily. It, however, has multiple drawbacks. It consumes significant computing resources so GIS software performance may slow down. The OTF projection outputs are volatile and are not saved permanently. It is not suited for quantitative GIS analyses or geoprocessing. The OTF projection cannot be used when working with the Esri’s feature datasets in a geodatabase. For these reasons, the manual coordinate transformations of all datasets to one target coordinate system may increase computing performance, facilitate Esri's geodatabase construction, and support quantitative analyses and geoprocessing algorithms better.

 

6. Raster Coordinate Transformation and Resampling Errors

The coordinate transformation mechanism of raster datasets is different from that of vector datasets. In the cas7. e of reprojecting a vector dataset, new target coordinates are calculated using source dataset coordinates. The reprojection mechanism of a raster dataset is quite different because the pixel values of a new raster grid need to be calculated with the source dataset pixel values. The mechanism of calculating pixel values is called resampling. Because of the resampling mechanism, most GIS software packages provide two reprojection tools – one for vector datasets and the other for raster datasets. In the case of QGIS, for example, “Reproject Layer” and “Warp (Reproject)” are used for vector and raster datasets, respectively.

The reprojection of raster image data may bring the loss or multiplication of original pixel values due to the resampling process. As an index to measure pixel loss or multiplication, categorical accuracy can be used (Mulcahy and Keith 2001; Seong 2003). Categorical accuracy is the proportion of the number of pixel values representing original features correctly among the full set of pixels. The categorical accuracy can be changed dramatically when a global image dataset is reprojected to local-scale projections.

 

7. Coordinate Transformation with QGIS - a Case Study

7.1 Study Area and Dataset Sources

This section describes a case study of coordinate transformations with various datasets. The study area is Carroll County, Georgia, U.S.A. The source datasets were downloaded from state and federal GIS data providers. Table 3 shows eight datasets that were downloaded and their coordinate systems.

Table 3. Source Datasets and Their Coordinate Systems
No. Content Coordinate System Ellipsoid EPSG* File Format
1 County boundaries Geographic ** NAD83 4269 Shapefile
2 Roads Geographic WGS84 4326  Esri's Geodatabase 
3 Hydrology Geographic NAD83 4269 Esri's Geodatabase
4 NAIP Airphoto UTM, Zone 16N NAD83 26916 GeoTIFF
5 LiDAR  SPCS Georgia West Zone US Feet  NAD83 2240 LAZ
6 DEM Geographic NAD83 4269 GeoTIFF
7  Landsat Satellite Imagery  UTM, Zone 16N WGS84 32616 GeoTIFF
8 MODIS Satellite Imagery Sinusoidal***  Sphere (6371007.181 m radius)  N/A GeoTIFF

* Each EPSG code represents geodetic datum, spatial reference system, Earth ellipsoid, coordinate transformation, and related units of measurement. EPSG codes range from 1024 to 32767.

** Geographic projection is also known as the plate carrée projection or the equirectangular projection, where meridians and parallels are straight and evenly placed.

*** The MODIS satellite imagery comes with multiple map projections. For a demonstration purpose, a dataset with the Sinusoidal projection was downloaded.

 

The source datasets were downloaded from the following websites:

7.2 Target Coordinate System

Many counties in the United States use the State Plane Coordinate Systems (SPCS) (NGS 1990) with the U.S. foot unit. Because this case study is to build a dataset of the Carroll County, Georgia, the target coordinate system is set to the SPCS Georgia West Zone (US foot unit) with the North American Datum 1983 (NAD83), which is identified as EPSG 2240 or ESRI 103263.

7.3 Coordinate Transformation Procedures in QGIS Version 3.22

  • The coordinates of the county boundary, roads, and hydrology datasets can be transformed, i.e., reprojected, with the Reproject Layer tool (Menu → Vector → Data Management Tools → Reproject Layer). The target CRS is set to the “NAD_1983_StatePlane_Georgia_West_FIPS_1002_Feet”.
  • The NAIP, DEM, Landsat, and MODIS datasets are raster image datasets. They can be reprojected to the target CRS using the Warp (Reproject) tool (Menu → Raster à Projections → Warp (Reproject)).
  • The LiDAR dataset is in the LAS or LAZ file format. The format is not natively supported by the projection tools in QGIS. QGIS can be expanded to handle LiDAR datasets by installing the LAStools plugin. If the source and target datums are the same, a LiDAR dataset can be reprojected using Toolbox → LAStools → File – processing points → las2las_project. If the datums are different, users may consider converting the LAS or LAZ file to a point shapefile, reprojecting the shapefile, then finally converting the reprojected shapefile back to a LAS or LAZ file.

7.4 Results

Figure 2 shows the results of coordinate transformations. The coordinate system used by all datasets is the State Plane Coordinate System, Georgia, West Zone, NAD 83, U.S. foot unit. Compared with Figure 1, the shape of the state is displayed correctly.

Figure 2. Reprojected datasets. The shapes of all layers correctly represent the real shape of Georgia and the case study area. Source: author.

References: 

Bugayevskiy, L.M. and Snyder, J.P., 2000. Map Projections: Reference Manual. Taylor and Francis, London. 328p.

ESRI, 2021. ArcGIS Pro 2.8 Projected Coordinate System Tables. ESRI: Redlands, California. https://pro.arcgis.com/en/pro-app/2.8/help/mapping/properties/pdf/projec....

Federal Geographic Data Committee (FGDC), 1998. Content standard for digital geospatial metadata (FGDC-STD-001-1998). FGDC: Washington, D.C. https://www.fgdc.gov.

Janssen, Volker. (2009). Understanding coordinate reference systems, datums and transformations. International Journal of Geoinformatics, 5(4): 41-53.

Iliffe, J.C., 2000. Datums and Map Projections for Remote Sensing, GIS, and Surveying. Whittles Publishing, New York. 160p.

Mulcahy, K. and Clarke, K. 2001. Symbolization of Map Projection Distortion: A Review. Cartography and Geographic Information Science, 28:3 (167-182). DOI: 10.1559/152304001782153044.

National Geodetic Survey (NGS), 1989. North American Datum of 1983. Charles Schwarz ed., NOAA Professional Paper NOS 2. https://www.ngs.noaa.gov/PUBS_LIB/NADof1983.pdf.

National Geodetic Survey (NGS), 1990. State Plane Coordinate System of 1983. NOAA Professional Paper NOS NGS 5. https://geodesy.noaa.gov/library/pdfs/NOAA_Manual_NOS_NGS_0005.pdf.

QGIS.org, 2022. QGIS 3.22. Geographic Information System User Guide. QGIS Association. Electronic document: https://docs.qgis.org/3.22/en/docs/user_manual/index.html

Seong, J.C., 2003. Modeling the accuracy of image data reprojection. International Journal of Remote Sensing, 24(11): 2309-2321. DOI: 10.1080/01431160210154038

Snyder, J.P., 1987. Map Projections – A Working Manual. U.S. Geological Survey Professional Paper 1395. 383p.

Learning Objectives: 
  • Describe the coordinates and coordinate systems that are used in GIS datasets.
  • Compare the implementations of coordinates in vector and raster datasets.
  • Explain the mechanism of the On-The-Fly projection.
  • Perform coordinate transformations with QGIS.
Instructional Assessment Questions: 
  1. Explain the difference between geographic coordinates and Cartesian coordinates.
  2. Why does the coordinate system of a GIS dataset need to be transformed to another coordinate system?
  3. When checking the metadata of a GIS dataset, what are the important properties of its coordinate system that need to be reviewed before attempting a coordinate transformation?
  4. Explain how the on-the-fly projection works when a set of multiple GIS datasets in various coordinate systems are added to a GIS data viewer.
  5. Explain why the reprojection tool for vector datasets cannot be used for raster datasets.
  6. Perform a coordinate transformation project by collecting at least three vector datasets and three raster datasets from different data providers. Write a brief report about source datasets and their coordinate systems, the target coordinate system, coordinate transformation tools, and coordinate transformation results.
Additional Resources: