com.esri.arcgis.networkanalyst
Class NATraversalResult

java.lang.Object
  extended by com.esri.arcgis.networkanalyst.NATraversalResult
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, INAResult, INAResult2, INATraversalResult, INATraversalResultEdit, INATraversalResultEdit2, INATraversalResultQuery, INATraversalResultQuery2, IPersist, IPersistStream, Externalizable, Serializable

public class NATraversalResult
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, INAResult, INAResult2, INATraversalResult, INATraversalResultEdit, INATraversalResultEdit2, INATraversalResultQuery, INATraversalResultQuery2, IPersistStream, Externalizable

Contains the result of a network analysis.

Remarks

The NATraversalResult object holds the results of the network analysis. It can be retrieved from the NAContext using the INAContext::Result property.

The NATraversalResult is created by most of the solvers as part of the output for network analysis. However, this is not the case for the ODCostMatrixSolver or VRPSolver, which do not output an NATraversalResult.

The contents of an NATraversalResult are not saved with the NALayer. If a map document holding an NALayer is opened, things that need the NATraversalResult contents to work (like the NAStreetDirectionsAgent) will fail until the analysis is re-solved and a traversal result is populated.

The NATraversalResult holds 3 feature classes representing the traversed junctions, edges, and turns. Methods on this object can query these feature classes and map features back to source features in the network dataset.

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 or a feature in an NAClass (stop), or it 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.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
NATraversalResult()
          Constructs a NATraversalResult using ArcGIS Engine.
NATraversalResult(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
NATraversalResult theNATraversalResult = (NATraversalResult) obj;
 
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.
 void create(String name, INAContextHelper nAContextHelper, boolean isScratch)
          Set up for a new analysis.
 int createEdge(int sourceID, int sourceOID, double fromPosition, double toPosition, int fromJunctionID, int toJunctionID, IPolyline polyline)
          Make a new edge in the result.
 int createEdgeEx(int sourceID, int sourceOID, int eID, double fromPosition, double toPosition, int fromJunctionID, int toJunctionID, IPolyline polyline)
          Make a new edge in the result.
 int createJunction(int sourceID, int sourceOID, IPoint point)
          Make a new junction in the result.
 int createJunctionEx(int sourceID, int sourceOID, int eID, IPoint point)
          Make a new junction in the result.
 int createSimpleTurn(int sourceID, int sourceOID, int fromEdgeID, int toEdgeID)
          Make a new two edge turn in the result.
 int createSimpleTurnEx(int sourceID, int sourceOID, int eID, int fromEdgeID, int toEdgeID)
          Make a new two edge turn in the result.
 void emptyAll()
          Clear out all existing rows from any previous analysis.
 boolean equals(Object o)
          Compare this object with another
 INATraversalResultSource esri_getSource(int index)
          The network traversal source by index.
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 String getEIDFieldName()
          The EID field name
 String getElementIDFieldName()
          The element ID field name.
 IFeatureClass getFeatureClass(int networkElementType)
          The feature class by element type.
 String getFromEdgeIDFieldName()
          The from edge ID field name.
 String getFromJunctionIDFieldName()
          The from junction ID field name.
 String getFromPositionFieldName()
          The from position field name.
 INAContext getNAContext()
          The context for the result.
 String getName()
          The name of the result.
 IPropertySet getOutputProperties()
          The properties of the output.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 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.
 String getSourceIDFieldName()
          The source ID field name.
 String getSourceOIDFieldName()
          The source OID field name.
 ISpatialReference getSpatialReference()
          The spatial reference of the result.
 String getToEdgeIDFieldName()
          The to edge ID field name.
 String getToJunctionIDFieldName()
          The to junction ID field name.
 String getToPositionFieldName()
          The to position field name.
 int hashCode()
          the hashcode for this object
 void inferGeometry(String sourceName, IEnvelope envelope, ITrackCancel trackCancel)
          Constructs the geometry for the result.
 void initialize(String name, INAContext nAContext, boolean isScratch)
          Set up for a new analysis.
 void initializeEx(INAContextHelper nAContextHelper)
          Provides the result object with a reference to the context.
 void isDirty()
          isDirty
 boolean isHasGeometry()
          Indicates if the result has geometry.
 boolean isHasValidResult()
          Indicates if the current result is valid.
 void load(IStream pstm)
          load
 void readExternal(ObjectInput in)
           
 void save(IStream pstm, int fClearDirty)
          save
 IFeatureCursor searchConnected(INATraversalResultElement element, int searchedElementType, int searchedDirection, boolean recycle)
          Returns a connected set of elements in the result.
 void setHasValidResult(boolean pFlag)
          Indicates if the current result is valid.
 void startEditing()
          Starts editing the result..
 void stopEditing()
          Stops editing the result.
 void writeEdgeBuffer(IFeatureBuffer featureBuffer, int sourceID, int sourceOID, double fromPosition, double toPosition, int fromJunctionID, int toJunctionID, IPolyline polyline)
          Make a new edge in the result from the feature buffer.
 void writeEdgeBufferEx(IFeatureBuffer featureBuffer, int sourceID, int sourceOID, int eID, double fromPosition, double toPosition, int fromJunctionID, int toJunctionID, IPolyline polyline)
          Make a new edge in the result from the feature buffer.
 void writeExternal(ObjectOutput out)
           
 void writeJunctionBuffer(IFeatureBuffer featureBuffer, int sourceID, int sourceOID, IPoint point)
          Make a new junction in the result from the feature buffer.
 void writeJunctionBufferEx(IFeatureBuffer featureBuffer, int sourceID, int sourceOID, int eID, IPoint point)
          Make a new junction in the result from the feature buffer.
 void writeSimpleTurnBuffer(IFeatureBuffer featureBuffer, int sourceID, int sourceOID, int fromEdgeID, int toEdgeID)
          Make a new two part turn in the result from the feature buffer.
 void writeSimpleTurnBufferEx(IFeatureBuffer featureBuffer, int sourceID, int sourceOID, int eID, int fromEdgeID, int toEdgeID)
          Make a new two part turn in the result from the feature buffer.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

NATraversalResult

public NATraversalResult()
                  throws IOException,
                         UnknownHostException
Constructs a NATraversalResult using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

NATraversalResult

public NATraversalResult(Object obj)
                  throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
NATraversalResult theNATraversalResult = (NATraversalResult) obj;

Construct a NATraversalResult using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to NATraversalResult.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

initialize

public void initialize(String name,
                       INAContext nAContext,
                       boolean isScratch)
                throws IOException,
                       AutomationException
Set up for a new analysis.

Remarks

This method has been deprecated and should not be used. Instead, use INAResult2.Create to initialize a result object after creating it.

Product Availability

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

Specified by:
initialize in interface INAResult
Parameters:
name - The name (in)
nAContext - A reference to a com.esri.arcgis.networkanalyst.INAContext (in)
isScratch - The isScratch (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOutputProperties

public IPropertySet getOutputProperties()
                                 throws IOException,
                                        AutomationException
The properties of the output.

Remarks

The OutputProperties property returns a PropertySet that may contain information about the results of the network analysis.

The contents of the property set is up to the individual solver. For the solvers that ESRI has released, HasGapsInEdgeCumulativeImpedances returns True if there are impedance values on the junction elements that were traversed. This is important because measures are not generated on the resulting polyline feature class (Route, CFLines, SALines) in this case.

Closest Facility:

HasGapsInEdgeCumulativeImpedances True/False

Route:

HasGapsInEdgeCumulativeImpedances True/False

Service Area:

HasGapsInEdgeCumulativeImpedances True/False
TravelDirection TRAVEL_FROM/TRAVEL_TO

Origin Destination Cost Matrix:

** No TraversalResult generated

Product Availability

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

Specified by:
getOutputProperties in interface INAResult
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHasValidResult

public boolean isHasValidResult()
                         throws IOException,
                                AutomationException
Indicates if the current result is valid.

Remarks

The HasValidResult property denotes if network analysis has been performed and the result object has been populated with valid information.

Product Availability

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

Specified by:
isHasValidResult in interface INAResult
Returns:
The pFlag
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setHasValidResult

public void setHasValidResult(boolean pFlag)
                       throws IOException,
                              AutomationException
Indicates if the current result is valid.

Remarks

The HasValidResult property denotes if network analysis has been performed and the result object has been populated with valid information.

Product Availability

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

Specified by:
setHasValidResult in interface INAResult
Parameters:
pFlag - The pFlag (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

emptyAll

public void emptyAll()
              throws IOException,
                     AutomationException
Clear out all existing rows from any previous analysis.

Remarks

Clears the traversal result.

Product Availability

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

Specified by:
emptyAll in interface INAResult
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

public String getName()
               throws IOException,
                      AutomationException
The name of the result.

Remarks

The Name property returns the name of the traversal result that was set during the call to Create.

Product Availability

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

Specified by:
getName in interface INAResult
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNAContext

public INAContext getNAContext()
                        throws IOException,
                               AutomationException
The context for the result.

Remarks

The NAContext returns the context that this traversal result was based upon.

Product Availability

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

Specified by:
getNAContext in interface INAResult
Returns:
A reference to a com.esri.arcgis.networkanalyst.INAContext
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

create

public void create(String name,
                   INAContextHelper nAContextHelper,
                   boolean isScratch)
            throws IOException,
                   AutomationException
Set up for a new analysis.

Remarks

The method Create is called by the solver when it creates a new result object.

The isScratch parameter specifies if the result feature classes should be kept in memory (false) or saved on disk (true).

The NAContextHelper object passed in is used to get back to the NAContext. You can maintain a strong reference to the NAContextHelper object within your custom result object, but do not hold onto a strong reference to the NAContext itself as this will create a circular reference.

This method should be called instead of INAResult.Initialize.

Product Availability

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

Specified by:
create in interface INAResult2
Parameters:
name - The name (in)
nAContextHelper - A reference to a com.esri.arcgis.networkanalyst.INAContextHelper (in)
isScratch - The isScratch (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initializeEx

public void initializeEx(INAContextHelper nAContextHelper)
                  throws IOException,
                         AutomationException
Provides the result object with a reference to the context.

Remarks

The InitializeEx method is called after the result object has been deserialized as part of the NAContext being loaded. It is called to pass to the result object a backpointer reference to the NAContext that it's bound to.

The NAContextHelper object passed in is used to get back to the NAContext. You can maintain a strong reference to the NAContextHelper object within your custom result object, but do not hold onto a strong reference to the NAContext itself as this will create a circular reference.

Product Availability

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

Specified by:
initializeEx in interface INAResult2
Parameters:
nAContextHelper - A reference to a com.esri.arcgis.networkanalyst.INAContextHelper (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSourceCount

public 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.

Specified by:
getSourceCount in interface INATraversalResult
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_getSource

public 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.

Specified by:
esri_getSource in interface INATraversalResult
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

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

Product Availability

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

Specified by:
getSourceByName in interface INATraversalResult
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

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

Product Availability

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

Specified by:
getSourceByID in interface INATraversalResult
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

public 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.

Specified by:
addSource in interface INATraversalResult
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

public 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.

Specified by:
create in interface INATraversalResult
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

public 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.

Specified by:
getSpatialReference in interface INATraversalResult
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

public 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.

Specified by:
isHasGeometry in interface INATraversalResult
Returns:
The hasGeometry
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startEditing

public void startEditing()
                  throws IOException,
                         AutomationException
Starts editing the result..

Remarks

The method StartEditing puts the traversal result in a state to quickly add NATraversalResultElements to the underlying feature classes.

Product Availability

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

Specified by:
startEditing in interface INATraversalResultEdit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

stopEditing

public void stopEditing()
                 throws IOException,
                        AutomationException
Stops editing the result.

Remarks

The method StopEditing should be called when the solver is done adding NATraversalResultElements to the traversal result's underlying feature classes.

Product Availability

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

Specified by:
stopEditing in interface INATraversalResultEdit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

inferGeometry

public void inferGeometry(String sourceName,
                          IEnvelope envelope,
                          ITrackCancel trackCancel)
                   throws IOException,
                          AutomationException
Constructs the geometry for the result.

Remarks

The InferGeometry method takes a source name (or an empty string which equates to all sources) as input and computes the geometry for each NATraversalResultElement based on its corresponding features in the NetworkDataset and NAContext.

Product Availability

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

Specified by:
inferGeometry in interface INATraversalResultEdit
Parameters:
sourceName - The sourceName (in)
envelope - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
trackCancel - A reference to a com.esri.arcgis.system.ITrackCancel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createJunction

public int createJunction(int sourceID,
                          int sourceOID,
                          IPoint point)
                   throws IOException,
                          AutomationException
Make a new junction in the result.

Remarks

CreateJunction has been superseded by INATraversalResultEdit2.CreateJunctionEx.

Product Availability

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

Specified by:
createJunction in interface INATraversalResultEdit
Parameters:
sourceID - The sourceID (in)
sourceOID - The sourceOID (in)
point - A reference to a com.esri.arcgis.geometry.IPoint (in)
Returns:
The elementID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createEdge

public int createEdge(int sourceID,
                      int sourceOID,
                      double fromPosition,
                      double toPosition,
                      int fromJunctionID,
                      int toJunctionID,
                      IPolyline polyline)
               throws IOException,
                      AutomationException
Make a new edge in the result.

Remarks

CreateEdge has been superseded by INATraversalResultEdit2.CreateEdgeEx.

Product Availability

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

Specified by:
createEdge in interface INATraversalResultEdit
Parameters:
sourceID - The sourceID (in)
sourceOID - The sourceOID (in)
fromPosition - The fromPosition (in)
toPosition - The toPosition (in)
fromJunctionID - The fromJunctionID (in)
toJunctionID - The toJunctionID (in)
polyline - A reference to a com.esri.arcgis.geometry.IPolyline (in)
Returns:
The elementID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createSimpleTurn

public int createSimpleTurn(int sourceID,
                            int sourceOID,
                            int fromEdgeID,
                            int toEdgeID)
                     throws IOException,
                            AutomationException
Make a new two edge turn in the result.

Remarks

CreateSimpleTurn has been superseded by INATraversalResultEdit2.CreateSimpleTurnEx.

Product Availability

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

Specified by:
createSimpleTurn in interface INATraversalResultEdit
Parameters:
sourceID - The sourceID (in)
sourceOID - The sourceOID (in)
fromEdgeID - The fromEdgeID (in)
toEdgeID - The toEdgeID (in)
Returns:
The elementID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeJunctionBuffer

public void writeJunctionBuffer(IFeatureBuffer featureBuffer,
                                int sourceID,
                                int sourceOID,
                                IPoint point)
                         throws IOException,
                                AutomationException
Make a new junction in the result from the feature buffer.

Remarks

WriteJunctionBuffer has been superseded by INATraversalResultEdit2.WriteJunctionBufferEx.

Product Availability

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

Specified by:
writeJunctionBuffer in interface INATraversalResultEdit
Parameters:
featureBuffer - A reference to a com.esri.arcgis.geodatabase.IFeatureBuffer (in)
sourceID - The sourceID (in)
sourceOID - The sourceOID (in)
point - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeEdgeBuffer

public void writeEdgeBuffer(IFeatureBuffer featureBuffer,
                            int sourceID,
                            int sourceOID,
                            double fromPosition,
                            double toPosition,
                            int fromJunctionID,
                            int toJunctionID,
                            IPolyline polyline)
                     throws IOException,
                            AutomationException
Make a new edge in the result from the feature buffer.

Remarks

WriteEdgeBuffer has been superseded by INATraversalResultEdit2.WriteEdgeBufferEx.

Product Availability

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

Specified by:
writeEdgeBuffer in interface INATraversalResultEdit
Parameters:
featureBuffer - A reference to a com.esri.arcgis.geodatabase.IFeatureBuffer (in)
sourceID - The sourceID (in)
sourceOID - The sourceOID (in)
fromPosition - The fromPosition (in)
toPosition - The toPosition (in)
fromJunctionID - The fromJunctionID (in)
toJunctionID - The toJunctionID (in)
polyline - A reference to a com.esri.arcgis.geometry.IPolyline (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeSimpleTurnBuffer

public void writeSimpleTurnBuffer(IFeatureBuffer featureBuffer,
                                  int sourceID,
                                  int sourceOID,
                                  int fromEdgeID,
                                  int toEdgeID)
                           throws IOException,
                                  AutomationException
Make a new two part turn in the result from the feature buffer.

Remarks

WriteSimpleTurnBuffer has been superseded by INATraversalResultEdit2.WriteSimpleTurnBufferEx.

Product Availability

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

Specified by:
writeSimpleTurnBuffer in interface INATraversalResultEdit
Parameters:
featureBuffer - A reference to a com.esri.arcgis.geodatabase.IFeatureBuffer (in)
sourceID - The sourceID (in)
sourceOID - The sourceOID (in)
fromEdgeID - The fromEdgeID (in)
toEdgeID - The toEdgeID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createJunctionEx

public int createJunctionEx(int sourceID,
                            int sourceOID,
                            int eID,
                            IPoint point)
                     throws IOException,
                            AutomationException
Make a new junction in the result.

Remarks

CreateJunctionEx creates a junction in the traversal results junction feature class.

It is unnecessary to pass in a geometry. If passed in, it will be used. Otherwise, it is possible to call InferGeometry later to infer all of the geometries.

Product Availability

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

Specified by:
createJunctionEx in interface INATraversalResultEdit2
Parameters:
sourceID - The sourceID (in)
sourceOID - The sourceOID (in)
eID - The eID (in)
point - A reference to a com.esri.arcgis.geometry.IPoint (in)
Returns:
The elementID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createEdgeEx

public int createEdgeEx(int sourceID,
                        int sourceOID,
                        int eID,
                        double fromPosition,
                        double toPosition,
                        int fromJunctionID,
                        int toJunctionID,
                        IPolyline polyline)
                 throws IOException,
                        AutomationException
Make a new edge in the result.

Remarks

CreateEdgeEx creates an edge in the traversal results edge feature class.

It is unnecessary to pass in a geometry. If passed in, it will be used. Otherwise, it is possible to call InferGeometry later to infer all of the geometries.

Product Availability

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

Specified by:
createEdgeEx in interface INATraversalResultEdit2
Parameters:
sourceID - The sourceID (in)
sourceOID - The sourceOID (in)
eID - The eID (in)
fromPosition - The fromPosition (in)
toPosition - The toPosition (in)
fromJunctionID - The fromJunctionID (in)
toJunctionID - The toJunctionID (in)
polyline - A reference to a com.esri.arcgis.geometry.IPolyline (in)
Returns:
The elementID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createSimpleTurnEx

public int createSimpleTurnEx(int sourceID,
                              int sourceOID,
                              int eID,
                              int fromEdgeID,
                              int toEdgeID)
                       throws IOException,
                              AutomationException
Make a new two edge turn in the result.

Remarks

CreateSimpleTurnEx creates a turn between two edges in the traversal results turn feature class.

Product Availability

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

Specified by:
createSimpleTurnEx in interface INATraversalResultEdit2
Parameters:
sourceID - The sourceID (in)
sourceOID - The sourceOID (in)
eID - The eID (in)
fromEdgeID - The fromEdgeID (in)
toEdgeID - The toEdgeID (in)
Returns:
The elementID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeJunctionBufferEx

public void writeJunctionBufferEx(IFeatureBuffer featureBuffer,
                                  int sourceID,
                                  int sourceOID,
                                  int eID,
                                  IPoint point)
                           throws IOException,
                                  AutomationException
Make a new junction in the result from the feature buffer.

Remarks

WriteJunctionBufferEx populates the input FeatureBuffer with the other input parameters. This FeatureBuffer can then be passed to an insert cursor on the traversal result feature class.

Product Availability

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

Specified by:
writeJunctionBufferEx in interface INATraversalResultEdit2
Parameters:
featureBuffer - A reference to a com.esri.arcgis.geodatabase.IFeatureBuffer (in)
sourceID - The sourceID (in)
sourceOID - The sourceOID (in)
eID - The eID (in)
point - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeEdgeBufferEx

public void writeEdgeBufferEx(IFeatureBuffer featureBuffer,
                              int sourceID,
                              int sourceOID,
                              int eID,
                              double fromPosition,
                              double toPosition,
                              int fromJunctionID,
                              int toJunctionID,
                              IPolyline polyline)
                       throws IOException,
                              AutomationException
Make a new edge in the result from the feature buffer.

Remarks

WriteEdgeBufferEx populates the input FeatureBuffer with the other input parameters. This FeatureBuffer can then be passed to an insert cursor on the traversal result feature class.

Product Availability

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

Specified by:
writeEdgeBufferEx in interface INATraversalResultEdit2
Parameters:
featureBuffer - A reference to a com.esri.arcgis.geodatabase.IFeatureBuffer (in)
sourceID - The sourceID (in)
sourceOID - The sourceOID (in)
eID - The eID (in)
fromPosition - The fromPosition (in)
toPosition - The toPosition (in)
fromJunctionID - The fromJunctionID (in)
toJunctionID - The toJunctionID (in)
polyline - A reference to a com.esri.arcgis.geometry.IPolyline (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeSimpleTurnBufferEx

public void writeSimpleTurnBufferEx(IFeatureBuffer featureBuffer,
                                    int sourceID,
                                    int sourceOID,
                                    int eID,
                                    int fromEdgeID,
                                    int toEdgeID)
                             throws IOException,
                                    AutomationException
Make a new two part turn in the result from the feature buffer.

Remarks

WriteSimpleTurnBufferEx populates the input FeatureBuffer with the other input parameters. This FeatureBuffer can then be passed to an insert cursor on the traversal result feature class.

Product Availability

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

Specified by:
writeSimpleTurnBufferEx in interface INATraversalResultEdit2
Parameters:
featureBuffer - A reference to a com.esri.arcgis.geodatabase.IFeatureBuffer (in)
sourceID - The sourceID (in)
sourceOID - The sourceOID (in)
eID - The eID (in)
fromEdgeID - The fromEdgeID (in)
toEdgeID - The toEdgeID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFeatureClass

public IFeatureClass getFeatureClass(int networkElementType)
                              throws IOException,
                                     AutomationException
The feature class by element type.

Product Availability

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

Specified by:
getFeatureClass in interface INATraversalResultQuery
Parameters:
networkElementType - A com.esri.arcgis.geodatabase.esriNetworkElementType constant (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFeatureClass
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

searchConnected

public IFeatureCursor searchConnected(INATraversalResultElement element,
                                      int searchedElementType,
                                      int searchedDirection,
                                      boolean recycle)
                               throws IOException,
                                      AutomationException
Returns a connected set of elements in the result.

Remarks

The SearchConnected method returns the NATraversalResultElements that are connected to the input NATraversalResultElement.

The searchedElementType parameter allows you to specify if you want to find the connected junctions, edges, or turns. The searchedDirection parameter specifies the direction. For example, esriRelDirectionForward will constrain the returned elements to just be those that were reached in the traversal after the current element.

The recycle parameter specifies that the same feature object should be used over and over with the underlying data just switched out. Use this option if you don't need to keep references to multiple traversal elements at the same time.

Product Availability

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

Specified by:
searchConnected in interface INATraversalResultQuery
Parameters:
element - A reference to a com.esri.arcgis.networkanalyst.INATraversalResultElement (in)
searchedElementType - A com.esri.arcgis.geodatabase.esriNetworkElementType constant (in)
searchedDirection - A com.esri.arcgis.geodatabase.esriRelDirection constant (in)
recycle - The recycle (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFeatureCursor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getElementIDFieldName

public String getElementIDFieldName()
                             throws IOException,
                                    AutomationException
The element ID field name.

Remarks

Specifies the ElementID field name. The ElementID field value provides the ObjectID of the NATraversalResultElement.

Product Availability

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

Specified by:
getElementIDFieldName in interface INATraversalResultQuery
Returns:
The fieldName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSourceIDFieldName

public String getSourceIDFieldName()
                            throws IOException,
                                   AutomationException
The source ID field name.

Remarks

Specifies the SourceID field name. The SourceID field value provides the SourceID of the feature class the NATraversalResultElement is referencing. This references the SourceID of a NATraversalResultSource accessed through INATraversalResult.

Product Availability

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

Specified by:
getSourceIDFieldName in interface INATraversalResultQuery
Returns:
The fieldName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSourceOIDFieldName

public String getSourceOIDFieldName()
                             throws IOException,
                                    AutomationException
The source OID field name.

Remarks

Specifies the SourceOID field name. The SourceOID field value provides the ObjectID of the Feature in the NetworkDataset's or NAContext's FeatureClass.

Product Availability

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

Specified by:
getSourceOIDFieldName in interface INATraversalResultQuery
Returns:
The fieldName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFromPositionFieldName

public String getFromPositionFieldName()
                                throws IOException,
                                       AutomationException
The from position field name.

Remarks

Specifies the FromPosition field name. The FromPosition field value provides the starting position of an NATraversalResultElement on the underlying feature in the network dataset.

Product Availability

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

Specified by:
getFromPositionFieldName in interface INATraversalResultQuery
Returns:
The fieldName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getToPositionFieldName

public String getToPositionFieldName()
                              throws IOException,
                                     AutomationException
The to position field name.

Remarks

Specifies the ToPosition field name. The ToPosition field value provides the ending position of an NATraversalResultElement on the underlying feature in the network dataset.

Product Availability

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

Specified by:
getToPositionFieldName in interface INATraversalResultQuery
Returns:
The fieldName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFromJunctionIDFieldName

public String getFromJunctionIDFieldName()
                                  throws IOException,
                                         AutomationException
The from junction ID field name.

Remarks

Specifies the FromJunctionID field name.

Product Availability

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

Specified by:
getFromJunctionIDFieldName in interface INATraversalResultQuery
Returns:
The fieldName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getToJunctionIDFieldName

public String getToJunctionIDFieldName()
                                throws IOException,
                                       AutomationException
The to junction ID field name.

Remarks

Specifies the ToJunctionID field name.

Product Availability

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

Specified by:
getToJunctionIDFieldName in interface INATraversalResultQuery
Returns:
The fieldName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFromEdgeIDFieldName

public String getFromEdgeIDFieldName()
                              throws IOException,
                                     AutomationException
The from edge ID field name.

Remarks

Specifies the FromEdgeID field name.

Product Availability

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

Specified by:
getFromEdgeIDFieldName in interface INATraversalResultQuery
Returns:
The fieldName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getToEdgeIDFieldName

public String getToEdgeIDFieldName()
                            throws IOException,
                                   AutomationException
The to edge ID field name.

Remarks

Specifies the ToEdgeID field name.

Product Availability

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

Specified by:
getToEdgeIDFieldName in interface INATraversalResultQuery
Returns:
The fieldName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEIDFieldName

public String getEIDFieldName()
                       throws IOException,
                              AutomationException
The EID field name

Remarks

Specifies the EID field name.

Product Availability

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

Specified by:
getEIDFieldName in interface INATraversalResultQuery2
Returns:
The fieldName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isDirty in interface IPersistStream
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
load in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException