com.esri.arcgis.networkanalyst
Interface INATraversalResult

All Superinterfaces:
Serializable
All Known Implementing Classes:
NATraversalResult

public interface INATraversalResult
extends Serializable

Provides access to the properties of a traversal result.

Remarks

The INATraversalResult interface provides methods for accessing the sources referenced by the traversal result. It also allows people writing custom solvers to create the schema of a traversal result.

There is a level of indirection in the NATraversalResult. Each element in the NATraversalResult represents a network feature in the source network that was traversed, a feature in an NAClass (stop), or can be unrelated to any external feature (where multiple stops are located at the same place and the edges between the stops are virtual). Due to this, you need to use the methods in INATraversalResult to determine the mapping between the traversal source and its feature class in the NetworkDataset or NAContext. There are several methods that return an NATraversalResultSource object with this information.

The Create and AddSource methods are used during the creation of an NATraversalResult to create the junction, edge, and turn feature classes that comprise the traversal result as well as to add sources that providing the mapping back to feature classes in the NetworkDataset or NAContext.

Product Availability

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


Method Summary
 void addSource(INATraversalResultSource resultSource)
          Add a network traversal source.
 void create(IFields junctionFields, IFields edgeFields, IFields simpleTurnFields, boolean hasMs)
          Makes a new traversal result.
 INATraversalResultSource esri_getSource(int index)
          The network traversal source by index.
 INATraversalResultSource getSourceByID(int sourceID)
          The network traversal source by ID.
 INATraversalResultSource getSourceByName(String name)
          The network traversal source by name.
 int getSourceCount()
          The number of network sources.
 ISpatialReference getSpatialReference()
          The spatial reference of the result.
 boolean isHasGeometry()
          Indicates if the result has geometry.
 

Method Detail

getSourceCount

int getSourceCount()
                   throws IOException,
                          AutomationException
The number of network sources.

Remarks

SourceCount returns the number of sources referenced by the traversal result.

Product Availability

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

Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_getSource

INATraversalResultSource esri_getSource(int index)
                                        throws IOException,
                                               AutomationException
The network traversal source by index.

Product Availability

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

Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.networkanalyst.INATraversalResultSource
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSourceByName

INATraversalResultSource getSourceByName(String name)
                                         throws IOException,
                                                AutomationException
The network traversal source by name.

Product Availability

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

Parameters:
name - The name (in)
Returns:
A reference to a com.esri.arcgis.networkanalyst.INATraversalResultSource
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSourceByID

INATraversalResultSource getSourceByID(int sourceID)
                                       throws IOException,
                                              AutomationException
The network traversal source by ID.

Product Availability

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

Parameters:
sourceID - The sourceID (in)
Returns:
A reference to a com.esri.arcgis.networkanalyst.INATraversalResultSource
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addSource

void addSource(INATraversalResultSource resultSource)
               throws IOException,
                      AutomationException
Add a network traversal source.

Remarks

The AddSource method is used by people writing custom solvers to add a source to the traversal result.

Product Availability

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

Parameters:
resultSource - A reference to a com.esri.arcgis.networkanalyst.INATraversalResultSource (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

create

void create(IFields junctionFields,
            IFields edgeFields,
            IFields simpleTurnFields,
            boolean hasMs)
            throws IOException,
                   AutomationException
Makes a new traversal result.

Remarks

The Create method is used by people writing custom solvers to allow them to setup the 3 feature classes of the traversal result corresponding to edges, junctions, and turns.

Product Availability

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

Parameters:
junctionFields - A reference to a com.esri.arcgis.geodatabase.IFields (in)
edgeFields - A reference to a com.esri.arcgis.geodatabase.IFields (in)
simpleTurnFields - A reference to a com.esri.arcgis.geodatabase.IFields (in)
hasMs - The hasMs (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSpatialReference

ISpatialReference getSpatialReference()
                                      throws IOException,
                                             AutomationException
The spatial reference of the result.

Remarks

SpatialReference returns the spatial reference of the traversal result. This should be the same as the network dataset and analysis layer.

Product Availability

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

Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReference
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHasGeometry

boolean isHasGeometry()
                      throws IOException,
                             AutomationException
Indicates if the result has geometry.

Remarks

The property HasGeometry returns true if the InferGeometry method has been called on the INATraversalResultEdit interface. If HasGeometry returns false, the features in the traversal result do not have a geometry yet.

Product Availability

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

Returns:
The hasGeometry
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.