International Surveying Course - TopGeometri

60
International Surveying Course Athens – October 10, 2011 Geo-referencing of Cadastral Maps by Gianni Rossi [email protected]

Transcript of International Surveying Course - TopGeometri

Page 1: International Surveying Course - TopGeometri

International Surveying Course

Athens – October 10, 2011

Geo-referencing of Cadastral Maps

by Gianni Rossi [email protected]

Page 2: International Surveying Course - TopGeometri

Index

Preface .................................................................................................................................. 1

The advantage of raster file maps ................................................................................. 1

Why do raster maps need to be geo-referenced? ........................................................... 1

A non-geo-referenced raster map has no reference system and real units ........................ 2

The map deformation ......................................................................................................... 5

The Affine 4 parameters transformation ......................................................................... 9

The algorithm ..................................................................................................................... 9

A practical example ......................................................................................................... 14

Exporting the geo-referenced map ................................................................................... 19

Evaluating the geo-referenced map ................................................................................. 21

The Grid transformation .................................................................................................. 25

Why the Affine transformation is not suitable for precision tasks? ................................ 25

The algorithm ................................................................................................................... 25

A practical example ......................................................................................................... 29

The Homography transformation .................................................................................. 38

The algorithm ................................................................................................................... 39

How to apply Homography map geo-referencing ........................................................... 41

The Rubber-Sheeting transformation ............................................................................ 43

The algorithm ................................................................................................................... 45

How to apply Rubber-Sheeting map geo-referencing ..................................................... 46

The Trilateral transformation ......................................................................................... 47

Why Homography and Rubber-Sheeting are not suitable for surveyed Cadastral maps? .......................................................................................... 47

The algorithm ................................................................................................................... 48

A practical example ......................................................................................................... 50

Page 3: International Surveying Course - TopGeometri

1

Preface The purpose of this lesson is to explain the advantages of applying geo-referencing techniques to maps which have been transformed from their original paper state into an image file (raster) by means of a scanner. Although this subject can be applied to any type of maps, this discussion is mainly referred to original Cadastral Maps and their particular problems that can be appropriately solved by applying the right geo-referencing transformation.

The advantage of raster file maps The availability of Cadastral Maps as raster image files gives great benefit to Surveyors who perform Cadastral tasks in which they need to obtain metrical information (coordinates, distances, etc.) from the map itself, such the case of boundary disputes.

The advantage is not simply to avoid the inevitable limits of a manual consultation of the original paper map (time limited consultation, possible errors due to “human” reading, etc.). A raster map file gives you the possibility to adopt some sophisticated mathematical algorithms (geo-referencing transformations) which allow to reach a precision up to 10 times more accurate than a manual consultation. This is because a raster map is a file and, as such, it can be conveniently manipulated and modified by specific software.

So, first of all let’s explain what is an image raster file. It is a file format which reproduces an image by dividing it into a grid of points each of which has a specific color. To be more precise, these points, called “pixels”, are actually squares and the lesser their size, the more accurate the image resolution is. The pixels of a raster file are disposed in rows and columns as in a normal table. In fact, when an image raster file is mentioned, usually it’s also accompanied by its size in pixels. For example, if you say that an image raster file is 1024 x 768, it means that it is composed of 1024 columns (width) and 768 rows of pixels (height). The greater these two values are, the bigger is the image and the dimension in bytes of the file. As already mentioned, each pixel has its own color, so by putting together all the pixels you obtain the reproduction of the image, which will appear more or less close to the real object (the paper map) depending on its resolution, as we’ll see further on in this document.

Digital photographs are the proper example of image raster files. There are various formats for this type of file: BMP (bitmap), TIF, JPG, PNG, etc., each of which have been created to better suite specific needs (quality, file compression, etc.).

Why do raster maps need to be geo-referenced? Before going any further it is worth to clarify the meaning of the term “geo-referencing”. As the two parts of this compound word tell us, geo-referencing means to give geographic (geo) reference system (referencing) to a map.

But why do we need to give a reference system to a raster file map?

Simply because a non-geo-referenced raster map does not have any reference system.

This is also true when a raster map contains some reference points or grid lines provided with coordinates directly written in the map. This is because these coordinates are simply numbers drawn in the map and are not at all the coordinates of their corresponding points.

Page 4: International Surveying Course - TopGeometri

2

Fig. 1 – It does not help if the raster map contains reference points or grid lines

showing their coordinates, they’re simply numbers drawn on the map.

A non-geo-referenced raster map has no reference system and real units The easiest way to realize this problem is by importing a raster map in a Cad software which supports raster image files, such as AutoCAD1 or ZWCad2. So let’s import in ZWCad the raster map showed in Fig. 3. As soon as you activate the importing menu command, the Cad opens the window shown in Fig. 2, asking you the following parameters in order to insert the image in your drawing:

1. Insertion point: here the Cad asks you to specify X-Y-Z coordinates at which to insert the lower-left vertex of the image.

2. Scale: this is the scale factor to assign to the image.

3. Rotation: this is the rotation angle to apply to the insertion point in case you want to rotate the map instead of inserting it perfectly orthogonal to the drawing axis.

1 AutoCAD is a trade mark of Autodesk. 2 ZWCad is a low-cost CAD software fully AutoCAD compatible for both the DWG file format and interface.

Page 5: International Surveying Course - TopGeometri

3

What values do we provide for these 3 parameters? Obviously we don’t know. Also selecting the Specify on screen option would not help because we still wouldn’t know what insertion point, scale factor and rotation to specify on the drawing.

Fig. 2 – When inserting a raster image in a Cad software, you are asked to specify

insertion point coordinates, scale and rotation, all values that you don’t know.

Fig. 3 – A map imported in a Cad software has no real units.

Page 6: International Surveying Course - TopGeometri

4

So, we end up by simply accepting the default values suggested by the Cad itself in Fig. 2, i.e.: 0,0,0 for the insertion point coordinates, 1 for the scale factor and 0 for the rotation.

We can easily verify the result of this operation by showing the coordinates of the map lower-left vertex using the usual Cad command for inquiring the coordinates of a point. As shown in Fig. 4, this point has coordinates X=0 Y=0 Z=0:

Fig. 4 – The map just inserted simply has coordinates 0,0,0 in its lower-left vertex.

Then, what about if we ask the coordinates of a reference point in the map?

For example, let’s ask the coordinates of the reference point shown in Fig. 5. We do not get the real coordinates3 East = -34600; North = 53600 written in the map, but we obtain the values: X = 175.7446 and Y = 129.1123.

What are these values then?

They are simply the number of pixels in horizontal/vertical direction between the lower-left vertex of the map and that point.

Well, this is the first problem of a non-geo-referenced raster map: we cannot obtain the real map coordinates of the points we are interested in.

But there also another problem: the unit of measurement of the raster map are pixels, not the real unit, meters. This implies that we cannot obtain real distances from the map neither.

For example, the map we are trating contains grid lines at an interval of 200 meters. But if we inquire the distance between two consecutive lines, as shown in Fig. 6, we do not obtain 200 but another value: 167.056.

The reason of this difference is just the same: the value we get is simply the number of pixels between the two grid lines, not the meters.

3 All maps shown on this document belong to the Italian Cadastre which reference system assumes Y as the horizontal axis

(Easting) and X as the vertical axis (Northing). In this text I will invert the two letters so that they match the typical mathematical (and Cad) assumption: X = horizontal axis (Easting); Y = vertical axis (Northing).

Page 7: International Surveying Course - TopGeometri

5

Fig. 5 – The coordinates of any point in the map are simply the number of

pixels in horizontal/vertical direction from the lower-left vertex.

Fig. 6 – We also cannot obtain real distances from a non-geo-referenced map.

The map deformation So far, you might think that the non-corresponding coordinates and unit of a non-geo-referenced map is the only problem we need to solve, but unfortunately this is not the case.

There is another more important problem: the original paper map has been subjected to a deformation from its original state. And if the paper map has been deformed, its raster image (file) is therefore deformed too. This means that, in order to obtain correct metrical information from a raster map, we also need to remove this deformation and thus rectify the map itself.

But let’s first describe the possible factors of a Cadastral Map deformation:

Page 8: International Surveying Course - TopGeometri

6

1. Graphical errors during creation: actually this factor is not a deformation issue but it is due to human errors that might have occurred when the map had been manually drawn on the paper. Of course these errors depend on the age of the map: the older a map is, the bigger graphical errors it contains because of the poor quality of the instruments used. Referring to the Italian Cadastral Maps, for example, one of these types of errors is the following: the first commitment for Cadastral Technicians who created the maps was to trace the grid lines at an interval of 10 cm, i.e. 200 mt for scale 1 : 2000. Then they assigned the real coordinates to these grid lines and proceeded to insert each map point by measuring its coordinates from the grid4. This process had a drawback: if two consecutive grid lines were not traced at the exact interval of 10 cm, but at a slightly greater or lesser distance, let’s say 9.9 or 10.1, the map points inserted from these lines had been affected by this error, and are therefore incorrect5. Fig. 7 shows this possible error in a Cadastral Map, even though we cannot tell for sure if it is totally due to map creation or deformation, as we see here below.

Fig. 7 - The first deformation factor depends on the accuracy applied during map creation.

1. The wearing effect of time: if the map is quite old, this is the main deformation reason and it’s obviously caused by physical factors such as temperature and humidity changes, paper degradation, etc.

4 The coordinates were calculated from the surveyed traverse nets and actually they firstly inserted traverse stations as

orthogonal coordinates from the grid lines and then the points as polar coordinates from each station. 5 A graphical error of just 1 millimeter for a scale 1 : 2000 implies a real error of 2 meters.

Page 9: International Surveying Course - TopGeometri

7

2. The scanner: raster maps are obtained by scanning original paper maps. But this process does not lack errors. The accuracy of a scanned map obviously depends on the quality of the image scanner used, but even top quality scanners have an average tolerance between 0.5 to 1 mm for a sheet size of 100 x 70 cm. So this is another deformation factor. Not only, the scanning process also generates a slight rotation of the map as we’ll explain here below.

The deformation of a map due to these factors not only affects map distances, it also generates a rotation of the map. For example, see the grid line shown in Fig. 5 at East = -34600. At first sight it appears to be perfectly vertical, i.e. pointing to the real North direction of the map. But we must assume that the map has been deformed, so that line is no longer straight but might be wavy and therefore it doesn’t point to the exact North direction.

But there is another reason why we must assume that the map has been subjected to a rotation: the scanning process. Why?

Because the operation of positioning a paper map on a (plane) scanner is performed by an operator whose task is to align the lower border of the map with a horizontal line traced on the scanner itself. This line guarantees the orthogonality, hence the exact North direction of the resulting image. Of course, nevertheless this operator takes the maximum care in doing this, he/she will always be subjected to a little positioning error which causes a slight rotation of the image obtained6.

The rotation error is very subtle because it is usually very little, and therefore invisible at a simple sight but, being an angle, it causes significant linear errors for map points far from the rotation pole.

Well, so far we have seen all the reasons why a non-geo-referenced map is not suitable for usual Surveyor tasks. Then it is now clear that the goal of geo-referencing a map is to solve the problems and remove the limits described above, this means:

1. Assign to the raster map its real coordinates.

2. Transform the measurement units from pixel into meters.

3. Rectify the deformation of the map.

4. Correct the orientation error (rotation).

In the following sections we’ll see how the different geo-referencing techniques allow to reach this goal.

In the rest of this lesson I will refer to any geo-referencing technique as a “transformation”.

6 Not to mention when a rolling scanner is used, because this instrument significantly magnifies the positional error in the

direction of rolling.

Page 10: International Surveying Course - TopGeometri
Page 11: International Surveying Course - TopGeometri

9

The Affine 4 parameters transformation The geometrical state of a non-geo-referenced raster map is summarized by Fig. 8 (where the disorientation angle has been abnormally increased only for making it evident). The raster has its own reference system with origin (0,0) in its lower-left vertex and the vertical axis not parallel to the map’s North axis (Disorientation). In addition, the raster units are the image pixels, not meters.

Fig. 8 – The initial state of a non-geo-referenced raster map.

As explained at the end of previous section on page 7, if we do not consider map deformation, our goal is to port the raster at the real map coordinates, correct the orientation error and transform the units from pixel into meters. The Affine 4 parameters transformation that we’ll see in this section is one of the possible methods to achieve this result.

The algorithm The algorithm consists in a roto-translation between two reference systems: the raster and the map. Mathematically, to transform the coordinates from one reference system to another, at least the coordinates of 2 points in both systems are needed7. Fig. 9 shows the roto-translation schema: EO and NO are the East/North translations between the origin of the raster system (red axis) and the origin of the map system (blue axis), whereas ε is the rotation angle between the two systems. To transform raster coordinates of points P and Q into their corresponding map coordinates, we need to apply the following formulas:

7 We need at least 2 points, thus 4 coordinates as known values, because we have to solve 4 simultaneous equations as we’ll

see below.

Page 12: International Surveying Course - TopGeometri

10

Fig. 9 – The geometrical schema of the roto-translation between two reference systems.

ep = EO – AB + AC

np = NO + BO’ + PC

eq = EO – DE + DF

nq = NO + EO’ + QF

And inverting the order of the additions/subtractions applied to EO and NO:

ep = EO + AC – AB

np = NO + PC + BO’

eq = EO + DF – DE

nq = NO + EO’ + QF

Now substituting distances AC, AB, PC, BO’, DF, DE, EO’, QF by calculating them from raster coordinates Xp, Yp and the rotation angle ε, the formulas become:

Page 13: International Surveying Course - TopGeometri

11

ep = EO + xp cos ε – yp sin ε

np = NO + xp sin ε + yp cos ε

eq = EO + xq cos ε – yq sin ε

nq = NO + xq sin ε + yq cos ε

Even though 2 known points in both systems are sufficient to solve this transformation, it is obviously advised to use more points in order to have a more accurate calculation. Using more than 2 points implies that a scale factor between the two systems is generated due to the surplus of measurements.

For example, adding a third point R to the calculation, the scale factor f further transforms the equations as thus:

ep = EO + f xp cos ε – f yp sin ε

np = NO + f xp sin ε + f yp cos ε

eq = EO + f xq cos ε – f yq sin ε (1)

nq = NO + f xq sin ε + f yq cos ε

er = EO + f xr cos ε – f yq sin ε

nr = NO + f xr sin ε + f yr cos ε

For a generic point P these equations can be conveniently written in matrix form as follows:

P

P

o

o

P

P

yx

fNE

ne

•−

+=εεεε

cossinsincos

This notation makes quite clear why this transformation is called “4 Parameters”, there are in fact 4 values we need to calculate in order to transform the raster coordinates of one point into its correspondent map coordinates. These 4 parameters are: EO, NO, f, ε, i.e. the two East/North translations of the raster origin, the scale factor and the rotation angle.

How do we calculate these four parameters?

We obviously need to solve the set of equations (1) here above. But this set is over-determined because there are more equations than unknowns8, therefore the solution cannot be unique but approximate and each equation will leave a residual instead of zero.

The couple of equations of a generic point P results:

8 In this example there are 6 equations and 4 unknowns, but obviously the number of equations is usually much bigger, being

twice the number of known points in both raster and map systems.

Page 14: International Surveying Course - TopGeometri

12

EO + f xp cos ε – f yp sin ε – ep = Δe

NO + f xp sin ε + f yp cos ε – np = Δn

Where Δe and Δn are the above mentioned residuals. The solution of such a set of equations is obtained by applying the method of “Least Squares” which minimizes the sum of the squares of the residuals resulting for every single equation. The full demonstration of this solution goes beyond the purpose of this lesson which is to give an overview of the main geo-referencing map transformations.

So, with the sequence of images here below I simply want to show the 4 transformation parameters, i.e. the 4 movements that we need to apply to the raster in order to solve the geo-referencing.

Fig. 10 – The East translation (1st parameter) moves the raster origin at its real map East coordinate.

Fig. 11 – The North translation (2nd parameter) moves the raster origin at its real map North coordinate.

Page 15: International Surveying Course - TopGeometri

13

Fig. 12 – The Rotation (3rd parameter) rotates the

raster so that it matches the real map North direction.

Fig. 13 – The Scale factor (4th parameter)magnifies or reduces

the raster transforming its units from pixels to meters.

Regarding this last 4th parameter, it must be said that this transformation applies a unique scale factor. This means that the raster magnification or reduction is “isotropic”, i.e. equal in both East and North directions. This has to be mentioned because there is also an “Affine 5 parameters transformation” in which 2 separate scale factors are calculated, one for East and one for North direction. This last algorithm is preferred when you assume that the raster map has been subjected to a different deformation in the two directions, as it normally happens, for example, when a low quality rolling scanner is used.

To understand the difference between a unique and two scale factors, just think of when you have an image inside a word-processing software. If, for example, you want to enlarge it, you can act in two ways: by dragging the grip on one of its vertices or dragging the grip on one of the middle points of its sides. In the first case the image will enlarge maintaining its aspect ratio, in the second case it will enlarge only in the direction you are dragging it (vertically or horizontally), whereas the other size remains unaltered, thus producing a distortion of the aspect ratio.

Page 16: International Surveying Course - TopGeometri

14

A practical example Having explained the algorithm in the previous section, let’s see a practical example on how to perform this transformation using the software Geomap9. Of course in this example I won’t provide a detailed explanation on how to use the software, which you might want to find in Geomap’s user guide, instead I’ll concentrate on enlightening the concepts discussed in the previous section. So, let’s open in Geomap the same raster map previously opened in the Cad software (Fig. 3). This raster file is called LAMPORECCHIO_Foglio_016.PNG and is provided together with the software.

Fig. 14 – The same raster map previously opened in the Cad software, ready to be transformed.

As you can see in Fig. 14, while opening the raster file, the software asks its scale and, if this map provides grid lines, their interval. For this map we select the suggested values of 2000 for scale and 200 (meters) for grid lines interval.

This map is a typical Italian Cadastral Map provided with a grid of lines in both East and North directions, each of them presents its respective map coordinate. In this map the reference system is a local Cassini-Soldner projection, in other maps the system might change to Gauss-Boaga or Samson-Flamsteed, but whatever the reference system is it does not matter.

We are now ready to perform the Affine 4 parameters transformation. To do so, we simply need to select the Affine option in the menu on top and then click the Grid-point button as shown in Fig. 15. The cursor will now assume the form of a little cross. 9 The software Geomap has been developed by Gianni Rossi (Tecnobit S.r.l.) and is available in English language for free, ,

for studying purposes only, to the participants of the International Surveying Course 2011. If you are interested in receiving a free license of Geomap, please contact Gianni Rossi via email at: [email protected].

Page 17: International Surveying Course - TopGeometri

15

Fig. 15 – Let’s start the geo-referencing using the Affine 4 parameters transformation.

Then let’s zoom the first grid-point corresponding to the intersection between the lowest and the left hand side grid lines, i.e. the grid point at the most South-West position.

As shown in Fig. 17 at page 15, we need to zoom the point at a very high level of magnification, so that we can see the raster pixels, in order to click it with good precision. In fact, zooming at a large factor we can easily recognize the single rows and columns of pixels: the squares each of which has its own color.

Why do we need to be so precise? Because, as we’ll see once calculated the transformation, the real dimension (in meters) of the pixels can be consistent, depending on the raster resolution.

So, it might be that if we mistake only of one pixel, the error could be significant. In this case we might be led to a wrong conclusion: we think that the raster map is significantly deformed, whereas it is not, but the error only depends on our poor accuracy in doing this operation.

Once we have clicked the grid-point, the window shown in Fig. 16 will appear asking to insert its real map coordinates that we can easily read directly on the map itself (see first box in Fig. 17).

Fig. 16 – Once we have clicked the grid-point, we simply need to provide its real map coordinates.

Once confirmed the coordinates by clicking OK, we’ll see an X blue cross appearing exactly where we clicked the grid points. At the same time, in the Output window below, section Reference points, a row is created as shown in Fig. 18.

Fig. 17 – We need to zoom the grid-point at a very high factor, until we can recognize the pixels, in order to click it at the maximum precision.

Page 18: International Surveying Course - TopGeometri

16

Fig. 18 – Here is the just inserted point, an X blue cross

appears on the map and a row of data is created.

Let’s see what information this row of data provides:

o Point: a progressive number assigned to each inserted reference point.

o East/North raster: the raster coordinates, i.e. the distances in pixels for both directions between the point and the raster origin, the low-left corner of the raster image.

o East/North map: the real map coordinates that we assigned to the reference point.

At this stage we simply need to repeat the operation described above and insert a certain number of reference points in order to perform an accurate transformation.

How many other reference points should we insert?

And in which position?

The answer to the first question depends on how good the raster map is. If we know in advance that it’s not significantly deformed, a few points are enough.

Otherwise, the higher number of points we use, the better, because, as we’ll see, this superabundance will allow us to exclude the points resulting affected to relevant errors.

The second question lead us to re-consider the algorithm explained in the previous section.

Since this transformation applies a rotation, the best disposition for the reference points used is to possibly get them along the external grid lines. Doing so, in fact, the calculated rotation will result more accurate.

So, following these considerations, here below in Fig. 19 our example is completed with 9 reference points, whereas Fig. 20 shows their analytical data:

Page 19: International Surveying Course - TopGeometri

17

Fig. 19 – Our raster map with 9 reference points inserted.

Fig. 20 – The data of the 9 reference points, ready for the calculation.

Well, we can now calculate the transformation by simply clicking the Calculate button, the second one at the top left hand side of Geomap’s toolbar. The calculation produces for the 9 reference points the results shown in Fig. 21:

Fig. 21 – The results of the transformation for the reference points.

These results are:

o East/North georef: these two columns now contain the raster coordinates transformed into the map reference system by applying the algorithm explained in the previous section. As we can see, these values are close to those we have manually inserted

Page 20: International Surveying Course - TopGeometri

18

(columns East/North map10) but they differ of a certain quantity. Why? Obviously because this raster map had been subjected to deformation due to the possible causes described in section Why raster maps need to be geo-referenced? - The map deformation.

o Deviation: this is the residual value calculated by the least square algorithm of this transformation and it’s due to the fact that we used 9 reference points, i.e. much more than the minimum 2. This data is very important because it allows us to evaluate the reliability of each point: the higher the deviation is, the poorer the reference point reliability is. In other words, assuming that we inserted the points using the necessary care and precision, if a point deviation presents a high value, it means that the area of the map around that point has been subjected to a relevant deformation. In this case therefore, we can remove that point and recalculate so that the whole transformation will be no longer affected by it. To do this in Geomap is quite simple, select the row of the point you want to exclude and right-click on it, the context menu shown in Fig. 22 will then appear in which you can choose either the Disable or the Remove option. The first option simply disables that point from the calculation (the X on the Consider column is removed), whereas the second one completely delete the point from both the map and the table. Of course we finally might ask what is the acceptable tolerance for deviations. Well, it depends on many factors, first of which the quality of the raster map and the precision required by the job why we are geo-referencing the map11.

Fig. 22 – How to exclude a reference point presenting a high deviation.

Other than the results on reference points the calculation also determines the 4 parameters explained in the algorithm section. You can see them in the Results box in Geomap toolbar at the top, as in Fig. 23:

Fig. 23 – The 4 parameters of the transformation.

10 These original map coordinates are also called “nominal coordinates” to indicate that their values are what they should be if

the map had not been subjected to any deformation. 11 In some Countries, for Cadastral tasks, the tolerance is directly stated in official standards. In Italy, for example, the

Cadastral Authority (Agenzia del Territorio) indicates a value of 0.50 meters.

Page 21: International Surveying Course - TopGeometri

19

o East/North: these two values are the East/North translations applied to the origin of raster map to port it to the real map coordinates. Simply speaking, these numbers are then the map coordinates of the low-left vertex of the raster.

o Scale: this is the scale factor between the raster (pixel units) and the real map system (meter units). This value is actually the size of the pixels composing this raster map. In our example therefore, the value of 0.25373 indicates that each pixel of the map has a dimension (side of the square) of 0.25373 meters, i.e. about ¼ of a meter. This might now clarify why I said that during the reference point insertion we should apply good care and precision (zooming until we can estimate each single row/column of pixels). In fact, for this map simply mistaking one pixel would mean an error of 25 cm.

o Rotation: this is the transformation angle in gradians, the angular unit also defined as “gon” or “grad” corresponding to 1⁄400 of a turn and decimal digits. The value -0.0189 means that the raster has been rotated counterclockwise (being negative) of such angle to fix it at the real map North direction.

Exporting the geo-referenced map Well, we have finally calculated the transformation, what concrete use can we make of it now? Simple, we can export the geo-referenced raster map into some common file format so that we can use it in other applications, such as CAD software. To do so, click the corresponding option in the Export box in Geomap toolbar shown in Fig. 24.

There are 2 typical file formats for geo-referenced raster maps. The first is the GeoTIFF format and you can create it only when the original raster file was a .TIF file. This format in not actually a new format in that the resulting file remains the same .TIF file that you opened in Geomap at the beginning. The difference between the original (normal) .TIF file and the new GeoTIFF format saved by the export command is that the latter contains the transformation parameters and therefore it will be interpreted as geo-referenced by the software which supports this feature, such as CAD software like AutoCAD and ZWCad. Obviously, while saving the new GeoTIFF file you can choose a different name compared to the original file, so that you can still maintain the non-transformed raster map.

The TFW12 format instead is a simple 6 rows text file that contains the geo-referencing information as numerical data. This file is useful when the original raster file is not a .TIF file (otherwise you can simply transform it into a GeoTIFF file), such as BMP, PNG, JPG, etc. The TFW file acts as an “accompanying” file in such that when an application supporting geo-referenced raster file finds a .TFW file with the same name and in the same folder of the raster file you are opening, that program reads the geo-referencing information from the .TFW, thus positioning

12 The acronym TFW stands for Tiff World File, i.e. a file which contains the absolute (World) coordinates of the image.

Fig. 24 – The transformed raster map can be easily exported into the most common file formats.

Page 22: International Surveying Course - TopGeometri

20

the image into the real coordinate system. For our example the TFW file exported contains the following 6 rows:

0.25372531 0.00007524 0.00007524 -0.25372531 -34811.19736778 54938.86869373

Their values are:

1. Scale factor (pixel resolution) multiplied by the cosine of rotation angle: f cos ε

2. Scale factor (pixel resolution) multiplied by the sine of rotation angle: f sin ε.

3. The same as row 2.

4. The same as row 1 but with negative sign. This minus sign is used to indicate that the image Y-axis is positive down which is the opposite from real world coordinates.

5. The Easting of the upper left pixel (0,0 in image coordinates).

6. The Northing of the upper left pixel.

Please note that values 5 and 6 differ from the ones calculated by the transformation. This is due to the same reason mentioned for value 4, i.e. real map systems consider the map origin in its low-left vertex and the North coordinate positive, whereas standard graphic software put the image origin in the upper left pixel. You might say that the Easting should be equal to the calculated one, but this is not the case neither because the raster has been rotated counterclockwise of -0.189 grads.

But the most useful and popular file format provided by Geomap is the DXF file because it is directly usable in any CAD software. By clicking the DXF drawing option in the Export box in Geomap toolbar shown in Fig. 24 you can easily create this file. As soon as the DXF file is successfully created, you get the message reproduced in Fig. 25, from which you can directly open it in your CAD software associated to DXF files in your Windows installation.

Fig. 25 – You can directly open the DXF drawing containing the geo-referenced map in the CAD software associated to DXF files in your Windows installation.

Fig. 26 shows the DXF drawing containing the geo-referenced map opened in the CAD software. At first sight this drawing seems the same of the one shown in Fig. 3 at page 3 in section “Why raster maps need to be geo-referenced?”, but it is not; this one contains the geo-referenced map, as you can realize from the 9 red X positioned in the correspondent reference points used for the transformation.

Page 23: International Surveying Course - TopGeometri

21

Fig. 26 – The DXF drawing containing the geo-referenced map opened in the CAD software.

Evaluating the geo-referenced map Now the we have the geo-referenced map in our CAD software, let’s see how the transformation has modified the map. We’ll do this by reproducing the same operations explained in section “A non-geo-referenced raster map has no reference system and real units” on page 2. The first operation was showing the coordinates of the map lower-left vertex using the usual CAD command for inquiring the coordinates of a point (Fig. 4). That time the CAD simply showed X=0 Y=0 Z=0 coordinates. As shows Fig. 27,repeating now the same task we’ll get the real map coordinates of the raster origin calculated by the transformation (see Fig. 23).

Fig. 27 – The origin of the raster has now the real map coordinates.

Now let’s also ask the coordinates of the first reference point used for the transformation, as we did in Fig. 5. In that case we got the values X = 175.7446 and Y = 129.1123 which were simply the number of pixels in horizontal/vertical direction between the raster origin and that point.

Page 24: International Surveying Course - TopGeometri

22

Now instead we get the real coordinates East = - 34600; North = 53600 written in the map, as shown in Fig. 28.

Fig. 28 – Reference points have now their real map coordinates.

But is this really true? No, it is not. We get the absolute map values only because the point has been selected using the CAD object-snaps, thus selecting the red X, i.e. the CAD symbol of that point. But this symbol is indeed placed by Geomap at the absolute map coordinates, so there’s no point in getting those values. To clarify this issue, let’s zoom the reference point very largely as in Fig. 29.

Fig. 29 – Despite transformation, reference points have maintained

their deformation compared to their absolute coordinates.

Doing so, we can realize that there is still a difference between the position of the red X, the symbol at the absolute map coordinates, and the raster intersection of the two grid lines where

Page 25: International Surveying Course - TopGeometri

23

we clicked the reference point when we performed the transformation. In fact, asking the coordinates of this intersection (not using the object-snaps) we do not get the absolute coordinates but slightly different values.

Why? I’ll explain it shortly.

First, let’s complete the third operation we performed when we initially imported the non-geo-referenced raster map in the CAD. This operation consisted in asking the distance between 2 two consecutive grid lines (see Fig. 6). At that time we got the value 167.056 instead of 200 meters.

Doing the same measurement now we do get the real dimension in meters, but we still do not get exactly 200 meters, we get 200,34 instead, as reported in Fig. 30. Why?

Fig. 30 – We still do not get exactly 200 meters as two grid lines interval.

The reason of this discrepancy is just the same as the difference between the coordinates in Fig. 29 and it’s quite a simple reason: this transformation does not remove the deformation of the map or, in other words, it does not rectify the map.

The raster map was deformed before the transformation and it still is deformed after the transformation. This geo-referencing technique in fact simply applies a scale factor to the raster image in order to port it from pixels to meters, but does not alter the image itself. In other words, the original raster map has only been scaled but the image itself has remained the same, i.e. maintaining its deformation.

This obviously leads to the conclusion that this method can only be suitable for certain purposes, such as verifying the quality of the scanning process, but it is not suitable at all for tasks in which a good precision is required, such as for example boundary disputes.

For these kind of jobs we need some other transformations which really correct map’s deformation, as we’ll see in the next sections.

Page 26: International Surveying Course - TopGeometri
Page 27: International Surveying Course - TopGeometri

25

The Grid transformation Why the Affine transformation is not suitable for precision tasks? At the end of the previous section we came to the conclusion that the Affine transformation is not suitable for tasks in which a good precision is required, because it does not remove the deformation of the map. The reason lays on the fact that the Affine algorithm performs a simple geo-referencing, not also a rectification of the raster map. It simply scales the map by a scale factor, but it doesn’t modify the raster at all. Also, the calculated scale factor is unique for the whole raster, thus assuming that the map has been subjected to a homogeneous deformation, i.e. the entire map is deformed by the same entity. But obviously this is not the case, because in reality the physical agents deforming the original paper map (heat, humidity, contact with liquids, etc.) might have acted with different entities in single localized areas of the map. So, if we need to obtain metrical information (coordinates, distances) of a specific localized area of the map, we are interested in correcting the deformation of that single localized area, regardless of the average deformation of the whole map.

The algorithm Having said that the Affine transformation is not suitable for some type of tasks, such as boundary disputes, what is the right approach for these tasks?

Well, let’s go back to the situation of paper maps (not yet available as raster images). How should we act in that case?

For example, on the paper map shown in Fig. 31, we want to retrieve the Easting of the point indicated by the red spot. To do so, we measure with an engineer’s scale the distance from the grid line on the right hand side having an Easting of -24200. As we’ve already seen in section The map deformation (Fig. 7 at page 6), this area of the map results deformed (enlarged) in that the distance measured between the two grid lines results 201.10 instead of exactly 200.00.

Here are the steps to perform in order to retrieve the corrected coordinate:

1. Measure the distance between the 2 grid lines containing the desired point. -201.10

2. Compare the distance retrieved on step 1 with the nominal value of the interval (200 meters in this scale) and, if the two values differ, calculate the adjusting coefficient dividing the measured valued by the nominal value. —200 / —201.10 = 0.9945

3. Measure the point Easting from the reference grid line and multiply it by the adjusting coefficient found in step 2, hence determining the adjusted distance (deformation removed). —139.10 ● 0.9945 = —138.34

4. Add the adjusted distance found in step 3 to the absolute East coordinate of the reference grid line. —24200 + (—138.34) —24338.34

Page 28: International Surveying Course - TopGeometri

26

Fig. 31 – The problem of correcting map deformation in a paper map.

As I mentioned in note 4 on page 6, this method is particularly appropriate for maps in which the points have been originally inserted by just measuring their coordinates from the grid lines because it exactly reflects map creation. Well, this concept of map calibration is still valid for raster maps as well. But of course, them being available as image files, using an appropriate software we can conveniently add much more precision rather than estimating decimals of a millimeter with an engineer’s scale.

So, following the manual approach described here above, the Grid transformation algorithm is based on the assumption that each grid square formed by grid lines has been subjected to a deformation in both East and North direction. Fig. 32 below heavily exaggerates the deformation of a square so that the calibration procedure could be evident, whereas the real deformation would make it imperceptible. With such a magnified deformation we can realize that the grid square is no longer a square, but it is quadrilateral because its sides, laying on the grid lines, are no longer parallel.

Therefore, if we need to retrieve the coordinates of a point inside it (shown by a blue circle in Fig. 32), we should calculate the deformation of the quadrilateral compared to the original square. Fig. 33 shows the geometrical schema of the algorithm. Because the horizontal/vertical

Page 29: International Surveying Course - TopGeometri

27

grid lines forming the quadrilateral have lost their parallelism, we simply extend them until they intersect in both East and North directions13. Then we conjunct these two intersection points with point P that we are interested in, so determining the lines AC and DB which exactly reflect the quadrilateral deformation referred to point P. We then calculate the length of these two segments. If there was no deformation, this length should be exactly 200 meters (for the scale of this map) for both of them, otherwise different values will tell us how much the original square has deformed in the corresponding direction. In Fig. 33 for example, we merely assume that we found AC = 199 and DB = 201.

Fig. 32 – The Grid transformation algorithm is based on the on the assumption

that each grid square has been subjected to a deformation.

Fig. 33 – The geometrical schema of the Grid transformation algorithm.

13 Obviously we also consider the special case in which the grid lines have maintained parallel.

Page 30: International Surveying Course - TopGeometri

28

So what we need to do is to calculate what would be point P coordinates when the quadrilateral was still a perfect square with AC = 200 and DB = 200. This is an equational algorithm which mathematical demonstration goes beyond the purpose of this lesson. Anyway, it is quite easy to understand from a geometric point of view. In fact, what this transformation does is a reverse-deforming of the quadrilateral until AC and DB will go back to being 200 meters long. The sequence of images in Fig. 34 shows this reverse-deforming. The original position of point P is indicated by the blue circle which remains fixed, whereas the red circle shows point P moving until it reaches its final position (box 4). In other words, we have moved point P in the position it had when the map had not yet been subjected to any deformation. The distance between the two blue and red circle shown in Fig. 34 box 4 is the graphic evidence of the map deformation14. Differently from the Affine transformation then, the Grid technique is not only a simple geo-referencing, but it also applies a real map rectification in that it modifies the raster image by rectifying its grid squares. Therefore this solution calculates and corrects the deformation of each single square of the map in accordance to the assumption that the map had been subjected to an inhomogeneous deformation, i.e. grid squares might present different deformation between each others. This is the reason why, for Cadastral Maps provided with grid lines, this method is much more preferable compared to the Affine transformation explained in the previous chapter.

Fig. 34 – The Grid transformation performs a reverse-deforming of the grid squares (quadrilaterals).

14 Please note that in this case we had manually increased map deformation just to make it perceptible.

Page 31: International Surveying Course - TopGeometri

29

A practical example Well, now that we have explained the concept of the algorithm, let’s see a practical example on how to perform this transformation using the software Geomap (please see note 9 at page 14 on how to obtain a free license of this software for studying purposes).

So, let’s open in Geomap the same raster map previously opened in the section dedicated to the Affine transformation example (Fig. 14 at page 14).

In this case we don’t want to apply the geo-referencing to the whole map because we are only interested in retrieving some points in the center-North side of the raster, needed to resolve a boundary dispute. So we zoom that area on the map, as shown in Fig. 35, and select the Grid option in Geomap toolbar (where we can also notice that the grid lines interval is defined as 200 meters).

The points that we need to retrieve from the map are of two types:

1. Some edges of the buildings present in that area (with a darker okra color). The purpose of these points is to link them to their corresponding real points surveyed in the field.

2. The disputed boundary line dividing parcels 5 with the three parcels 3, 15, 18.

Fig. 35 – The Grid calculation can be limited to the squares covering the points we are interested in.

To start the transformation, we simply need to click the Grid-point button, the cursor will then assume the form of a little cross. With this cursor we now click the grid points forming the squares which include the points we need to retrieve from the map.

So let’s start by clicking the upper-left vertex of the grid square on the left as shown in Fig. 36.

Page 32: International Surveying Course - TopGeometri

30

As I said in the example of the Affine transformation, while clicking the grid points we must zoom them very largely until we can clearly see single pixels so that we can click them with a high precision, as reproduced in Fig. 37. In fact, we should remember from the Affine transformation that this map pixels resolution is 25 cm, so wrongly clicking of only one pixel will cause such error.

Fig. 36 – The Grid transformation allows to limit the geo-referencing

to the only squares which include the points we need to retrieve from the map.

Fig. 37 – Points has to be zoomed until we can clearly see single pixels.

Once clicked the grid point, the window shown in Fig. 38 appears, letting us to insert its map coordinates that we can easily read on the map itself.

Fig. 38 – Once clicked the grid point, we provide its map coordinates.

Confirming the coordinates by clicking OK, we’ll see an X blue cross appearing exactly where we clicked the grid point. At the same time, in the Output window below, section Reference points, a row is created as shown in Fig. 39 containing the following data:

Page 33: International Surveying Course - TopGeometri

31

o Point: a progressive number assigned to each inserted reference point.

o East/North raster: the raster coordinates, i.e. the distances in pixels for both directions between the point and the raster origin, the low-left corner of the raster image.

o East/North map: the real map coordinates that we assigned to the reference point.

We then proceed inserting all the remaining points forming the 4 grid squares that cover all the map points we need, as shown in Fig. 40 (map) and Fig. 41 (coordinates).

Fig. 39 – The new inserted grid point is defined by an X blue cross and a row of numerical data.

Fig. 40 – Here’s all the points forming the 4 grid squares that cover all the map points we need.

Page 34: International Surveying Course - TopGeometri

32

Fig. 41 – The grid points double coordinates, raster and map, ready for the transformation.

What we need to do now is to insert the points we want to retrieve from the map. To do this, we simply need to press the Transforming point button in Geomap toolbar, then click each point on the map. As said above, we need two different types of points: the building edges needed to link the map to the real survey and boundary line that we want to verify. So let’s start with the building edges. We click on the first one and the window shown in Fig. 42 will appear asking the name we want to assign to the point and its type.

Fig. 42 – The insertion of a building edge needed to link the map to the real survey.

The type can be defined as Control and Tracing which have the following meanings:

- Control: means that we are inserting a control-point, i.e. a point that will be used to link the map to survey, as for the building edge in Fig. 42.

- Tracing: means that we are inserting a tracing-point, i.e. a point that we want to trace in the field, as the boundary points that we’ll see below.

Once we confirm the point clicking OK on the window, we’ll see a green X appearing on the map and the row shown in Fig. 43 in the Transforming points table of the Output window. This row,

Page 35: International Surveying Course - TopGeometri

33

at the moment, only contains East/North raster coordinates of the point, i.e. the distances in pixels between the point and the raster origin (the low-left corner of the raster image), whereas the East/North map coordinates will then be calculated by the program.

Fig. 43 – The point is defined by a green X on the map and a row in the Transforming points table.

So we continue inserting all the remaining control-points (building edges) as shown in Fig. 44.

Fig. 44 – Here are all the control-points inserted.

At this stage, the remaining task is to insert the boundary points the we want to reproduce back in the field. As you can see in Fig. 45, This operation is performed in the same way as we did for control-points, the only difference being that we need to define the points as type Tracing.

Page 36: International Surveying Course - TopGeometri

34

This differentiation between control-points and tracing-points has no particular meaning in Geomap, its purpose is to distinguish the two sets of points so that the user can export them in separate files to be used in other topographical applications in order to resolve the boundary dispute. In such applications, in fact, the two sets of points are used in different procedures. Control-points are used, for example, in a roto-translation to link them to their correspondent surveyed points; whereas tracing-points are used to calculate tracing elements once the survey has been transformed in map system coordinates.

Fig. 45 – The insertion of a boundary point that we need to trace back in the field.

Confirming the boundary point clicking OK, we’ll see a dark red X appearing on the map and the corresponding row in the Transforming points table. Once we are done with all the boundary points, the map will appear as in Fig. 46.

Fig. 46 – Here are all the transforming points: control-points (building edges, green X)

and tracing-points (boundary vertices, dark red X)

Page 37: International Surveying Course - TopGeometri

35

The Transforming points table now contains all these points with their raster coordinates (Fig. 47) and so we are ready for calculation. This is simply run by clicking the Calculate button on Geomap Grid toolbar and produces the real map coordinates shown in Fig. 48.

You might wonder why in this case we do not have any Deviation column as we had for the Affine method. The reason is inside the algorithm explained in the previous section, i.e. the Grid transformation completely removes the deformation by rectifying the grid lines (squares), therefore there is no deviations at all.

Fig. 47 – Transforming points raster coordinates ready for calculation.

Fig. 48 – Transforming points calculated real map coordinates.

We can better understand this issue by exporting the DXF drawing of the transformation. This DXF will in fact contain the rectified raster map.

To do so, we click on the DXF drawing option in the Export box in Geomap toolbar. As soon as the DXF file is successfully created, you get the message reproduced in Fig. 49, from which you can directly open it in your CAD software associated to DXF files in your Windows installation.

Page 38: International Surveying Course - TopGeometri

36

Fig. 49 – The transformed map is exported into a useful DXF file that you can directly open in our CAD.

Once we obtain the DXF drawing opened in the CAD (Fig. 50), we can see what I mean when I say that this transformation has removed map deformation.

In fact, as shown in Fig. 51, asking the coordinates of a grid point, we obtain the exact absolute values with no decimals, while asking the distance between two consecutive grid lines give us the exact value of 200 meters ().

Fig. 50 – The DXF darwing containing the transformed raster map.

Page 39: International Surveying Course - TopGeometri

37

Fig. 51 – In the transformed map, grid points present their exact absolute coordinates.

Fig. 52 – In the transformed map, grid lines interval exactly matches 200 meters.

At this stage you might think that, having the rectified raster map in the CAD software, you can pick up further map points directly on the DXF drawing. Well, this is incorrect.

The reason is that there are two algorithms in place in this transformation. The first is the mathematical algorithm (explained in the previous section) which calculates the numerical point coordinates shown in Fig. 48. These are the real coordinates that we have to use for completing our job15. Whereas the procedure that rectifies the raster map adopts a pixel re-generating algorithm. What does it mean?

Let’s say that a grid square in the original (deformed) map is larger than 200 meters, this algorithm removes some pixels while generating the rectified raster. On the contrary, if the original grid square is smaller than 200, it adds some pixels. So, if you pick a point in the DXF in a position near where a pixel has been added or removed, you introduce an error of 25 cm. This is why map points has to be always inserted in the original raster map and calculated with Geomap.

15 In fact Geomap exports these coordinates in a XY text file as CSV (comma separated values) so that the user can then

import them in other topographical applications.

Page 40: International Surveying Course - TopGeometri

38

The Homography transformation The Homography transformation is a popular geo-referencing technique used worldwide. It is based on quite complex geometric and mathematic concepts, as the “homogeneous coordinates” and “projective planes”, which explanation goes far beyond the purpose of this lesson.

Just to give an idea, the familiar Cartesian plane is composed by a set of points which are one-to-one (biunique) related to couples of real numbers X-Y on the two axis. The projective plane instead is a superset of that real plane where for each point we also consider all possible (infinite) straight lines towards space. In this scenario every 2D point can be projected in any other plane in the space.

Based on these concepts, it is defined the “homography between 2 planes” which, simply speaking, means that given 4 points in a plane, it always exists a relationship that transforms them into the corresponding 4 points in another plane. As schematized in Fig. 53, this relationship is then used in normal geometry because it allows to transform a quadrilateral in one coordinates reference system into the corresponding quadrilateral in another coordinates reference system.

Fig. 53 – The homography transforms a quadrilateral from one reference

system into the corresponding quadrilateral in another coordinates system.

Initially the homography has not been studied for map geo-referencing but for other purposes, such as to rectify a perspective image, for example to generate a plane view of a building from a photo.

Fig. 54 schematizes the concept: the image on the right is a plane view of some orthogonal rectangles, whereas the image on the left is a perspective view.

The homography has been extended to maps when aerial photogrammetric techniques of survey took place. In this type of survey in fact the homography is used by assuming the map as a perspective view of the ground as shown in Fig. 55.

Page 41: International Surveying Course - TopGeometri

39

Fig. 54 – The perspective to plane view transformation performed by means of homography.

Fig. 55 – For aerial photogrammetric surveys the homography

assumes the map as a perspective view of the ground.

The algorithm The homography transformation is based on the following formulas:

1++++

=yhxg

cybxaX 1++++

=yhxg

fyexdY

Where X-Y are the coordinates to be calculated in the second reference system, given coordinates x-y in the first reference system in function of 8 transformation parameters a, b, c, d, e, f, g, h. So, having these 8 unknowns, at least 4 known points in both systems are required, this is I previously mentioned quadrilaterals.

The formulas above are then transformed in non-fractional equations by multiplying both terms by the denominator:

(2)

Page 42: International Surveying Course - TopGeometri

40

cybxaXyXhxXg ++=++ Hence: XyXhxXgcybxa =−−++

fyexdYyYhxYg ++=++ YyYhxYgfyexd =−−++

Writing now these equations for the 4 known points in both reference systems (indicated with indexes 1, 2, 3, 4):

1111111 XyXhxXgcybxa =−−++

2222222 XyXhxXgcybxa =−−++

3333333 XyXhxXgcybxa =−−++

4444444 XyXhxXgcybxa =−−++

1111111 YyYhxYgfyexd =−−++

2222222 YyYhxYgfyexd =−−++

3333333 YyYhxYgfyexd =−−++

4444444 YyYhxYgfyexd =−−++

We can finally write the transformation matrix that allows to calculate the 8 transformation parameters which meaning is described below.

4

3

2

1

4

3

2

1

444444

333333

222222

111111

444444

333333

222222

111111

10001000100010000001000100010001

YYYYXXXX

hgfedcba

YyYxyxYyYxyxYyYxyxYyYxyxXyXxyxXyXxyxXyXxyxXyXxyx

=•

−−−−−−−−−−−−−−−−

a = fixed scale factor in X direction with scale Y unchanged.

b = scale factor in X direction proportional to Y distance from origin.

c = origin translation in X direction.

d = scale factor in Y direction proportional to X distance from origin.

e = fixed scale factor in Y direction with scale X unchanged.

f = origin translation in Y direction.

g = proportional scale factors X and Y in function of X.

h = proportional scale factors X and Y in function of Y.

Once calculated these 8 parameters, we can easily use them to transform any point from the first reference system to the second using the transformation formulas at the beginning of this section.

Page 43: International Surveying Course - TopGeometri

41

How to apply Homography map geo-referencing Referring to the theoretical concepts and algorithm explained in the previous sections, it clearly appears that Homography transformation is suitably applicable in all cases when we know at least 4 points in both raster and map coordinate systems, regardless whether they are reference (grid) points or not. So this technique might be useful for maps that do not provide reference points on the condition that we know in advance the coordinates of 4 map points and that the quadrilateral of these 4 map points contains the map points that we want to retrieve from the map. But if the map does not provide reference points, how can we know the coordinates of 4 of its points?

Simply by surveying them in the field, i.e. we go to the field with the map and search some map points which are still present. If we are sure about the correspondence between the point in the map and the one found in the field, we just insert it in our survey, this point will then become one of our reference points.

Of course we should not limit our survey to only 4 points, we can include all corresponding map-real points we need in order to cover all those map points not present in the field that we want to transform. Fig. 56 shows a map linked to a survey through some corresponding points (blue X) of which external perimeter includes the map points to transform (green X).

Fig. 57 – The quadrilaterals on which is calculated the homography map-survey.

Once performed the survey, we can easily obtain the coordinates of the reference points, being these the surveyed points. To do so we simply need to calculate our survey in the reference system we prefer. There’s no constrains in this choice, for example we can simply adopt the local survey reference system which, in a theodolite survey, has the origin on the first station and is oriented in the direction on the zero value of the horizontal angles.

Page 44: International Surveying Course - TopGeometri

42

The problem, on the other hand, is the following: having said that homography is based on a 4 points calculation, how do we define the quadrilaterals on our set of map-real points? I mean, the corresponding map-real points we have found are randomly disposed, how do we form the quadrilaterals on which to apply the transformation?

One method (the one adopted in Geomap), is to firstly calculate a triangulation of all points, like it is usually done for 3D terrain modeling, then consider all possible quadrilaterals that can be formed by joining all couples of adjacent triangles. This operation of course will create overlapping quadrilaterals, so we then need to apply the transformation to each quadrilateral and finally calculate the average results. This approach is quite convenient because it smoothes the possible different map deformation between adjacent quadrilaterals.

But of course the Surveyor might want to directly define the quadrilaterals on which to apply the transformation, in case he/she has an idea about map deformation. In this case in fact, he/she can define each single quadrilateral based on its different deformation compared to the others16.

But there’s another issue to consider: the Homography algorithm directly migrate each single reference point of the map into its corresponding point in the survey reference system, i.e. non residuals are generated by the calculation. This means that every reference point is considered having the same reliability as all the others. Is that correct?

No, it is not. In the Affine transformation section we’ve seen that, applying that calculation, reference points result having different deviations and this information allows us to remove from the transformation the points presenting this value higher than a certain tolerance. Well, since Homography transformation does not provide any deviation result (residuals), how can we maintain this capability?

The answer is quite simple: before applying homography, we need to firstly apply a transformation which provides deviations. Doing so, we still can evaluate points reliability and exclude those considered incorrect, finally applying the Homography transformation to only the good points.

We will understand better all the issues described here above by following a practical example.

Being the operations to perform just the same for Homography, Rubber-Sheeting and Trilateral transformations, I included a unique example in the section dedicated to the latter technique on page 47. In fact, the only difference between Homography, Rubber-Sheeting and Trilateral transformations is that the first two are based on quadrilaterals, whereas the Trilateral is based on triangles.

16 Geomap allows both automatic and manual definitions of quadrilaterals.

Page 45: International Surveying Course - TopGeometri

43

The Rubber-Sheeting transformation The Rubber-Sheeting transformation is based on geometric and mathematic theories similar to those of the homography, mentioned in the previous section, which of course are not treatable in this lesson due to their complexity. This technique is called “Rubber-Sheeting” because figuratively it considers a deformed map as a sheet made of rubber which is stretched to some nails representing the correcting reference points. Fig. 58 schematizes this approach: the green area represents the deformed map, whereas the black and blue spots represent the control points to which we want to correct the deformation.

Fig. 58 – The Rubber-Sheeting transformation considers a deformed map as a sheet made of rubber which is stretched to some nails representing the correcting points.

As fore homography, also the Rubber-Sheeting transformation relies on the concept that, given 4 points in a reference system, it is always possible to transform them into the corresponding 4 points in another reference system, as schematized in Fig. 59.

Fig. 59 – The Rubber-Sheeting transforms a quadrilateral from one reference system into the corresponding quadrilateral in another coordinates system.

Page 46: International Surveying Course - TopGeometri

44

This means that also the Rubber-Sheeting transformation transforms a quadrilateral from one reference system into the corresponding quadrilateral in another coordinates system. As we see in the next section, the algorithm is a complex matrix calculation, but simplifying it we can say that an internal point on the first quadrilateral is “mapped” in the second quadrilateral by respecting the proportion of its projections17 on the sides (a, b, c, d, e, f, g, h).

Always simplifying (a lot) the mathematical algorithms into a more understandable geometrical form, it is interesting to see the conceptual difference between the schema of the Homography, shown in Fig. 53 and the one of the Rubber-Sheeting shown in Fig. 59. The difference is that the Homography gives priority to alignments, whereas the Rubber-Sheeting gives priority to linear proportions. As shown in Fig. 60 in fact, the diagonals intersection of the first quadrilateral is still mapped by the Homography in the diagonals intersection of the second quadrilateral, whereas it is mapped by the Rubber-Sheeting in the intersection of its side projections.

Fig. 60 – The difference between Homography and Rubber-Sheeting: the first transformation

gives priority to alignments, whereas the second gives priority to linear proportions.

17 The projections are the divided parts of the sides formed by tracing on the point the two straight lines parallel to the axis.

Page 47: International Surveying Course - TopGeometri

45

The algorithm The different mapping performed by Rubber-Sheeting compared to Homography (Fig. 60) is obviously based on the different algorithms. The Homography algorithm is based on formulas (2) on page 39, whereas the Rubber-Sheeting calculation is based on the following formulas:

X = a x y + b x + c y + d Y = e x y + f x + g y + h

While they differ from the Homography, mainly because they are non-fractional18, the approach remains the same. The X-Y on the left of the equal sign are the coordinates to be calculated in the second reference system, given coordinates x-y in the first reference system. The calculation is function of 8 unknown transformation parameters a, b, c, d, e, f, g, h and therefore at least 4 known points in both systems are required.

The formulas above are then transformed in a set of 8 equation for the 4 known points in both reference systems (indicated with indexes 1, 2, 3, 4):

X1 = a x1 y1 + b x1 + c y1 + d

X2 = a x2 y2 + b x2 + c y2 + d

X3 = a x3 y3 + b x3 + c y3 + d

X4 = a x4 y4 + b x4 + c y4 + d

Y1 = e x1 y1 + f x1 + g y1 + h

Y2 = e x2 y2 + f x2 + g y2 + h

Y3 = e x3 y3 + f x3 + g y3 + h

Y4 = e x4 y4 + f x4 + g y4 + h

Then these equations are transformed in matrix form in order to simplify the resolution:

4

3

2

1

4

3

2

1

4444

3333

2222

1111

444

3333

2222

1111

1000010000100001000000001000010000100001

YYYYXXXX

hgfedcba

yxyxyxyxyxyxyxyx

xyxyxyxyxyxyxyx

=•

18 In the past, when computing calculation did not have today’s capibilities, non-fractional algorithms were preferred, not

only for reason of speed, but also for avoiding possible math problems of division by zero.

Page 48: International Surveying Course - TopGeometri

46

The 8 transformation parameters has the following meaning:

a = scale factor in X direction proportional to the multiplication X ● Y.

b = fixed scale factor in X direction with scale Y unchanged.

c = scale factor in X direction proportional to Y distance from origin.

d = origin translation in X direction.

e = scale factor in Y direction proportional to the multiplication X ● Y.

f = fixed scale factor in Y direction with scale X unchanged.

g = scale factor in Y direction proportional to X distance from origin.

h = origin translation in Y direction.

Finally, once calculated these 8 parameters, it is easy to use them for transforming any point from the first reference system to the second using the transformation formulas at the beginning of this section.

How to apply Rubber-Sheeting map geo-referencing The considerations in order to apply the Rubber-Sheeting transformation are exactly the same of those already exposed for Homography in the How to apply Homography map geo-referencing section on page 41. The two techniques in fact are based on the same theoretical approaches, while they differ only in the algorithm. So please read the above mentioned section for this issue.

Also the operations to perform the transformation are just the same as those for Homography, and Trilateral calculations. The process is then described in a unique example in The Trilateral transformation section starting on page 47. As for the Homography, the only difference is that Rubber-Sheeting is based on quadrilaterals, whereas the Trilateral is based on triangles.

Page 49: International Surveying Course - TopGeometri

47

The Trilateral transformation Why Homography and Rubber-Sheeting are not suitable for surveyed Cadastral maps? Although the Homography and Rubber-Sheeting transformations are robust mathematical algorithms, they are not the optimal solution for those Cadastral maps created by a real survey on the land. I’ll try to explain why I’m saying this. As we’ve seen in its section, the Homography transformation is based on the assumption that the map is a perspective projection of the terrain (Fig. 55 on page 39). This is the perfect assumption for maps generated through an aerial photogrammetric survey. But this is not the case of Cadastral maps at all because they have been created as the restitution of a typical survey on the field (theodolite) like it happened in almost all the cases considering that the majority of Cadastral maps have been surveyed many decades or even one or two centuries ago.

So the question is: stated that a Cadastral map is not a perspective projection of the terrain, is it correct to adopt the Homography transformation?

Answer: no, it is not.

On the other hand, the Rubber-Sheeting transformation described in the previous section has been studied for adapting the deformed map to a regular grid of control points. The Rubber-Sheeting scenario is the following: one point might need a big adaption, whereas another point might need a small adaption and yet another point might need no adaption at all (Fig. 58 on page 43). But in a typical Cadastral map we don’t know in advance these different adaptions for control points. The only thing that we have is a set of corresponding map-real points but we completely ignore how good the mutual position is for each of them, i.e. how much we should move a map control point to port it in its real position.

So here the question is: if the starting situation is not the one assumed by the Rubber-Sheeting algorithm, is correct to adopt this transformation?

Answer: no, it is not.

Well, it was when I came to the above conclusions that the Homography and Rubber-Sheeting algorithms were unfit for Cadastral maps that I studied a more appropriate solution: the Trilateral transformation. But even though the Homography and Rubber-Sheeting transformations are not suitable for our needs, the starting situation and the operation to perform are those already described in section How to apply Homography map geo-referencing on page 41 and here summarized:

1. First of all we survey on the land a number of control points present in the map and well materialized in the ground, after having assured their map-real correspondence.

2. We then calculate the surveyed points coordinates in the desired reference system, such as a simple local system with origin in the first station and orientation in the direction of the zero for horizontal angles.

3. We apply the Barycentric transformation in order to evaluate the deviations of each control points so that we can exclude those which residuals exceeds the desired tolerance.

4. Finally, we can apply the Trilateral transformation to the points that passed the Barycentric analysis.

Page 50: International Surveying Course - TopGeometri

48

The algorithm The Trilateral algorithm follows the same criteria as the Homography and Rubber-Sheeting transformations but is much simpler because it acts on triangles instead of quadrilateral. So, the first operation, once we have our set of corresponding map-real point coordinates, is to apply a triangulation in order to divide the area into single triangles. This is the same operation also performed in the Homography and Rubber-Sheeting techniques but in those cases the triangles are then transformed into quadrilateral by considering all couples of adjacent triangles. Obviously we don’t need such manipulation in the Trilateral solution because it directly acts on the triangles themselves. So the Trilateral algorithm considers each single triangle as here described. Fig. 61 shows the initial situation: given a triangle on the map, we want to adapt it to the corresponding triangle on the survey (reality) so that we can calculate the position in the field of a point in the map internal to that triangle (the blue in the map).

Fig. 61 – The Trilateral transformation adapt each triangle on the

map to its corresponding triangle on the survey.

How do we achieve this goal? Well, for triangle vertices the solution is straightforward: we simply need to port them from the map to the survey as shown in Fig. 62:

Fig. 62 – Triangle vertices are directly moved from the map to the survey.

Page 51: International Surveying Course - TopGeometri

49

For the internal point things are a bit more complicated, but not so much.

With reference to Fig. 62, the internal point in the map is projected from a vertex to the opposite side, thus determining the length of the two segments a, b. Then these two segments are calculated for the survey triangle (a’, b’) with a very simple proportion so that the same projection is reproduced in this triangle. Finally, this projection is conjunct with the corresponding vertex.

Fig. 63 – The internal point in the map is projected from a vertex to the opposite side, then

the two projection are calculated for the triangle in the survey by a simple proportion.

The operation just described is then repeated for the other two vertices as shown in Fig. 64.

Of course, due to map deformation, the conjunctions in the survey triangle do not intersect to a single point as in the map triangle, but they form a small internal triangle, which we can call the “deformation triangle”. In fact, the size of this internal triangle tells us how big the deformation is: the bigger the triangle is, the bigger the deformation is. Finally the map point is moved to the barycenter of the deformation triangle in the survey.

Fig. 64 – The point on the map is moved to the barycenter of the deformation triangle in the survey.

Page 52: International Surveying Course - TopGeometri

50

A practical example Having explained the algorithm, let’s see a practical example on how to perform this transformation using the software Geomap (please see note 9 at page 14 on how to obtain a free license of this software for studying purposes). So, let’s open in Geomap the raster map shown in Fig. 65 in which we have conveniently indicated the position and the names of the control points surveyed in the field.

Fig. 65 – The map to which we want apply the Trilateral transformation.

The survey has been calculated in a local reference system with origin in the first station and orientation in the direction of the zero for horizontal angles. We have then exported the survey coordinates in a XYZ text file using the common CSV format (comma separated values) containing a row for each point with the following data:

- The point name; - East coordinate; - North coordinate; - Z coordinate (even though it is not used).

Here is the content of this file for the example we are treating: 201,-198.155,182.932,0.000 202,80.649,301.037,0.000 301,122.284,-200.870,0.000 302,489.597,-186.325,0.000 501,-183.451,-453.661,0.000 502,-530.991,-635.643,0.000 701,191.803,-657.719,0.000 901,717.099,-774.974,0.000 1001,680.088,137.912,0.000

Page 53: International Surveying Course - TopGeometri

51

As I said in the first section of this chapter, before proceeding with the Trilateral transformation we need to firstly apply the Barycentric calculation in order to estimate the reliability of control points. To do so, we simply select this option in Geomap toolbar, then click the Reference point button as shown in Fig. 66:

Fig. 66 – Firstly we apply the Barycentric calculation in

order to estimate the reliability of control points.

This command allows us to click the control points in the map and assign them to the surveyed points. So let’s start from point 202. As we zoom and click on it, the coordinates windows appears, as in Fig. 67.

We can now simply type the coordinates in the E/N cells or, more easily, click on From File button and open the XYZ file shown above. In this case we can select point 202 from the combo-box on the bottom-left and the coordinates are directly inserted in the E/N cells retrieved from the file:

Fig. 67 – Control points coordinates can be easily assigned from the XYZ file of the survey.

Confirming the point by clicking OK, a blue X is inserted in the map and a row of data is added in the Reference points table containing both map and survey coordinates, as shown in Fig. 68.

Page 54: International Surveying Course - TopGeometri

52

Fig. 68 – Here is the first inserted control points with both raster and real (survey) coordinates.

We then repeat the same operations for all the control points. At the end, both the map and the Reference points table will appear with all controls points inserted, as in Fig. 69.

Fig. 69 – All the control points inserted.

Page 55: International Surveying Course - TopGeometri

53

We can now run the calculation by simply clicking the Calculate button on Geomap toolbar, thus obtaining the transformed coordinates in columns East/North georef and the residuals in columns East/North deviations, as shown in Fig. 70:

Fig. 70 – The coordinates and deviations calculated by the Barycentric transformation.

As I said, the purpose of previously calculating the Barycentric transformation is to estimate points reliability. Now we can do it by analyzing the deviations provided. In case we evaluate that a point exceeds the tolerance we fixed, we can easily exclude it from a new calculation by activating the Disable or the Remove option on the context menu that we can open with a right-click on the row of the point we want to exclude, as shown in Fig. 70. The first option simply disables that point from the calculation (the X on the Consider column is removed), whereas the second one completely deletes the point from both the map and the table. In both cases, after excluded one or more points, we need to run the calculation again.

Well, after the verification performed by the Barycentric calculation, we can finally proceed to the Trilateral transformation. All we have to do is to switch to the Trilateral option on Geomap toolbar and insert the points which we want to retrieve from the map by clicking the Transforming points button shown in Fig. 71:

Fig. 71 – The calculation proceeds with the Trilateral transformation.

This command in fact allows us to click all the map points that we want to reproduce back in the field. So, let’s start with the first of these points shown in Fig. 72. Once clicked on it, the information window appears asking the name we want to assign to the point and its type. Please see the explanation of the Control/Tracing types in the section dedicated to the Grid transformation example in Fig. 42 on page 32. In this case, the point is obviously a tracing one.

Once we confirm the point by clicking OK, a dark red X will appear on the map and a row of data is added in the Transforming points table containing the raster coordinates, as shown in 54.

Let’s then continue to insert all the remaining tracing points we need, at the end the map and the Transforming points table will appear as shown in Fig. 73.

Page 56: International Surveying Course - TopGeometri

54

Fig. 72 – The insertion of a map point that we want to reproduce back in the field.

Fig. 73 – All the tracing points inserted.

Page 57: International Surveying Course - TopGeometri

55

All we have to do now is simply run the calculation clicking the Calculate button on Trilateral toolbar, thus obtaining the transformed coordinates in columns East/North real, as shown in Fig. 74. As I said in the section dedicated to the Grid transformation, Geomap exports these coordinates in a XY text file as CSV (comma separated values) so that the user can then import them in other topographical applications.

Fig. 74 – Here is the real (survey) coordinates of the tracing points.

It is interesting to note that this transformation, differently from the Affine and Grid techniques that we’ve examined in the previous chapters of this document, provides us with “real”, not “map”, coordinates. This means that the values on columns East/North real shown in Fig. 74 are already related to the survey reference system because, as we’ve seen in the algorithm section, the Trilateral technique directly links the map to the survey throughout the triangles created on control points. This result is very useful because it greatly simplifies the rest of the job, i.e. calculating the tracing observations needed to reproduce the points back in the field. On the contrary, this is not the case of the Grid transformation which provides map coordinates instead, thus requiring a supplement of work in order to link the survey to the map via a map-survey roto-translation.

We can now finalize the job by creating the DXF drawing of the Trilateral transformation just calculated. To do so, we click on the DXF drawing option in the Export box in Trilateral toolbar. As soon as the DXF file is successfully created, you get the message reproduced in Fig. 49, from which you can directly open it in your CAD software associated to DXF files in your Windows installation.

Fig. 75 – The DXF drawing containing the transformed map is directly opened in our CAD.

Page 58: International Surveying Course - TopGeometri

56

Fig. 76 shows the DXF generated by the transformation. As we can see, the raster does not have a regular rectangular form, but follows the external border of the triangles used by the transformation.

Fig. 76 – The border of the new generates raster map follows the transformation triangles.

The raster map on the drawing is contained in a specific layer, so we can switch it off and clearly see the triangles created by the transformation, as shown in Fig. 77.

Fig. 77 – The triangles generated by the transformation.

Page 59: International Surveying Course - TopGeometri

57

In the example above we left the software the task of performing the triangulation, but Geomap provides a utility that allows the user to manually define the triangles. As I mentioned in the section dedicated to the Homography transformation in fact, the Surveyor might want to directly define the triangles on which to apply the transformation in case he/she has in advance a reasonable idea of the different map deformation of one triangle compared to the other.

This capability applies also for Homography and Rubber-Sheeting transformations in which the software allows to manually define the quadrilaterals.

Page 60: International Surveying Course - TopGeometri