Пример #1
0
        private async Task <RouteSegment> HandleIntersectionSplit(RouteNode routeNode)
        {
            RouteSegment intersectingRouteSegment  = null;
            var          intersectingRouteSegments = await _geoDatabase.GetIntersectingRouteSegments(routeNode);

            foreach (var individualIntersectingRouteSegment in intersectingRouteSegments)
            {
                intersectingRouteSegment = individualIntersectingRouteSegment;
                var intersectingRouteNodesCount = (await _geoDatabase.GetAllIntersectingRouteNodes(individualIntersectingRouteSegment)).Count;

                if (intersectingRouteNodesCount >= 3)
                {
                    break;
                }
            }

            return(intersectingRouteSegment);
        }