Good morning,
I don’t really want to bring this up but I have been tasked to check on the status of this issue. The last time I can see a discussion about U-turns taking place was more than two years ago.
The route we are looking is fairly simple. It starts at the off-ramp off a highway and ends south of the interchange. At the end of the ramp the routing engine would make a left turn, but there is a physical barrier. After implementing turn restrictions the route now goes north on Oregon Pike but makes a U-turn the first chance it can get. This would require crossing numerous lanes and is probably not legal. We would like to see the U-turn postponed until North Point Blvd/ Eden Rd where there is a left-turn lane without a “No U Turn” where a U-turn would be safe. From time to time people do it now.
From what I recall, there is nothing built in to the extension to allow this. I don’t want to revisit this whole discussion; simply a “we still can’t do that” answer is all I need.
Thanks!
Allen

Poking again at a sore subject: u-turns
After looking at Google, I need to make a correction. At the bottom of the ramp there probably is a “no left turn” sign for obvious reasons. There is a physical divider between the north and south lanes but some vehicles could probably cross it. This is not what we call a “Jersey barrier” which is around three-feet in height, but just an elevated island. I don’t know what they’re called, but here’s a picture of the road from Google…this is about the point (right before the gas station) where the routing engine makes the U-turn, which is not a good idea. Unless you’re driving a compact vehicle with a small turning radius, I don’t think it a U-turn can be made here without backing up into four lanes of traffic or driving over the curb.
Hello Allen,
Thanks for you detailed interpretation on this question, I think it makes sense based on your description, but I guess this need a specified data to support this, we found this place following your description and do a route shown as following on Google Maps:
- but seems like it gives a
similar “T-Turn” there, I also zoom to the street View to check the road signs,
but seems that here isn’t any an obvious warning board there to show “U-Turn
allowed”. Anyway, we can support this by adding some restrictions at these
places, could you check the data you are using for route to see if there is a
restriction collection or a column to specify these places, if it exists, I
think there are 2 ways to support it, just shown as following:
1. Use the BuildingRoutingData event when re-generate the data
privatevoidRtgRoutingSource_BuildingRoadData(objectsender, BuildingRoutingDataRtgRoutingSourceEventArgs e){featureSource.Open();Feature feature = featureSource.GetFeatureById(e.LineShape.Id,newstring[] {“TurnRestrictions”});
stringturnRestrictions = feature.ColumnValues[“TurnRestrictions”];// Pass in current lineShape and get the adjacent lineShapes by feature ids from feature source, calculate turn directions.Dictionary directions = GetAdjacentDirections(e.LineShape, e.RouteSegment.StartPointAdjacentIds, featureSource);
if(turnRestrictions ==“Right”){foreach(var itemindirections.Keys){if(directions[item] == DrivingDirection.Right){e.RouteSegment.StartPointAdjacentIds.Remove(item);e.RouteSegment.EndPointAdjacentIds.Remove(item);}}}elseif(turnRestrictions ==“Left”){foreach(var itemindirections.Keys){if(directions[item] == DrivingDirection.Left){e.RouteSegment.StartPointAdjacentIds.Remove(item);e.RouteSegment.EndPointAdjacentIds.Remove(item);}}}}
2. Use the FindingRoute event when getting the route, we don’t need to re-generate the routing index if taking this way
privatevoidAlgorithm_FindingPath(objectsender, FindingRouteRoutingAlgorithmEventArgs e){featureSource.Open();Feature feature = featureSource.GetFeatureById(e.RouteSegment.FeatureId,newstring[] {“TurnRestrictions”});
stringturnRestrictions = feature.ColumnValues[“TurnRestrictions”];// Pass in current lineShape and get the adjacent lineShapes by feature ids from feature source, calculate turn directions.Dictionary directions = GetAdjacentDirections((LineShape)feature.GetShape(), e.RouteSegment.StartPointAdjacentIds, featureSource);
if(turnRestrictions ==“Right”){foreach(var itemindirections.Keys){if(directions[item] == DrivingDirection.Right){e.RouteSegment.StartPointAdjacentIds.Remove(item);e.RouteSegment.EndPointAdjacentIds.Remove(item);}}}elseif(turnRestrictions ==“Left”){foreach(var itemindirections.Keys){if(directions[item] == DrivingDirection.Left){e.RouteSegment.StartPointAdjacentIds.Remove(item);e.RouteSegment.EndPointAdjacentIds.Remove(item);}}}}
Hope it helps,
Thanks,
Johnny