-
Notifications
You must be signed in to change notification settings - Fork 0
Technical Background
During import the current folder is automatically searched for corresponding files to group files that belong together.
- When a TRA or GRA file is loaded it is searched for a file with the same name but the opposite ending TRA/GRA.
- When a TRA file is loaded it is searched for files corresponding to *R.TRA, *S.TRA and *R.TRA file schema. If a filename already exists or is used multiple times (especially station geometry - *S.TRA can be used by different .TRA files) it is only loaded once. On import following message is shown "A existing TRA-Trasse was found, existing TRA Data is overwritten" .
currently filepath is not checked on this operation! Check only depends on the filename. Be careful if a file is used multiple times but in different subsets processed (see How-To-Use#Batch-processing). If the file is transformed it would be transformed for all subsets.
Interpolation is done in 2D, or if possible in 3D. To provide 3D coordinates, a .GRA file must be set in the track-container. The spatial relation between TRA and GRA files is defined by station-values. Often these are not in the same range as TRA-files might relate to a separate station-axis (*S.TRA). If a station-axis is provided in the S.TRA field of the track-container:
- the 2D-Point interpolation points are projected to the station axis,
- the station-axis station value at the projected position is
- in the GRA-file the elevation at the station value is interpolated
- result of the GRA-file interpolation set as height parameter of the 2D-interpolation point.
There is no setting to switch between these calculations:
- if only a TRA file is set 2D interpolation is done,
- if TRA + GRA is set 3D is calculated by using TRAs station values at for GRA file interpolation.
- if TRA + GRA + S.TRA is set 3D is calculated by projecting to S.TRA, as described above.
For Transformations the external libraries https://github.com/dd-bim/egbt22trans and https://github.com/dd-bim/dbva are used and included in TRA.Tool. As only 2/3D-Coordinates can be transformed the remaining geometry parameters length, heading and radii have to be modified separately. Preserving a best-possible, valid overall geometry after transform, is one of the main functionalities of the TRA.Tool. Scale and meridian convergence as additional output of the coordinate transforms are used for adapting the geometry parameters as follows:
is applied:
- to the Length parameter as mean of Scale at elements start- & endpoint
- to r1 & r2 of a circle geometry as mean of Scale at elements start- & endpoint
- for Bloss & Klothoid r1 is multiplied by scale at element start and r2 is multiplied by scale at element end
before and after Transformation is subtracted as delta from original heading
Using the previous described approach, still include deviations between geometry elements and systematic errors.
For better results the previous modified geometry parameters are optimized by a kind of Helmert2D transform. This is enabled by default in the transform-container, but can be disabled separately for heading and length. First heading is fitted to align the current geometries end-point best with the successor elements start point by ∆T. Second length parameter is scaled by the remaining deviation ∆L. As this is done in two separate steps and the length parameter applied to the geometry changes the result again, this is done iterative (for most cases the default threshold 1E-04 is reached within the first iteration).
As result the deviations can be reduced significantly as shown in following image:
By optimizing the coordinate connection by modifying heading of each element this can lead to differences in heading between last interpolated point and successors start heading.
Apart from the actual transformation, it is important to be able to make a statement about the quality of the transformed geometry. By interpolating Points of the original geometry by using the [[How-To-Use#Interpolate]|Interpolation], these points are transformed along with the geometry. In the target coordinate system these points are projected to the new geometry and the remaining deviations can be used as quality indicator. Deviatons for each projected coordinate can be shown as arrow by enabling Show Projections in the Plot-View. The mean deviation of each geometry element is shown in a new column to the data-table of the TRA-element.
the library allows export to .TRA/GRA and .csv. Scale as result of the transform can not be saved directly to TRA as there is no corresponding field in the file-standard, for different options are available when exporting to TRA :
- Discard: The scale is ignored, the length retains its original value. This leads to coordinate differences between the geometry elements. The condition station value + L = subsequent element station value is satisfied.
- Multiply: The length is multiplied by scale. The station values of the elements are not adjusted. The condition station value + L = subsequent element station value is NOT met.
- Add KSprung: The length is multiplied by the scale. To satisfy the condition station value + L = subsequent element station value, additional KSprung elements are added where necessary (this mostly results in a TRA-File having KSprung-elements between each geometry). Also a check for Removing KSprung-elements is done after transform, especially when transformig back to a previous coordinate-system this takes effect.
On a re-transform the added KSprung-elements are removed again as far as possible. Due to computational inaccuracies some of the added KSprung elements may exceed the Technical-Background#Station-Mismatch-Tolerance by their length paramater and remain in the file.
Export to csv exports a list of all elements, properties and interpolation points.
During the processing different checks are performed to ensure valid geometry and TRA-file properties.
Due to computational inaccuracies, deviations can occur from calculations, but also errors may already be present in the input data. Errors are logged into the Log-Window in TRA.Tool but also drawn in the Plot-View if Show Warnings is enabled. Warnings are triggered if certain thresholds are exceeded. Along with the executable a settings.json
is provided, where it is possible to user-define these thresholds.
{
"StationMismatchTolerance": 1E-06,
"ConnectivityMismatchTolerance": 1E-04,
"ContinuityOfHeadingTolerance": 4.85E-6,
"ContinuityOfCurvatureTolerance": 1E-08
}
Tolerance to trigger warnings if the condition station value + L = subsequent element station value is not fullfiled.
Tolerance to trigger warnings if the euclidean distance between geometries end-point and successors-elements start-point exceeds this value. Value is calculated in meters.
Tolerance to trigger warnings if the heading at geometries end-point and successors-elements start-point exceeds this value. Value is calculated in radians. Default value corresponds to one arcsecond.
Tolerance to trigger warnings if the curvature at geometries end-point and successors-elements start-point exceeds this value. Value is calculated as 1/m.