In this section we briefly describe the basic terms and concepts used in the link-to-grid interface implemented in GRTOOL.
A link is considered a straight line connection between two network nodes. For each link a, the coordinates of the I-node and of the J-node are known from the network definition. A width is associated with each link. It is specified in the same units as the network coordinates and serves to define the geometric link representation, which is a centered link bar of width extending between I- and J-node. For each link a set of data values , , , ..., represents the data that is to be transformed to the grid level.
A grid is a subdivision of the network plane by equally spaced horizontal and vertical parallel lines. The distance between two neighboring parallel lines is called the grid distance. It is defined in the same units as the network coordinates. The relative position of the parallels is such that a horizontal and a vertical line always pass through the origin of the coordinate system, i.e. point (0,0). The resulting square shaped subdivisions are called grid cells. They are identified by their lower left corner coordinates.
Each link value is split proportionally to the area overlap with the corresponding grid cells. The resulting partial values are then accumulated for each grid cell. The fact that the link is represented as a two-dimensional bar, instead of a one-dimensional line segment, avoids any ambiguities that might otherwise arise when a link coincides with a cell boundary or passes through a cell corner. This is illustrated in the following figure, which shows how the data for a given link (shown in solid black) is distributed to the neighboring grid cells: Since, depending on the network size and the chosen grid distance, the link-to-grid conversion can be quite a complex task, an efficient implementation is very important. The following is an outline of the method implemented in grlink: