This document is archived and information here might be outdated.  Recommended version.


INetworkForwardStarEx.IsForwardTraversal Property (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (GeoDatabase)  

INetworkForwardStarEx.IsForwardTraversal Property

Indicates if the NetworkForwardStar object is used to model forward traversal through the network dataset.

[Visual Basic .NET]
Public Property IsForwardTraversal As Boolean
[C#]
public bool IsForwardTraversal {get; set;}
[C++]
HRESULT get_IsForwardTraversal(
  VARIANT_BOOL* IsForwardTraversal
);
[C++]
HRESULT put_IsForwardTraversal(
  VARIANT_BOOL IsForwardTraversal
);
[C++]

Parameters IsForwardTraversal [out, retval] IsForwardTraversal is a parameter of type VARIANT_BOOL IsForwardTraversal [in] IsForwardTraversal is a parameter of type VARIANT_BOOL

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

IsForwardTraversal determines the direction of travel in QueryAdjacencies calls.  Setting IsForwardTraversal to true is called �Forward Traversal�, while setting IsForwardTraversal to false is called �Backward Traversal�. 

 

Example edges and junctions

 

In forward traversal, when including a fromEdge in the call to Query Adjacencies, you should use an edge direction that corresponds to travel from that edge into the specified atJunction.  The adjacent edges returned in the NetworkForwardStarAdjacencies object will correspond to valid traversal edges in the forward direction of travel.  This can be seen in the graphic below.  Forward traversal entails making a QueryAdjacencies call with fromEdge �A� in the along direction and atJunction �y�.  With a BacktrackPolicy of Allow, the returned edges would include edge �A� in the against direction (this could be considered a U-Turn), and edge �B� in the along direction.  In layman�s terms, traveling through junction �y� from edge �A� has two possible paths, turning around and returning along edge �A� in the opposite direction, or traveling along edge �B�.

 

Traversing in a forward direction

 

In backward traversal, if you imagine network traversal as walking a path, then you would be walking backward.   Your call to QueryAdjacencies for the atJunction �y� should use a fromEdge of B in the along direction.  This is like walking backward into junction �y� from edge �B�.  With that call, the returned adjacent edges will be �A� in the along direction and �B� in the against direction.  In layman�s terms, if you had traveled onto edge �B� from junction �y�, you could only have done so coming from edge �A� in the along direction, or edge �B� in the against direction.

 

Traversing in a backward direction

 

Generally, IsForwardTraversal should be set to true.  This makes QueryAdjacency calls and results easier to understand.   In some network analysis cases, however, using a forward traversal search out from an origin, while, at the same time, using a backward traversal search out from a destination can aid in reducing search time.

 

 

See Also

INetworkForwardStarEx Interface