In ObjectLand replacement of previous values of coordinates of all or some map features to new values calculated according to a certain transformation rule is called transformation of coordinates. When performing the transformation operation the user does not deal with individual features, instead, he has to specify coordinate transformation rule and indicate to which set of features this transformation should be applied.
For determining the transformation rule the user should perform two actions:
Select the transformation type from several possible types offered by the system.
Specify a set of transformation control points indicating source coordinates of these points and their new (desirable) coordinates.
Depending on the selected transformation type the system provides either precise or approximate coincidence of calculated coordinates of control points with their new indicated coordinates. For map features coordinates are calculated according to the same rule, that is, they are changed in concordance with changing of control point coordinates.
Selection of the transformation type mainly depends on the task for which the transformation operation is used. It is possible to indicate at least two substantially different actual situations in which this operation can be successfully used.
Transition to a different coordinate system. For some reasons it may become necessary to convert coordinates of all map features from the previously selected Cartesian coordinate system (see chapter 9 “Map structure”) to another Cartesian system differing in the value of units of length, position of origin of coordinates or even in direction of axes. A more complicated situation arises when it is necessary to combine features initially entered in different coordinate systems within one map. In this case for a part of features it is required to perform transition to the coordinate system in which the remaining features are specified.
Improving coordinates by landmarks. The result of executing more accurate measuring for some map characteristic points (landmarks) is getting more precise coordinate values differing from the values which were set for these points before. If landmark features are just edited in this situation, relative position of landmarks and features located close to them will be distorted. The aim is to recalculate coordinates of all features in correlation. Using the mathematical language, it is required to build a continuous and maximally smooth function of coordinate transformation by specified control points.
The two situations described “make different demands” to the transformation. In the first case it is necessary only to recalculate coordinates from one Cartesian system to another one. This task is solved without problems if both coordinate systems are known. The second task does not have a unique, ideal solution. The difficulties that may appear can be easily explained on the following example. Let's assume that three control points were located on one straight line, but after improving coordinates it turned out that one of them is a little shifted from the straight line. In this case any transformation rule offered should convert some straight lines into curved lines (or broken lines), otherwise it will be unable to provide precise conversion of all three points. To simplify the search of a reasonable compromise between precision of control point transformation and minimization of distortions of other features ObjectLand offers several transformation types.
If the user does not want to go into details, he can skip the text till the next subsection and follow one simple rule in practice: for transition to another coordinate system similarity transformation should be used, and for improving coordinates by landmarks – affine-local transformation.
Similarity transformation is characterized by the following principle: all plane figures are converted to the figures geometrically similar to them. All angles between intersecting straight lines keep their values, and all line sizes are increased or reduced by the same factor.
Similarity transformation solves the problem of passing from one Cartesian coordinate system to another one. To specify the transformation it is enough to select any two points on the plane as control points and specify old and new coordinates of these points. It is convenient to take the origin of coordinates and some point lying on the axis X or Y as control points.
Affine transformation which is also called linear transformation. This transformation always converts straight lines into straight lines and parallel straight lines remain parallel. The angles between intersecting lines can be changed or remain the same. The similarity transformation described above is a special case of affine transformation. It can be also said that arbitrary affine transformation converts the specified square into any specified parallelogram while similarity transformation converts a square in any other specified square.
To specify affine transformation it is enough to select any three points not lying on one straight line as control points and specify old and new coordinates of these points. It is convenient to take the origin of coordinates and two points lying on the axes X and Y accordingly as control points.
Affine transformation with calculation of coefficients using the method of the least squares is intended for the case when the number of specified control points is more than three. It means that the task of improving by landmarks is solved. If the number of landmarks is more than three and some values of their coordinates (old or new) were received with some inaccuracy, one cannot expect to build affine transformation converting all landmarks to a new position. It is possible to provide precise transformation of any three points, but why should other control points be worse? To avoid arbitrary selection of three points for making the transformation a well-known mathematical method of the least squares can be used. When building the transformation according to this method it may appear that calculated position of neither control points coincides with the measured new coordinates, however, an average error (to be more exact, an average square of the distances between the measured and calculated position of every control point) will be minimal among the possible affine transformations. Thus, the present transformation type cannot secure precision of control point transformation but keeps all straight lines straight.
Polynomial transformation. It is one of the types of nonlinear transformations, that is such transformations which guarantee precise transformation for every number of control points at the expense of distortion of straight lines.
As it is known from mathematic analysis, if the values for some function of real or complex variable are specified in N different points, there is only one way to build a polynomial of the power N-1 taking the specified values in these points (Lagrange interpolation polynomial). Coordinate transformation rule for polynomial transformation type is built in this very way. Points on the plane are considered as complex numbers. For any number of control points precise transformation of their coordinates into new specified values is guaranteed (within calculation inaccuracy). In the theory of functions of complex variable the present transformation type is called conformal holomorphic transformation. An interesting peculiarity of this transformation is that in spite of the distortion of lines all angles of intersection of lines keep their values unchanged.
Unfortunately, polynomial transformation has some disadvantages as means of solving the task of coordinate improving. The main one is excessive line distortion which is strongly intensified in the course of moving away from control points.
Local transformation. Unlike the previous transformation type, this transformation is not based on strict mathematical premises, but on common sense. The idea is the following. For every control point it is possible to build such a nonlinear function which transforms old coordinates of this point into new ones, and for the remaining points changes coordinates the less the farther the point is from the control point. At a big distance from the control point changing of coordinates should tend to zero. Having built such functions for every control point, it is possible to determine the general transformation as a weighted sum of these functions and it is rather easy to calculate summation coefficients so that they compensated a small shift of every control point under the influence of moving the remaining control points.
The transformation rule built in such a way will provide precise transformation of all control point coordinates. A positive difference from the polynomial transformation is that while moving away from control points coordinate changing will be reduced tending to zero when the distance is rather big.
Combined affine-nonlinear transformations. Experience of different areas of applied mathematics shows that calculation of nonlinear effects gives good results in the case when the value of nonlinear distortions is relatively small. In the task of coordinate transformation it means that for applying polynomial or local transformation successfully it is preferable that the difference between new and old coordinates of control points was as small as possible. Considerable improvement of transformation quality can be expected if affine transformation by the method of the least squares is performed at first, and then one of nonlinear methods applied. At the first (affine) stage in most cases it becomes possible to reduce the distances to which control points should be moved considerably and as a result the second (nonlinear) transformation stage brings less nonlinear distortions than when using the nonlinear transformation directly without preliminary linear transformation.
In practice the best results in the task of improving coordinates by landmarks are achieved when combined affine-local transformation is used.
In table 20-1 the basic properties of all coordinate transformation types are presented.
Transformation type | Number of control points | Transforms control points precisely | Keeps straight lines | Keeps angles | Separates the linear part | Distortions are reduced with the distance |
Similarity | 2 | Yes | Yes | Yes | – | – |
Affine | 3 | Yes | Yes | No | – | – |
Affine by least squares | >3 | No | Yes | No | Yes | No |
Polynomial | >3 | Yes | No | Yes | No | No |
Affine-polynomial | >3 | Yes | No | No | Yes | No |
Local | >3 | Yes | No | No | No | Yes |
Affine-local | >3 | Yes | No | No | Yes | Yes |
Table 20-1. Properties of transformation types