com.esri.arcgis.geodatabase
Interface IForwardStar

All Superinterfaces:
Serializable
All Known Implementing Classes:
ForwardStar, IForwardStarProxy

public interface IForwardStar
extends Serializable

Provides access to members that query information about adjacent elements in the logical network.

Description

The IForwardStar interface allows you to access the fundamental connectivity of a network. ("Forward Star" is a term from computer science for a data structure that stores the connectivity of a graph.) The job of IForwardStar is to return information about adjacent elements. An adjacent element is simply a network element connected to another network element. For example, an edge connected to a junction, or a junction connected to a junction via an edge. Quickly finding adjacent elements is the cornerstone of all network solvers.

To use IForwardStar, you start with the FindAdjacent method. FindAdjacent returns the number of adjacent edges to a junction which you use to iterate over the adjacent edges with the QueryAdjacent[elt] methods, where elt is the element type.

The QueryAdjacent[elt] methods return both the adjacent elements as well as the weights of the adjacent elements. An edge weight could be used to represent the cost to reach the adjacent junction. You specify what weight you want returned when you create the ForwardStar with the CreateForwardStar method on the INetwork interface.

When To Use

IForwardStar is used to access the connectivity of a network.

Product Availability

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

See Also:
INetworkUpdate, IForwardStar, IGraph, INetworkClass.getNetworkAncillaryRole(), INetworkWorkspace, INetworkClass.getGeometricNetwork(), INetworkClass.getFieldToWeightMapping(int), IUtilityNetwork,

Not all members are callable from Java. Please use IForwardStarGEN instead.


Method Summary
 void findAdjacent(int fromEdgeEID, int atJunctionEID, int[] adjacentEdgesCount)
          Finds the edge elements that are adjacent to the given junction element and returns the count.
 INetwork getNetwork()
          Underlying network of this forward star cursor.
 void queryAdjacentEdge(int index, int[] adjacentEdgeEID, boolean[] reverseOrientation, Object[] adjacentEdgeWeightValue)
          Returns index'th adjacent edge found with FindAdjacent, its orientation, and its weight value.
 void queryAdjacentEdges(int count, int[] adjacentEdgeEIDs, boolean[] reverseOrientation, Object[] adjacentEdgesWeightValue)
          Returns the adjacent edges found with FindAdjacent into the specified user-defined array.
 void queryAdjacentJunction(int index, int[] adjacentJunctionEID, Object[] adjacentJunctionWeightValue)
          Returns the opposite junction of the index'th adjacent edge found with FindAdjacent, and the weight value for this junction.
 void queryAdjacentJunctions(int count, int[] adjacentJunctionEIDs, Object[] adjacentJunctionsWeightValue)
          Returns the opposite junctions of the adjacent edges found with FindAdjacent into the specified user-defined array.
 void queryAtTurn(int index, int[] adjacentTurnEID, Object[] adjacentTurnWeightValue)
          Returns the turn through which the index'th adjacent edge found with FindAdjacent passes, and the weight value of the turn.
 void queryAtTurns(int count, int[] adjacentTurnEIDs, Object[] adjacentTurnsWeightValue)
          Returns the turns through which the adjacent edges found with FindAdjacent passes into the user-defined array.
 

Method Detail

getNetwork

INetwork getNetwork()
                    throws IOException,
                           AutomationException
Underlying network of this forward star cursor.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.geodatabase.INetwork
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INetwork.createForwardStar(boolean, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight), IForwardStar.queryAdjacentEdge(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunction(int, int[], Object[]), IForwardStar.getNetwork(), IForwardStar.findAdjacent(int, int, int[]), IForwardStar.queryAtTurns(int, int[], Object[]), IForwardStar.queryAdjacentEdges(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunctions(int, int[], Object[]), IForwardStar.queryAtTurn(int, int[], Object[])

findAdjacent

void findAdjacent(int fromEdgeEID,
                  int atJunctionEID,
                  int[] adjacentEdgesCount)
                  throws IOException,
                         AutomationException
Finds the edge elements that are adjacent to the given junction element and returns the count.

Description

The FindAdjacent method returns the number of adjacent edges to a junction in the adjacentEdgesCount parameter.

Remarks

The fromEdgeID parameter is ignored unless you are querying for adjacent turns. You can set fromEdgeID = 0 when querying for adjacent edges and junctions. adjacentEdgesCount is the number of adjacent edges.


Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
fromEdgeEID - The fromEdgeEID (in)
atJunctionEID - The atJunctionEID (in)
adjacentEdgesCount - The adjacentEdgesCount (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INetwork.createForwardStar(boolean, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight), IForwardStar.queryAdjacentEdge(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunction(int, int[], Object[]), IForwardStar.getNetwork(), IForwardStar.findAdjacent(int, int, int[]), IForwardStar.queryAtTurns(int, int[], Object[]), IForwardStar.queryAdjacentEdges(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunctions(int, int[], Object[]), IForwardStar.queryAtTurn(int, int[], Object[])

queryAdjacentJunction

void queryAdjacentJunction(int index,
                           int[] adjacentJunctionEID,
                           Object[] adjacentJunctionWeightValue)
                           throws IOException,
                                  AutomationException
Returns the opposite junction of the index'th adjacent edge found with FindAdjacent, and the weight value for this junction.

Remarks

Index is a number between 0 and n -1, where n is the number of adjacent edges returned by FindAdjacent. AdjacentJunctionWeightValue is the value of the weight specified in the CreateForwardStar method of the INetwork interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
index - The index (in)
adjacentJunctionEID - The adjacentJunctionEID (out: use single element array)
adjacentJunctionWeightValue - A Variant (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INetwork.createForwardStar(boolean, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight), IForwardStar.queryAdjacentEdge(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunction(int, int[], Object[]), IForwardStar.getNetwork(), IForwardStar.findAdjacent(int, int, int[]), IForwardStar.queryAtTurns(int, int[], Object[]), IForwardStar.queryAdjacentEdges(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunctions(int, int[], Object[]), IForwardStar.queryAtTurn(int, int[], Object[])

queryAdjacentEdge

void queryAdjacentEdge(int index,
                       int[] adjacentEdgeEID,
                       boolean[] reverseOrientation,
                       Object[] adjacentEdgeWeightValue)
                       throws IOException,
                              AutomationException
Returns index'th adjacent edge found with FindAdjacent, its orientation, and its weight value.

Remarks

Index is a number between 0 and n-1, where n is the number of adjacent edges returned by FindAdjacent. AdjacentEdgeWeightValue is the value of the weight specified in the CreateForwardStar method of the INetwork interface.

ReverseOrientation is TRUE if the edge "enters" the junction. That is, the junction specified in FindAdjacent is the "to-junction" of the returned edge. ReverseOrientation will be FALSE if the edge "leaves" the junction - it is the "from-junction" of the returned edge. When ReverseOrientation is TRUE, the weight value returned will be the pToFromEdgeWeight specified in INetwork::CreateForwardStar method. When FALSE, the value is the pFromToEdgeWeight specified.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
index - The index (in)
adjacentEdgeEID - The adjacentEdgeEID (out: use single element array)
reverseOrientation - The reverseOrientation (out: use single element array)
adjacentEdgeWeightValue - A Variant (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INetwork.createForwardStar(boolean, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight), IForwardStar.queryAdjacentEdge(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunction(int, int[], Object[]), IForwardStar.getNetwork(), IForwardStar.findAdjacent(int, int, int[]), IForwardStar.queryAtTurns(int, int[], Object[]), IForwardStar.queryAdjacentEdges(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunctions(int, int[], Object[]), IForwardStar.queryAtTurn(int, int[], Object[])

queryAtTurn

void queryAtTurn(int index,
                 int[] adjacentTurnEID,
                 Object[] adjacentTurnWeightValue)
                 throws IOException,
                        AutomationException
Returns the turn through which the index'th adjacent edge found with FindAdjacent passes, and the weight value of the turn.

Description

QueryAtTurn returns the nth turn element and weight as you traverse from the fromEdgeID specified in IForwardStar::FindAdjacent to the nth adjacent edge.

Remarks

A turn represents a movement between two adjacent edges, the from-edge and the to-edge. If you are querying turns, you must specify the fromEdgeEID in the IForwardStar::FindAdjancent request. This is from-edge of the turn.

Index is a number between 0 and n-1, where n is the number of adjacent edges returned by FindAdjacent. adjacentTurnWeightValue is the value of the weight specified in the turnWeight parameter of INetwork::CreateForwardStar.
NOTE: Since turns in networks are not implemented, this method is not implemented.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
index - The index (in)
adjacentTurnEID - The adjacentTurnEID (out: use single element array)
adjacentTurnWeightValue - A Variant (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INetwork.createForwardStar(boolean, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight), IForwardStar.queryAdjacentEdge(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunction(int, int[], Object[]), IForwardStar.getNetwork(), IForwardStar.findAdjacent(int, int, int[]), IForwardStar.queryAtTurns(int, int[], Object[]), IForwardStar.queryAdjacentEdges(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunctions(int, int[], Object[]), IForwardStar.queryAtTurn(int, int[], Object[])

queryAdjacentJunctions

void queryAdjacentJunctions(int count,
                            int[] adjacentJunctionEIDs,
                            Object[] adjacentJunctionsWeightValue)
                            throws IOException,
                                   AutomationException
Returns the opposite junctions of the adjacent edges found with FindAdjacent into the specified user-defined array.

Description

QueryAdjacentJunctions returns an array of adjacent junctions and their weights. The array has adjacentEdgesCount entries, where adjacentEdgesCount is the value returned by FindAdjacent.

See also the QueryAdjacentJunction request.

Remarks

adjacentJunctionEIDs and adjacentJunctionsWeightValue are arrays that are dimensioned to at least adjacentEdgesCount, as returned by FindAdjacent. Note that the MaxDegree property of INetwork will tell you the maximum number of edges for any junction, and you can use this to allocate memory for these arrays. Count is equal to adjacentEdgesCount from FindAdjacent.

AdjacentJunctionsWeightValue contain weight values specified in the CreateForwardStar method of the INetwork interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
count - The count (in)
adjacentJunctionEIDs - The adjacentJunctionEIDs (out: use single element array)
adjacentJunctionsWeightValue - A Variant (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INetwork.createForwardStar(boolean, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight), IForwardStar.queryAdjacentEdge(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunction(int, int[], Object[]), IForwardStar.getNetwork(), IForwardStar.findAdjacent(int, int, int[]), IForwardStar.queryAtTurns(int, int[], Object[]), IForwardStar.queryAdjacentEdges(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunctions(int, int[], Object[]),

This method is not callable from Java. Please use IForwardStarGEN::QueryAdjacentJunctions.


queryAdjacentEdges

void queryAdjacentEdges(int count,
                        int[] adjacentEdgeEIDs,
                        boolean[] reverseOrientation,
                        Object[] adjacentEdgesWeightValue)
                        throws IOException,
                               AutomationException
Returns the adjacent edges found with FindAdjacent into the specified user-defined array.

Description

QueryAdjacentEdges returns an array of adjacent edges, their weights, and their orientation. The array has adjacentEdgesCount entries, where adjacentEdgesCount is the value returned by FindAdjacent.

See also the QueryAdjacentEdge request.

Remarks

adjacentEdgeEIDs, ReverseOrientation, and adjacentEdgesWeightValue are arrays that are dimensioned to at least adjacentEdgesCount, as returned by FindAdjacent. Note that the MaxDegree property of INetwork will tell you the maximum number of edges for any junction, and you can use this to allocate memory for these arrays. Count is equal to adjacentEdgesCount from FindAdjacent.

Values in the ReverseOrientation array are TRUE if the edge "enters" the junction. That is, the junction specified in FindAdjacent is the "to-junction" of the returned edge. ReverseOrientation values will be FALSE if the edge "leaves" the junction - it is the "from-junction" of the returned edge.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
count - The count (in)
adjacentEdgeEIDs - The adjacentEdgeEIDs (out: use single element array)
reverseOrientation - The reverseOrientation (out: use single element array)
adjacentEdgesWeightValue - A Variant (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INetwork.createForwardStar(boolean, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight), IForwardStar.queryAdjacentEdge(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunction(int, int[], Object[]), IForwardStar.getNetwork(), IForwardStar.findAdjacent(int, int, int[]), IForwardStar.queryAtTurns(int, int[], Object[]), IForwardStar.queryAdjacentEdges(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunctions(int, int[], Object[]),

This method is not callable from Java. Please use IForwardStarGEN::QueryAdjacentEdges.


queryAtTurns

void queryAtTurns(int count,
                  int[] adjacentTurnEIDs,
                  Object[] adjacentTurnsWeightValue)
                  throws IOException,
                         AutomationException
Returns the turns through which the adjacent edges found with FindAdjacent passes into the user-defined array.

Description

QueryAtTurns returns an array of adjacent turns and their weights. The array has adjacentEdgesCount entries, where adjacentEdgesCount is the value returned by IForwardStar::FindAdjacent.

See also the QueryAtTurn request.

Remarks

A turn represents a movement between two adjacent edges, the from-edge and the to-edge. If you are querying turns, you must specify the fromEdgeEID in the IForwardStar::FindAdjancent request. This is from-edge of the turn.

adjacentTurnEIDs
and adjacentTurnsWeightValue are arrays that are dimensioned to at least adjacentEdgesCount , as returned by IForwardStar::FindAdjacent . Note that the MaxDegree property of INetwork will tell you the maximum number of edges for any junction, and you can use this to allocate memory for these arrays. Count is equal to adjacentEdgesCount from IForwardStar::FindAdjacent.
NOTE: Since turns in networks are not implemented, this method is not implemented.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
count - The count (in)
adjacentTurnEIDs - The adjacentTurnEIDs (out: use single element array)
adjacentTurnsWeightValue - A Variant (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INetwork.createForwardStar(boolean, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight, com.esri.arcgis.geodatabase.INetWeight), IForwardStar.queryAdjacentEdge(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunction(int, int[], Object[]), IForwardStar.getNetwork(), IForwardStar.findAdjacent(int, int, int[]), IForwardStar.queryAtTurns(int, int[], Object[]), IForwardStar.queryAdjacentEdges(int, int[], boolean[], Object[]), IForwardStar.queryAdjacentJunctions(int, int[], Object[]),

This method is not callable from Java. Please use IForwardStarGEN::QueryAtTurns.