Transfer Attributes
Definition of Terms
- Object type: The type of objects available in CadnaA, e.g. point source or road
- Source and Target object type: The source object type describes the object type from which attributes are to be transferred. The target object type describes the object type to which attributes are to be transferred. Source" does not necessarily mean a sound source but rather an outgoing object from which attributes are to be transferred.
- Source and Target object: Identical to “Source and Target object type", but refers to an explicit CadnaA object.
- Geometry type: Possible types are point, line or area. The type is usually related to the CadnaA object type. An exception results with the object type “auxiliary polygon”, which can be of the geometry type line (open) as well as area (closed).
- Geometrical closeness: A calculated value that reflects the relative closeness of two objects by the absolute, mean or minimum distance.
- Connecting line: Calculated auxiliary polygon(s) between two objects for determining geometrical closeness. The lines can be displayed in CadnaA as auxiliary polygons. If there are several lines, the geometrical closeness is determined by the mean value of the lengths of all connecting lines between the source and target object.
Overview
This function is used to transfer attributes between CadnaA objects that are in geometrical closeness. For each target object ("attribute receiver"), exactly one source object ("attribute transmitter") is identified that best meets the criterion of geometrical closeness. In the simplest use case, attributes are transferred from one point object to exactly one other nearest point object. Here the value of the geometrical closeness results from the 2D distance. More complex applications with arbitrarily shaped polygons can also be calculated. It is important here that the source and target object do not have to share a common ID and that the assignment is only based on the relative position.
Thus, for example, the attributes name and ID of a building can be transferred to all surrounding receivers belonging to the building with just a few clicks. The action is always performed for all objects of the selected object types (in this case building and receiver) in the project area. Furthermore it is possible to bundle properties of two building data sets (e.g. one from a land surveying office and one from OpenStreetMap) in one set. The application can be used with all CadnaA object types, which allows the individual application to different problems.
The input dialog of the function is shown below:

Figure 1: "Transfer attributes..." input dialog
Checking for geometrical closeness
The calculation of the geometrical closeness of two objects depends on the geometry types (point, line or area) of the selected object types. In CadnaA the geometry type is fixed for each object type, e.g. receiver = point, road = line and building = area. If attributes are to be transferred from a road to a building, the source object is of the geometry type line and the target object is of the geometry type area. The following table shows the possible combinations of geometry types. The description of the individual fields A1-E5 as well as the options "Center of gravity", "Polyline" and "Nearest point" follows.

Table 1: Calculation of the geometrical closeness for point, line and area objects taking into account the settings "Center of gravity", "Polyline" or "Nearest point"
Notes on Table 1
The source object is black and the target object is blue. The lines calculated to determine the geometrical closeness are red.
*1) Line and area objects with the setting "Center of gravity" are only considered by the geometric center of gravity and therefore analogous to a point object.
*2) It is not possible to select the setting "Polyline" for both the source and target object type.
Table 1, A1: The simplest case is the calculation of two point objects, e.g. a point source and a receiver. The value of the geometrical closeness is calculated by the 2D distance of the two points (red line). If attributes are to be transferred from a point source to a receiver, the distance to each point source is calculated for each receiver. The point source which is closest to the a receiver best meets the condition of geometrical closeness and is thus recognized as the source object.
Table 1, A1, C1, E1: If, for example, the receiver is replaced by a building, there are several possibilities for considering the geometry of the area object:
- Table 1, A1 shows the calculation from a point to an area object, whereby the area is only taken into account by the geometric center of gravity. The calculation of the geometrical closeness is therefore analogous to the previous example "point-point" and shows the 2D distance as result.
- Table 1, C1 shows the calculation considering the area as a polyline. Here the calculation “point-point” is executed for each of the 4 geometry points of the area object as well as for 2 additionally created points. The mean value is then calculated from the lengths of the red lines. The result is an average distance between the point source and the building.
- Table 1, E1 shows the calculation considering the area with the setting "Nearest point". Starting from the point object, only the shortest possible distance to the polygon will be searched for. This does not necessarily have to be represented by a polygon point (corner) of the area object and can also lie on a line. The result for the geometrical closeness is thus the smallest distance between the objects.
Table 1, E3: The settings "Polyline" and "Next point" can also be combined depending on the selected object types and the corresponding geometry types (line or area). In this example, the source object is an auxiliary polygon (represented with setting "Polyline") and the target object is a building (represented with the setting "Nearest point"). From the 4 geometry points of the auxiliary polygon and additionally created intermediate points, the nearest point of the building is searched for each point. The mean value is then calculated from the lengths of the red lines.
Detailed explanation of the input dialog
Selection of Source and Target object types ①
The selection from which object type (source object type) and to which object type (target object type) attributes are to be transferred can be made. All object types available in CadnaA are selectable, but the source and target object types must not be identical.
Consideration of the geometry of each object type ②
For the source and target object types, it is possible to select how the geometry of the objects is taken into account when calculating the geometrical closeness. The following options are available:
- Center of gravity
- Polyline
- Nearest Point
The following figures describe the 3 options available and show the geometry points entered in the CadnaA objects as black filled squares and the resulting points for calculating the geometrical closeness as red circles.
Setting „Center of gravity“
For objects of the geometry type line or area, the setting "center of gravity" leads to a consideration of the geometry by the geometric center of gravity. The CadnaA attributes PO_CENTERX and PO_CENTERY are used. Point objects are always considered with the 2D x/y coordinate.

Figure 2: Consideration of the geometry of line and area objects with the setting “Center of Gravity“
Setting „Polyline“
The geometry of the object is considered on the basis of points with same distance. All points present in the geometry dialog of the object are used in the calculation. In addition, intermediate points may be added if two geometry points have a distance greater than the length entered at "Maximum raster length for polyline" (see also Fig. 1 ④). The number of intermediate points is determined by the length, so that the individual intermediate segments then fall below the value of the maximum raster length. The geometry table entered in CadnaA is never changed.

Figure 3: Consideration of the geometry of line and area objects with the setting “Polyline”
Setting „Nearest Point“
Table 1, E1-E3: Starting from an object, which is considered with the setting center of gravity or polyline, a calculation of the shortest distance per point takes place. For the setting “Center of gravity” only one line (Table 1, E1) will be calculated. For the setting Polyline, there are several lines whose lengths are then used to calculate the mean value. This results in an averaged value of the minimum distances per polygon point.
Table 1, D4-E6: If the setting "Nearest point" is selected for both objects, the shortest connecting line between the objects is calculated.
Preview of the geometry settings selected ③
The figure corresponds to the individual fields of Table 1. These are rotated by 90° clockwise so that the context is better visible in the dialog (source object above, target object below).
Maximum raster length for setting “Polyline” ④
See ②, section Polyline.
Threshold value and mean distance ⑤
Attributes are only transferred if the value of the geometrical closeness falls below a certain threshold value. Two options are available for calculating the geometrical closeness and for specifying the threshold value:
- Mean distance
- Mean squared distance
With the default setting "Mean distance", the lengths of the connecting lines (Tab. 1, Fig. 4 and 5, red lines) are summed up and averaged to calculate the geometrical closeness. If this value is below the specified threshold value, the attributes are transferred. The threshold value thus describes the mean distance between the objects.
With the setting "Mean quadratic distance" the mean value is calculated on the basis of the quadratic lengths of the connecting lines. In addition to the necessary specification of a quadratically higher threshold value, a stronger weighting of outliers takes place. The threshold value thus describes an average square distance between the objects.
Example: Two lines (length = 80 m) are in parallel position at a distance of 5 m. The source object (displayed in black) is considered with the setting Polyline and the target object (displayed in blue) with the setting "Nearest point". The mean distance is 5 m and the mean squared distance is 25 m.

Figure 4: Mean distance and mean squared distance of parallel lines (without outliers)
In a second variant, the length of the source object is extended by 40 m. The longer connecting lines on the right side serve in this example as outliers compared to the otherwise existing connecting lines with a length of 5m. This increases the mean distance to 12.3 m, which corresponds to an increase of approx. 2.5 times compared to figure 4. Due to the stronger weighting of outliers when using the mean squared distance, the value increases by factor 12.5 to 310.8. Depending on the situation, selecting the setting "mean squared distance" can lead to a better assignment, see also example 3 at the end of this document.

Figure 5: Mean distance and mean squared distance of parallel lines (with outliers)
When executing the function "Transfer attributes...", a memo variable "match" is assigned to each object of the target object type, which contains the value "true" if the assignment was successful, otherwise "false". This allows to easily identify unassigned objects and edit them manually afterwards.
Transform Attributes ⑥
In this text field, user-defined attribute assignments can be defined. These take place with the structure "ID=BEZ", whereby the first specification is assigned to the target object and the second to the source object. The above example can be translated as: "The name (BEZ) of the source object is to be assigned to the ID of the target object". It is also possible to specify memo variables, e.g. with "ID=MEMO_name". An assignment can be defined for each line. Lines that do not correspond to the above format are ignored. The number of assignments is not limited.
Transfer all memovariables ⑦
If this option is activated, all available memo variables of the source object are transferred to the target object after a successful assignment of two objects. Exceptions to this are the memo variables "num", "tiles", " mid_dist", " mid_sq_dist", " num_mid_dist", " num_mid_sq_dist", " match" and "tile_type", which are created during the use of the function "Transfer attributes".
Draw and Delete ⑧
With the option “Draw” the connecting lines between assigned objects can be drawn. Each drawn connecting line contains the ID "DIST_" and the length of the auxiliary polygon rounded to the nearest centimeter. If no source object with geometrical closeness smaller than the threshold value is found according to the settings, the lines are not displayed. When recalculating, all connecting lines with the ID "DIST_*" are deleted. This deleting process can also be carried out manually using the “Delete” button.
Examples
As a simple practical example between two point objects, the following action can be performed:
"Search for the nearest building (considered by center of gravity) for each building evaluation. If the distance is less than 5 m, transfer the name of the building to the name of the building evaluation."
Since the function is always applied to all objects of the selected object types, attributes can be transferred from the source object type to the target object type with just a few clicks. The following application examples are possible for different combinations of geometry types:
| Target object | ||||
| Point object | Line object | Area object | ||
| Source object | Point object, e.g. point source, receiver, building evaluation, height point, … | Transfer ID from building evaluation to surrounding receivers | Transfer the text of labels as height value to contour line *) | Transfer the name of the nearest point source to the building |
| Line object, e.g. line source, road, railway, barrier, auxiliary polygon, ... | Transfer the name of roads to adjacent receivers/building evaluations | Merging street data from different data sources *) | Transfer name of streets to adjacent buildings *) | |
| Area object, e.g. area source, area of designated land use, building, parking lot, calculation area | Transfer attributes from building to adjacent receivers | - | Merging building data from different data sources (e.g. land surveying office and OSM) | |
*) detailed description in the following examples 1-3
Table 2: Use cases for various combinations of point, line and area objects
Example 1
Situation: The CadnaA model contains a road network as well as the adjacent buildings. The individual streets contain the street name as attribute BEZ.
Target: Every building, which is less than 50 m away from the nearest street, should get the street name as memo variable "str".

Figure 6: Settings and Result, Example 1
Explanation & Notes:
- The setting “Center of gravity” for the object type building defines the geometric center of gravity. Starting from this point, the shortest distance to a street is searched for. If the distance is less than 50 m, the attributes are transferred.
- The setting “Center of gravity” for the object type building could alternatively be changed to "Next point". Here, instead of the center of gravity, the shortest connection between the building perimeter and the nearest street would be calculated. The result would be very similar to the selection "Center of Gravity - Nearest Point".
- At intersections an incorrect allocation of the buildings is possible, since the geometrically nearest street does not necessarily represent the street assigned as the address. This can be seen in figure 6, especially for garages. (see blue markings)
- An incorrect assignment is also possible on backward buildings (see green markings in figure 6).
Example 2
Situation: A CadnaA model contains contour lines. The information of the attribute HA (height) is not included, but there are text fields with the corresponding information. These are located in immediate closeness to the imported lines.
Target: The information of the text fields is to be transferred as attribute HA to the nearest contour line, if the distance is less than 1m.

Figure 7: Settings and Result, Example 2
Explanation & Notes:
- Text fields are also interpreted as point objects and always considered by the center of gravity. With the setting "Nearest point" for the object type contour line, the nearest text field is searched for and the height is transferred if the distance is less than 1 m.
- Due to the immediate closeness between the text field and the contour line, the connecting lines are only visible at a high zoom level.
Example 3
Situation: A CadnaA model contains two sets of road data: The first set reflects the road axes of a city with high accuracy, but does not contain traffic information. The second set contains the traffic data, but cannot be used directly due to inaccurate geometries. As an example, see blue marking below.
Target: The traffic load of the "rough" road network (imported as auxiliary polygons) has to be transferred to the DTV value of the geometrical "exact" road network (imported as roads).

Figure 8: Settings and Result, Example 3
Explanation & Notes:
- The geometry of the road object type is taken into account with the setting “Polyline”. The setting "Nearest point" is selected for the auxiliary polygon.
- The shortest distance to an auxiliary polygon is determined from each individual point. If the mean squared distance of the nearest auxiliary polygon is less than 400 m, the memo variable BEL is assigned to the DTV attribute of the road.
- The threshold value of 400 m for the mean squared distance was empirically determined for the given situation.