Function FindRoundAbout(maxlink: smallint; maxradius: single): integer;
Locates links, which are roundabouts.
By definition roundabouts:
1) Need to have at least 3 links,
2) Should form a loop,
3) All nodes in the roundabout should have a valency of 2 or 3,
4) At least 3 of the nodes should have a valency of 3.
Maxlink denotes the maximum number of links in a roundabout. Max has to be >2 and <100.
Maxradius is the maximum radius of the roundabout.
The function locates roundabouts using two methods:
First it will look for links with one-way streets. If a loop can be found, where a sequence of links all are one-way streets in the same direction, it will be considered to be a roundabout.
Next it will search for sequences of links, where various geometric properties will also have to be in order to be accepted as a roundabout.
The method isn't 100% bullet proof, so a manual inspection of the result is needed. Usually most roundabouts are located, but also some false ones.
Networks with latitude/longitude coordinates are not supported by this function, however you will not be stopped if you try.
The function returns the number of round-abouts.
The result can be saved with ResultSaveLink / ResultGetLink and is defined as this:
0: Not roundabout
1: Links belonging to first roundabout
2: Links belonging to next roundabout etc.
Use OnCalcProgress event for tracking progress.
Possible error codes: -10 -16 -30 -40 -41 -43
Versions: Pro
ActiveX / VCL / CLX component: RWcalc