Usage guideTable of ContentsUsage guide – Coordinate transformationsGeneralThe Web site is divided into two parts. On the left side are the input properties and on the right side the output properties. At first you have to select in both of these a correct coordinate reference system. After that you can type the input coordinates into the text fields or tell to the application how your input file looks like. Additionally, while transforming coordinates to a file you need to specify how you would like the output file to look. The actual transformation is carried on by pressing "Transform". Selection of the coordinate reference systemYou need to select a coordinate reference system for your input coordinates and the output coordinates. The selection is performed in the following order for both the input and output:
The dimensions of the input and output coordinate reference systems have to be same. In case of real 3D coordinate reference systems you can transform the coordinates to a 2D+1D coordinate reference system (plane+height) and vice versa. Allowed height systems include the N60, N2000 and ellipsoidal height (GRS80). After selecting the coordinate reference system you can type the input coordinates into the text fields or define how the input file looks like.
Figure 1. In the picture the user has selected as the input
coordinate reference system the ykj and as target coordinate reference system
the 3-dimensional EUREF-FIN. The transformation is possible as the input
includes a height system (N60).
Single coordinatesThe linear unit of single input coordinates is always meter and angular unit is degrees. The desimal delimiter can be a dot or comma, but thousands are not allowed to be marked using white space or commas. The maximum amount to transform single coordinates is ten. The decimal precision is always 0.1 cm. Degrees are rounded to correspond to the same accuracy by using 9 decimals. While typing the coordinates you need to acknowledge that you type the coordinates in a correct order. The order differs in different coordinate reference systems. The ordering is given above the text fields.
Figure 2. In the figure the user has typed in 10 single coordinates
after which he has pressed the "Transform"-button.
Coordinate filesThe input coordinates can be given and/or the output coordinates returned in an ASCII-file. The maximum size of the input files is set as 5MB (about 50000 lines of coordinates). Angle pattern and unitYou can select from the input and output properties in which units and with which pattern angles are given or returned. The service support degrees, radians and grades (gons). As the linear unit is always meter as other units are rare in Finland. Angle patterns include floating number formats and some sexagesimal formats of degree:
Number of header linesYou can define how many lines long the header of the input file is. This is performed by typing the amount into the Header line count text field. The application dos not use these lines. Decimal and column delimitersThe coordinate values, point identifiers and all following data has to be separated using white space (space and tabulators) and/or commas. These are called column delimiters. The column delimiter of the input file is automatically determined, but you need to define the delimiter for the output files. For the input you need to define what the decimal delimiter is so that the application does not mix the column delimiter with the decimal separator. While using a comma to separate decimals, you can not use the comma to separate columns. Identifiers of coordinatesYou need to let the application know about existing identifiers by selecting "Use ID infront". You can specify if the input file include identifiers for the points. The identifiers have to be as first in each row separated from the coordinate values with a column delimiter. An identifier can be a name or number. Identifiers are not allowed to contain spaces, tabulators or commas. When "Use ID infront" is selected in the output properties, the application writes in front of each coordinate an identifier. The identifier is the same as in the input, however, if you defined the file to include identifiers, but some identifier are missing, then these are replaced by "N/A". If you did not include identifiers in the input then the new identifiers are integers beginning from zero. Coordinates reversedThe order of coordinates, ie. coordinate axes, is the same as in case of single coordinates. The ordering can be also found from the coordinate reference system desciption. You can specify a reversed ordering for the two first coordinate values by selecting Coordinates reversed. The property can be used for both input and output. Decimal precisionYou can decide how many decimals you want to have in an output file. The decimal coutn does not influence the calculation accuracy. The selection choices are given in meters. In case the coordinate values are angular units, the application uses decimal counts corresponding to the decimal precision in meters:
Line delimitersEach single point has to be on a single row in the input file. The line delimiter depends on your OS. In the input are accepted all common line delimiters automatically, but for the output you have to define in which OS the data will be used. The input file can include additional information concerning the points. This information must be given after the point's coordinate values. Use the column delimiter to separate such data. The additional input data can be written to the output by selecting Line ends to output. Cardinal diractionsYou can select if you want to include the cardinal direction of the coordinate value directly after each value. The directions are marked using the letters N, S, W and E. Usage guide – Triangular transformationsGeneralA trianglewise or triangular transformation is a transformation, which uses a triangulated (irregular) network. A triangular affine transformation is required, for instance, for the accurate transformation of coordinates between the kkj and EUREF-FIN coordinate reference systems. In addition, a triangular transformation is used between the N60 and N2000 as well as the N43 and N60 height systems. In case of the projected coordinate reference systems each triangle has its own affine transformation parameters. Thus, the transformation is linear inside each triangle and continuous over triangle edges (, but not differentiable). In case of height transformations each triangle vertex contains the transformation parameters. The transformations are similar in the sense that you are required to first find the triangle defining the transformation parameters. Finding the point containing triangleThis chapter presents two different methods for finding out if a triangle contains the point for which the transformation parameters are wanted. However, as such the methods are not efficient, but naiive, because you have to go through each triangle of the triangulated network. The search can be enhanced by applying spatial indexing, which reduces the size of the search space. Many spatial indexing methods exist, such as the R-tree, kd-tree, quadtree and the derivatives of these. However, the spatial indexing methods are not introduced in this text. Cross product methodIn the cross product method the coefficients k are used to determine if a point P lies inside a triangle. The triangle is composed from the vertices A, B and C.
If all coefficients (alpha, beta and lambda) are equally signed, then the point lies inside the triangle. If one of the coefficients is zero, then the point is located on one of the triangle edges, thereby, the triangle is also found. In each other case the point lies outside the triangle. BackgroundThis chapter goes through the steps behind the method. First all vectors (PA, PB and PC) between the point P and each triangle vertex (A, B and C) are calculated.
Next the cross products (PA x PB, PB x PC and PC x PA) between all the vectors are calculated.
The same formula expressed using determinants
The coefficients k indicate if the point lies inside the triangle
Example 1The coordinates of the point P and the triangle vertices shall be the following
Calculation of the cross product coefficients k
The point lies outside the triangle, because the coefficients have divergent signs. Example 2The co-ordinates of the point P and the triangle vertices shall be the following
Calculation of the cross product coefficients k
The point is inside the triangle, because all coefficient signs are equal. Barycentric coordinatesFirst we calculate four (or three) help variables
One of the four help variables can be left uncalculated, if the result does not need to be verified. Next the barycentric coordinates are calculated using the help variables
One of the four coordinates can be calculated using two other coordinates, thus, only three help variables are required
The point lies inside the triangle if all the barycentric coordinates are in the interval 0..1. The point is located on the triangle edge if one of the coordinates is zero. If two of the coordinates are zeros (and one is 1), then the point is located on one of the triangle vertices. BackgroundThis chapter goes through the steps behind the method. The barycentric coordinates define the weight of a point (lambda) in terms of the vertices of a simplex. For instance, a 2-dimensional triangle is a simplex (2-simplex) and in the following we only concentrate on the triangle. After normalisation of the barysentric coordinates their sum becomes 1, at which point
If the point lies in the centre of the triangle all barycentric coordinates are 1/3. The barycentric coordinates also show us which proportion of the area of the triangle that is distributed to the sub triangles formed when the point P is connected to the triangle vertices. Thus, if the normalisation is performed using the area of the simplex, the coordinates are called homogeneous barycentric coordinates. In case of the triangle the coordinates are also known as area coordinates. You should be able to recognise from Figure 4 that the area of tA is the largest. Similarly, the weight of the vertex A is the highest. At the same time the weights of the vertices B and C, as the areas of tB and tC, are equal.
There are different methods for calculating the barycentric coordinates. Here we present a method that makes use of determinants
Next the barycentric coordinates are solved with the determinants
Example 1The co-ordinates of the point P and the triangle vertices shall be the following
First calculate the determinants
Next calculate the barycentric coordinates
The point is outside the triangle, because lambdaB is higher than 1 and lambdaC lower than 0. Finally we can verify that the calculation was made correctly by summing all the barycentric coordinates
Example 2The co-ordinates of the point P and the triangle vertices shall be the following
First calculate the determinants
Next calculate the barycentric coordinates
The point is inside the triangle, because all the barycentric coordinates
are in the interval 0..1. Finally we can verify that the
calculation was made correctly by summing all the barycentric coordinates
|
Figure 1. In the picture the user has selected as the input
coordinate reference system the ykj and as target coordinate reference system
the 3-dimensional EUREF-FIN. The transformation is possible as the input
includes a height system (N60).
Figure 2. In the figure the user has typed in 10 single coordinates
after which he has pressed the "Transform"-button.