Tunnel segments

Functionality / Algorithm

The Tunnel segments operation reduces the amount of intermediate points within segments in a segment map. The segments of the input map are copied into a new segment map. However, for every three consecutive intermediate points within a segment, the middle one is omitted if it falls within a user-defined tunnel-width. Redundant nodes can also be removed.

Tunnelling:

In a segment map, each segment is stored as a begin node, an end node and usually one or more intermediate coordinates. Tunnelling (see Figure 1) constructs a tunnel around 3 points within a segment at a time. Each time, it is determined whether the middle coordinate falls inside the tunnel or not:

The tunnel has a user-defined width in meters.

  

Fig. 1: Tunnelling: The first tunnel is constructed around node 1, and intermediate coordinates 2 and 3. Intermediate coordinate 2 falls outside the tunnel and thus remains. The second tunnel is constructed around intermediate coordinates 2, 3, and 4. Intermediate coordinate 3 falls inside the tunnel and is thus omitted. Now that point 3 is omitted, the next tunnel will be constructed around intermediate coordinates 4, 5, and 6 (point 6 is not in this picture).

Note:

When you use an extremely large tunnel width, all intermediate points between begin and end nodes may be deleted. The output map may then contain only straight lines between your begin and end nodes.

Removing superfluous nodes:

Nodes form the beginning and end points of segments. Two or more segments are connected to each other when they share a node.

In the special case that only 2 segments with the same code are connected to each other by a node, this node is not necessary, as one segment going through all the points of both segments would do. With the Tunnel segment operation, you can remove these superfluous nodes; segment codes will remain the same.

Input map requirements:

No special input map requirements.

Domain and coordinate system of output map:

The output segment map uses the same domain as the input segment map.

The output segment map uses the same coordinate system and the same coordinate boundaries as the input segment map.

Tips:

See also: