An overview of GeoTransformers

Georeferencing describes the process of locating an entity in 'real world' coordinates. Once an entity has been georeferenced, the relationship between the entity and its 'real world' location can be used to map and display information about the entity. This relationship can be described as a chain of transformations that can be modeled mathematically. Each of these transformations can be defined through a set of parameters and will process coordinates from one virtual space to another. Such transformations applied to rasters are implemented by a GeoTransformer. The set of parameters defining the transformation forms the GeoTransformer Definition, which is stored as XML for extensibility considerations.

GeoTransformers can be applied in a chain with a certain order, as well as encapsulated one into another. Specific Raster Processes that perform coordinate transformations are called georeferencing processes. Because in most generic cases a composition of GeoTransformers represents a sensor model, a georeferencing process will be identified by what we've called a Sensor Definition. There are no restrictions on what kind of transformations are defined within a sensor definition (SDef), meaning it doesn't have to describe a physical sensor.

A Raster process is defined by a raster process definition (RPDef) which consists of two parts: Raster Group and Rasters. Both Raster Group & Rasters definitions can have georeferencing processes defined by Sensor Definitions. Their only purpose is to affect the geometry of a raster to match a certain projection in 'real world' coordinates that is defined by its Spatial Reference System (PRJ).

GeoTransformers are used within ArcGIS Image Server processing chains (for details, see ArcGIS Image Server processing chain). They are processing 3D coordinates, and those which do not utilize the 3rd coordinate (Z) must maintain the value. Whenever possible, a GeoTransformer implements the coordinate transformation in both directions, defined as FromGlobal (FG) and ToGlobal (TG).

When imagery is rectified within ArcGIS Image Server, only the FG transformation is applied thus needs to be written as efficient as possible. The TG transformations are primarily used within components such as the Service Editor when have to compute ground coordinates based on image coordinates and where the efficiency of the transform is not critical.

Several GeoTransformers were implemented within a component of ArcGIS Image Server, named GeoTransCore. A brief overview description of each follows:

Affine GeoTransformer

Performs an affine transformation. An affine transformation is also called an affinity.
It represents a linear transformation that preserves collinearity, parallelism and ratios of distances. While an affine transformation preserves proportions on lines, it does not necessarily preserve angles or lengths.
In general, an affine transformation is a composition of rotations, translations, dilations, and shears. It has six degrees of freedom (parameters) A0,A1,A2,B0,B1,B2 used in a well known formula:

X = A0 + A1 * x + A2 * y
Y = B0 + B1 * x + B2 * y

Type: 2D (changes only X,Y)
Implements: Both FromGlobal & ToGlobal
Initializes from: Either FromGlobal & ToGlobal
Default: ToGlobal
Invertible: Yes
Control Points Support: No
For details about its parameters, please see Affine.XADef.

StdFrame GeoTransformer

Implements the sensor model of a standard frame photogrammetric camera.
Used in remote sensing, mostly for aerial and close-range photogrammetry applications, the model consists of a composite set of transformations. Each of these transformations is meant to describe a physical process for which different mathematical representations can be used.
The chain of transformations represents two reconstructed orientations with several applied corrections, and its intermediar coordinate systems are widely known as:

ground (G) <-> corrected camera (CC) <-> camera (C) <-> film (F) <-> image (I)

Interior Orientation (IO)
The interior orientation is the bijective mapping between camera space and image space, represented by a 2D affine transformation that converts image coordinates to film coordinates, an offset to the principal point of autocollimation and a lens distortion correction.
Two ways of correcting lens distortion are currently supported: using a distortion grid or applying a combination of radial and decentring distortion.
Distortion grid bilinear interpolates precomputed distortion values in order to obtain the correction that needs to be applied.

Radial distortion is a function of the distance to the principal point of best symmetry, presented in the form of an even-power polynomial (Conrady-Brown model):

x' = x - ppsX

y' = y - ppsY

dx = (k1 + k2 * r^2 + k3 * r^4) * x'

dy = (k1 + k2 * r^2 + k3 * r^4) * y'

X = dx + x

Y = dy + y

Decentring distortion uses 2 coefficients:

x' = x - ppsX

y' = y - ppsY

dx = C1 * (r^2 + 2 * x'^2) + 2 * C2 * x' * y'

dy = C2 * (r^2 + 2 * y'^2) * 2 * C1 * x' * y'

X = dx + x

Y = dy + y

Exterior Orientation (EO)
The exterior orientation is the surjective mapping between ground space and camera space, applying a collinearity condition and two corrections, earth curvature and refraction.
The collinearity equations are defined as follows:

X = polarity * (x * M11 + y * M12 + z * M13) * focalLenth / (x * M31 + y * M32 + z * M33)
Y = polarity * (x * M21 + y * M22 + z * M23) * focalLenth / (x * M31 + y * M32 + z * M33)

where M is the rotation matrix.
Rotation matrix can also be computed from given rotation angles (converted to radians), as the bellow example for rotation sequence order being omega, phi, kappa:

M11 = cos(kappaR)*cos(phiR)

M12 = (rotSys)*sin(kappaR)*cos(omegaR) + cos(kappaR)*(-rotSys)*sin(phiR)*(-rotSys)*sin(omegaR)

M13 = (rotSys)*sin(kappaR)*(rotSys)*sin(omegaR) + cos(kappaR)*(-rotSys)*sin(phiR)*cos(omegaR)

 

M21 = (-rotSys)*sin(kappaR)*cos(phiR)

M22 = cos(kappaR)*cos(omegaR) + (-rotSys)*sin(kappaR)*(-rotSys)*sin(phiR)*(-rotSys)*sin(omegaR)

M23 = cos(kappaR)*(rotSys)*sin(omegaR) + (-rotSys)*sin(kappaR)*(-rotSys)*sin(phiR)*cos(omegaR)

 

M31 = (rotSys)*sin(phiR)

M32 = cos(phiR)*(-rotSys)*sin(omegaR)

M33 = cos(phiR)*cos(omegaR)

where rotSys has value 1 for clockwise rotation and value -1 for counter-clockwise rotation system.
Earth curvature and refraction is applied based of the following formula:

rFLp2 = 1.0 / (focalLength^2)

earthR2km = 2.0 * earthRadius / 1000.0

REFC = (-1.0) * (

  (12.7 - 0.95 * (averageZ/1000.0))*

  ((frameCenter.Z - averageZ) / 1000.0) - (0.49 - 0.045 * (averageZ / 1000.0))*

  ((frameCenter.Z - averageZ) / 1000.0)*((sp.Z - averageZ) / 1000.0)

  ) / 1000000.0

rp2=x^2+y^2

drr = 1.0+REFC+(((frameCenter.Z-Z)/1000.0)/(earthR2km)+REFC)*rp2*rFLp2

X = x * drr

Y = y * drr

Type: 3D (Z-aware)
Implements: Both FromGlobal & ToGlobal
Initializes from: Either FromGlobal & ToGlobal
Default: FromGlobal
Invertible: Yes
Control Points Support: No
Comments: ToGlobal transformation requires a height at which image coordinates will be transformed into ground coordinates.
For details about its parameters, please see StdFrame.XADef.

Rational GeoTransformer

Implements the rational polynomial functions transformation, defined as a division of cubic polynoms applied to normalized coordinates.
The normalization process consists of two transformations: translation and scaling. For both image and ground coordinates, an offset and scale are specified as normalization parameters.
The RPF transformation is then applied to compute normalized image coordinates. Each cubic polynom has 20 terms and usually the constant term of a denominator polynom is 1. Thus, the total degrees of freedom (parameters) is 88.
Following the RPC00B model, the order of the coefficients is:

C,L,P,H,LP,LH,PH,L2,P2,H2,PLH,L3,LP2,LH2,L2P,P3,PH2,L2H,P2H,H3

where L - longitude, P - latitude, H - height and C denotes the constant term of the polynom.
Type: 3D (Z-aware)
Implements: Only FromGlobal
Initializes from: FromGlobal
Default: FromGlobal
Invertible: No
Control Points Support: Yes
Comments: Note that SRS used by this transformation is usually DD_WGS84. The transformation parameters are usually computed for ellipsoidal heights, and also, the minimum required control points for fitting the rational coefficients is 39.
For details about its parameters, please see Rational.XADef.

WarpGrid GeoTransformer

Performs a 2D warp based on a grid of points.
The parameters represent a regular grid of points in the output coordinate system with each point being associated with an x,y coordinate in the input coordinate system. The grid of points forms cells. For each output coordinate an associated input coordinate is computed by bilinear interpolation within the associated cell.
If a coordinate outside the grid is the selected, a bilinear extrapolation of the nearest cell is performed.
The grid is described through either upper-left corner (default) or lower-left corner, number of rows and columns, and the (X,Y) coordinates of each point within the grid.
Type: 2D (changes only X,Y)
Implements: Only FromGlobal
Initializes from: FromGlobal
Default: FromGlobal
Invertible: No
Control Points Support: No
Comments: The bilinear extrapolation used on coordinates outside the grid may fail to return values within required accuracy.
For details about its parameters, please see WarpGrid.XADef.

LSR GeoTransformer

Performs a 3D rotation representing coordinates transformation from Universal Space Rectangular (USR) to Local Space Rectangular (LSR).
Its parameters are defined as the rotation origin (X,Y,Z) and the orthogonal rotation matrix:

M11 M12 M13
M21 M22 M23
M31 M32 M33

It can be used in conjunction with a StdFrame GeoTransformer which transforms LSR coordinates into image coordinates.
Type: 3D (Z-aware)
Implements: Both FromGlobal & ToGlobal
Initializes from: FromGlobal
Default: FromGlobal
Invertible: Yes
Control Points Support: No
For details about its parameters, please see LSR.XADef.

Geodetic GeoTransformer

Converts Cartesian Earth-Centered, Earth-Fixed (ECEF) XYZ coordinates into geodetic-mapping coordinates, based on a reference ellipsoid described by a series of parameters that define its shape.
It can also apply a fixed, given approximate regional geiod separation (also known as undulation).
Its order of geodetic coordinates is Longitude, Latitude, Height (either geodetic or orthometric) and the units are decimal degrees (DD) for longitude, latitude and meters for height.

Given the semi-major axis (a) and the inverse flattening (denF) of the ellipsoid,

the semi-minor axis (b) is computed as:

       b = a * (denF - 1) / denF

First and second eccentricity at the power 2 are also computed:

       e1sqr = (a * a - b * b) / (a * a)

       e2sqr = (a * a - b * b) / (b * b)

Denoting the geoid separation with N, the geodetic to ECEF transformation is:

       Lon = x * PI / 180.0

       Lat = y * PI / 180.0

       Alt = z + N

       RCPV = a / sqrt(1.0 - e1sqr * sin(Lat) * sin(Lat))

       X = (RCPV + Alt) * cos(Lat) * cos(Lon)

       Y = (RCPV + Alt) * cos(Lat) * sin(Lon)

       Z = (RCPV * (1.0 - e1sqr) + Alt) * sin(Lat)

The ECEF to geodetic transformation is:

       Alt = ip.Z

       p = sqrt(x * x + y * y)

       T = atan((Alt * a) / (p * b))

       sT = sin(T)

       cT = cos(T)

       Lat = atan((Alt + e2sqr * b * sT * sT * sT) / (p - e1sqr * a * cT * cT * cT))

       RCPV = a / sqrt(1.0 - e1sqr * sin(Lat) * sin(Lat))

       if (y != 0.0) {

               sig = y / fabs(y)

       }

       else {

               sig = 1.0

       }

       if (x == 0.0) {

               Lon = sig * PI / 2.0

       }

       else {

               Lon = atan(y / x)

               if (x < 0.0) {

                       if (y < 0.0) {

                               Lon = Lon - PI

                       }

                       else {

                               Lon = Lon + PI

                       }

               }

       }

       Alt = p / cos(Lat) - RCPV

       X = Lon * 180.0 / PI

       Y = Lat * 180.0 / PI

       Z = Alt - N

Type: 3D (Z-aware)
Implements: Both FromGlobal & ToGlobal
Initializes from: Either FromGlobal & ToGlobal
Default: ToGlobal
Invertible: Yes
Control Points Support: No
Comments: Can apply only a fixed, given undulation which should be used on a limited area, based on required accuracy.
For details about its parameters, please see Geodetic.XADef.

Projective GeoTransformer

Performs an projective transformation (preserves collinearity).
A projective transformation is the most general linear transformation, requires the use of homogenous coordinates and it is considered to be more unstable than a bilinear transformation because it applies a division to a quantity that can be arbitrarily both small and large.
Its eight coefficients are denoted A,B,C,D,E,F,G,H, and transforms coordinates from source to destination based on these equations:

X = (A * x + B * y + C) / (G * x + H * y + 1)
Y = (D * x + E * y + F) / (G * x + H * y + 1)

It can be constructed from coefficients, or they can be computed from minimum four given control points that represent the matching (X,Y) pairs in both spaces.
Type: 2D (changes only X,Y)
Implements: Both FromGlobal & ToGlobal
Initializes from: Either FromGlobal & ToGlobal
Default: ToGlobal
Invertible: Yes
Control Points Support: Yes
Comments: Transformation coefficients can be computed from minimum four given control points.
For details about its parameters, please see Projective.XADef.

Polynomial GeoTransformer

Performs a polynomial transformation upto 3rd order.
Each coordinate is expressed as a polynom of order 1, 2 or 3, having 3, 6 or 10 parameters, respectively. The terms associated with the coefficients are:

1,X,Y,X^2,XY,Y^2,X^3,X^2Y,XY^2,Y^3

It can be constructed from coefficients, or they can be computed from given control points that represent the matching (X,Y) pairs in both spaces.
Type: 2D (changes only X,Y)
Implements: Both FromGlobal & ToGlobal
Initializes from: Either FromGlobal & ToGlobal
Default: FromGlobal
Invertible: No
Control Points Support: Yes
Comments: The minimum number of required control points for computing the polynomial coefficients equals the number of coefficients of the polynom.
For details about its parameters, please see Polynomial.XADef.

Note: All the XADefs mentioned above (with details about each GeoTransformer's parameters) are located at: "[ArcGIS Image Server installation folder]\Developer Kit\GeoTransformers\XADefs"

An additional GeoTransformer wraps the ESRI projection engine in order to provide coordinates transformations from one Spatial Reference System to another. Called SRSTransformer, was implemented as an external module, loaded on demand by the Core component.

As the SRSTransformer, other custom GeoTransformer modules can be loaded by GeoTransCore component. When these existing transformations, even concatenated, cannot describe some other mathematical model required to georeference your custom Raster Types, you can implement a custom GeoTransformer that does. Basically, you will need to create a Dynamic Link Library (DLL) that implements custom GeoTransformers. For details, please see Implementing a custom GeoTransformer. Note that custom GeoTransformer modules are loaded on demand and for security reasons are reported in ArcGIS Image Server logs.