CulDeSac
Previous  Top  Next

Function CulDeSac(Ctype: smallint): integer;

Identifies cul-de-sac or blind alleys, which are defined like this:

Position yourself in a node and drive in one direction using link A. If you can't get back to the same node without using the same link A again, it is a cul-de-sac (type 1).

Loop links are type 2.

If you however can come back without making a U-turn, it is a bridge or isthmus in graph theory terms: If the link was missing, the network would be split into 2 components or subnets (type 3).

If all type 1, 2 and 3 links are removed, the rest of the links are separated into a number of subnets. Type 4 is now the subnets identified in the same way as function SubNet does it, that is the smallest networks are defined as subnets, while the rest is considered the main part of the network. Number of links in the subnets defines "size". But note that subnets are not defined the same way as returned in function SubNet.

0 = normal roads (the rest)
1 = cul-de-sac
2 = loops
3 = bridge
4 = subnets

Ctype=1: Type 0, 1 and 2 are identified.
Ctype=2: Type 0, 1, 2 and 3 are identified.
Ctype=3: Type 0, 1, 2, 3 and 4 are identified.

The result can be saved with ResultSaveLink or ResultGetLink.

Note that Ctype 2 and 3 take a lot more time to identify and you will have to call AttributeLoad after using this function as all information about oneway streets are reset.

Possible error codes: -10 -40 -41 -42 -43
Versions: Pro
ActiveX / VCL / CLX component: RWcalc