com.esri.arcgis.geodatabase
Class NetworkEdge

java.lang.Object
  extended by com.esri.arcgis.geodatabase.NetworkEdge
All Implemented Interfaces:
INetworkEdge, INetworkEdge2, INetworkElement, com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, Serializable

public class NetworkEdge
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, INetworkElement, INetworkEdge, INetworkEdge2, ISupportErrorInfo

A container for querying information on a network dataset edge element.

Description

To access the NetworkEdge object for an existing edge element in the network dataset, use the QueryEdge method on the INetworkQuery interface.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
NetworkEdge(Object obj)
          Construct a NetworkEdge using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 Object getAttributeValue(int attributeID)
          Value of this network element for the given network attribute ID.
 Object getAttributeValueAtTime(int attributeID, Date localTime, int timeUsage)
          Value of this network element for the given network attribute ID and local time.
 Object getAttributeValueByName(String attributeName)
          Value of this network element for the given network attribute name.
 int getCoveredEdgeCount()
          Returns the number of edges covered by this edge.
 int getDirection()
          Direction in which this network edge element is oriented relative to the direction of its source object.
 int getEID()
          Element ID for this network element.
 int getElementType()
          Type of this network element.
 double getFromAzimuth()
          Direction of travel at the from-end of the network edge element.
 int getOID()
          Object ID of the object corresponding to this network element.
 Object getPartialEdgeAttributeValue(double fromPosition, double toPosition, int attributeID)
          Value of this edge element along the given range for the given network attribute ID.
 Object getPartialEdgeAttributeValueAtTime(double fromPosition, double toPosition, int attributeID, Date localTime, int timeUsage)
          Value of this partial edge element for the given network attribute ID and local.
 double getPositionAlongObject(double positionAlongElement)
          Position along the source object at which the specified position along the network edge element lies.
 int getSourceID()
          ID of the network dataset source from which this network element was derived.
 double getToAzimuth()
          Direction of travel at the to-end of the network edge element.
 int getTurnCount()
          Number of network turn elements in which this network edge element participates.
 int getTurnParticipationType()
          Participation of this network edge element within a network turn element.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 boolean isHasCoveringHyperedge()
          Indicates if the network edge element has a covering hyperedge.
 boolean isHyperedge()
          Indicates if the network edge element is a hyperedge.
 void queryCoveredEdge(int index, INetworkEdge edge)
          Used to iterate over the edges covered by this edge.
 void queryCoveringHyperedge(INetworkEdge edge, double[] fromPosition, double[] toPosition)
          Queries the covering hyperedge of the network edge element and returns its related positions along the covering hyperedge.
 void queryEdgeInOtherDirection(INetworkEdge edge)
          Queries the network edge element corresponding to the reverse traversal of this network edge element.
 void queryJunctions(INetworkJunction fromJunction, INetworkJunction toJunction)
          Queries the network junction elements adjacent to this network edge element.
 void queryPositions(double[] fromPosition, double[] toPosition)
          Queries the positions along the source object at which the from-end and to-end of the network edge element lies.
 void queryTurn(int index, INetworkTurn turn)
          Queries the index'th network turn element in which this network edge element participates.
 
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

NetworkEdge

public NetworkEdge(Object obj)
            throws IOException
Construct a NetworkEdge using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to NetworkEdge.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
NetworkEdge o = (NetworkEdge)obj; // will not work

NetworkEdge o = new NetworkEdge(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
IOException - if there are interop problems NetworkEdge theNetworkEdge = (NetworkEdge) obj;
Method Detail

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

getEID

public int getEID()
           throws IOException,
                  AutomationException
Element ID for this network element.

Product Availability

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

Specified by:
getEID in interface INetworkElement
Returns:
The eID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getElementType

public int getElementType()
                   throws IOException,
                          AutomationException
Type of this network element.

Product Availability

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

Specified by:
getElementType in interface INetworkElement
Returns:
A com.esri.arcgis.geodatabase.esriNetworkElementType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSourceID

public int getSourceID()
                throws IOException,
                       AutomationException
ID of the network dataset source from which this network element was derived.

Remarks

The SourceID is the unique ID of the NetworkSource that generated this network element.

Product Availability

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

Specified by:
getSourceID in interface INetworkElement
Returns:
The sourceID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOID

public int getOID()
           throws IOException,
                  AutomationException
Object ID of the object corresponding to this network element.

Remarks

The OID property returns the ObjectID of the feature that generated this network element.

Product Availability

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

Specified by:
getOID in interface INetworkElement
Returns:
The oID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAttributeValue

public Object getAttributeValue(int attributeID)
                         throws IOException,
                                AutomationException
Value of this network element for the given network attribute ID.

Product Availability

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

Specified by:
getAttributeValue in interface INetworkElement
Parameters:
attributeID - The attributeID (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAttributeValueByName

public Object getAttributeValueByName(String attributeName)
                               throws IOException,
                                      AutomationException
Value of this network element for the given network attribute name.

Product Availability

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

Specified by:
getAttributeValueByName in interface INetworkElement
Parameters:
attributeName - The attributeName (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDirection

public int getDirection()
                 throws IOException,
                        AutomationException
Direction in which this network edge element is oriented relative to the direction of its source object.

Remarks

The Direction property returns the direction of travel along this edge element relative to the digitized direction of the source feature. The direction of travel is either esriNEDAlongDigitized, meaning the direction of travel along the edge element is the same as the feature's direction of digitization, or esriNEDAgainstDigitized, meaning the direction of travel along the edge element is the opposite of the feature's direction of digitization.

Product Availability

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

Specified by:
getDirection in interface INetworkEdge
Returns:
A com.esri.arcgis.geodatabase.esriNetworkEdgeDirection constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryPositions

public void queryPositions(double[] fromPosition,
                           double[] toPosition)
                    throws IOException,
                           AutomationException
Queries the positions along the source object at which the from-end and to-end of the network edge element lies.

Remarks

The QueryPositions method queries the positional values along the source feature from which this edge element was created. The position values range from 0.0 to 1.0, where 0.0 is at the from-end of the feature and 1.0 is at the to-end of the feature.

If the Direction property is esriNEDAlongDigitized, then the fromPosition value will be less than or equal to the toPositionValue. If the Direction property is esriNEDAgainstDigitized, then the fromPosition value will be greater than or equal to the toPositionValue.

Product Availability

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

Specified by:
queryPositions in interface INetworkEdge
Parameters:
fromPosition - The fromPosition (out: use single element array)
toPosition - The toPosition (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFromAzimuth

public double getFromAzimuth()
                      throws IOException,
                             AutomationException
Direction of travel at the from-end of the network edge element.

Remarks

The FromAzimuth property indicates the direction of travel at the starting end of the edge element. For edge elements generated by an EdgeFeatureSource, the FromAzimuth and ToAzimuth values are measured clockwise in degrees relative to the positive Y-axis direction of the spatial reference of the network dataset.

Product Availability

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

Specified by:
getFromAzimuth in interface INetworkEdge
Returns:
The fromAzimuth
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getToAzimuth

public double getToAzimuth()
                    throws IOException,
                           AutomationException
Direction of travel at the to-end of the network edge element.

Remarks

The ToAzimuth property indicates the direction of travel at the terminating end of the edge element. For edge elements generated by an EdgeFeatureSource, the FromAzimuth and ToAzimuth values are measured clockwise in degrees relative to the positive Y-axis direction of the spatial reference of the network dataset.

Product Availability

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

Specified by:
getToAzimuth in interface INetworkEdge
Returns:
The toAzimuth
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTurnParticipationType

public int getTurnParticipationType()
                             throws IOException,
                                    AutomationException
Participation of this network edge element within a network turn element.

Product Availability

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

Specified by:
getTurnParticipationType in interface INetworkEdge
Returns:
A com.esri.arcgis.geodatabase.esriNetworkTurnParticipationType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPositionAlongObject

public double getPositionAlongObject(double positionAlongElement)
                              throws IOException,
                                     AutomationException
Position along the source object at which the specified position along the network edge element lies.

Product Availability

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

Specified by:
getPositionAlongObject in interface INetworkEdge
Parameters:
positionAlongElement - The positionAlongElement (in)
Returns:
The positionAlongObject
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTurnCount

public int getTurnCount()
                 throws IOException,
                        AutomationException
Number of network turn elements in which this network edge element participates.

Remarks

The TurnCount property returns the number of turn elements that traverse this edge.

Product Availability

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

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

queryTurn

public void queryTurn(int index,
                      INetworkTurn turn)
               throws IOException,
                      AutomationException
Queries the index'th network turn element in which this network edge element participates.

Remarks

The QueryTurn method retrieves the turn element that traverses this edge at the specified index. The index values range from 0 to (TurnCount - 1).

The QueryTurn method requires an instantiated NetworkTurn object to be passed in as a parameter. You can create an empty NetworkTurn object by using the INetworkQuery::CreateNetworkElement method.

Product Availability

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

Specified by:
queryTurn in interface INetworkEdge
Parameters:
index - The index (in)
turn - A reference to a com.esri.arcgis.geodatabase.INetworkTurn (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryEdgeInOtherDirection

public void queryEdgeInOtherDirection(INetworkEdge edge)
                               throws IOException,
                                      AutomationException
Queries the network edge element corresponding to the reverse traversal of this network edge element.

Remarks

The QueryEdgeInOtherDirection method retrieves the edge element in the opposite direction of travel as this edge.

This method requires an instantiated NetworkEdge object to be passed in as a parameter. You can create an empty NetworkEdge object by using the INetworkQuery::CreateNetworkElement method.

Product Availability

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

Specified by:
queryEdgeInOtherDirection in interface INetworkEdge
Parameters:
edge - A reference to a com.esri.arcgis.geodatabase.INetworkEdge (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryJunctions

public void queryJunctions(INetworkJunction fromJunction,
                           INetworkJunction toJunction)
                    throws IOException,
                           AutomationException
Queries the network junction elements adjacent to this network edge element.

Remarks

The QueryJunctions method retrieves the junction elements at the ends of this edge element.

This method requires two instantiated NetworkJunction objects to be passed in as a parameter. You can create an empty NetworkJunction object by using the INetworkQuery::CreateNetworkElement method.

Product Availability

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

Specified by:
queryJunctions in interface INetworkEdge
Parameters:
fromJunction - A reference to a com.esri.arcgis.geodatabase.INetworkJunction (in)
toJunction - A reference to a com.esri.arcgis.geodatabase.INetworkJunction (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPartialEdgeAttributeValue

public Object getPartialEdgeAttributeValue(double fromPosition,
                                           double toPosition,
                                           int attributeID)
                                    throws IOException,
                                           AutomationException
Value of this edge element along the given range for the given network attribute ID.

Product Availability

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

Specified by:
getPartialEdgeAttributeValue in interface INetworkEdge2
Parameters:
fromPosition - The fromPosition (in)
toPosition - The toPosition (in)
attributeID - The attributeID (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAttributeValueAtTime

public Object getAttributeValueAtTime(int attributeID,
                                      Date localTime,
                                      int timeUsage)
                               throws IOException,
                                      AutomationException
Value of this network element for the given network attribute ID and local time.

Product Availability

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

Specified by:
getAttributeValueAtTime in interface INetworkEdge2
Parameters:
attributeID - The attributeID (in)
localTime - The localTime (in)
timeUsage - A com.esri.arcgis.geodatabase.esriNetworkTimeUsage constant (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPartialEdgeAttributeValueAtTime

public Object getPartialEdgeAttributeValueAtTime(double fromPosition,
                                                 double toPosition,
                                                 int attributeID,
                                                 Date localTime,
                                                 int timeUsage)
                                          throws IOException,
                                                 AutomationException
Value of this partial edge element for the given network attribute ID and local.

Product Availability

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

Specified by:
getPartialEdgeAttributeValueAtTime in interface INetworkEdge2
Parameters:
fromPosition - The fromPosition (in)
toPosition - The toPosition (in)
attributeID - The attributeID (in)
localTime - The localTime (in)
timeUsage - A com.esri.arcgis.geodatabase.esriNetworkTimeUsage constant (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHyperedge

public boolean isHyperedge()
                    throws IOException,
                           AutomationException
Indicates if the network edge element is a hyperedge.

Product Availability

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

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

isHasCoveringHyperedge

public boolean isHasCoveringHyperedge()
                               throws IOException,
                                      AutomationException
Indicates if the network edge element has a covering hyperedge.

Product Availability

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

Specified by:
isHasCoveringHyperedge in interface INetworkEdge2
Returns:
The hasCoveringHyperedge
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryCoveringHyperedge

public void queryCoveringHyperedge(INetworkEdge edge,
                                   double[] fromPosition,
                                   double[] toPosition)
                            throws IOException,
                                   AutomationException
Queries the covering hyperedge of the network edge element and returns its related positions along the covering hyperedge.

Product Availability

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

Specified by:
queryCoveringHyperedge in interface INetworkEdge2
Parameters:
edge - A reference to a com.esri.arcgis.geodatabase.INetworkEdge (in)
fromPosition - The fromPosition (out: use single element array)
toPosition - The toPosition (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCoveredEdgeCount

public int getCoveredEdgeCount()
                        throws IOException,
                               AutomationException
Returns the number of edges covered by this edge.

Product Availability

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

Specified by:
getCoveredEdgeCount in interface INetworkEdge2
Returns:
The coveredEdgeCount
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryCoveredEdge

public void queryCoveredEdge(int index,
                             INetworkEdge edge)
                      throws IOException,
                             AutomationException
Used to iterate over the edges covered by this edge.

Remarks

Using the CoveredEdgeCount property to find the range of values to use as an index, QueryCoveredEdge is called to iterate over the edges that are covered by this hyperedge.

Product Availability

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

Specified by:
queryCoveredEdge in interface INetworkEdge2
Parameters:
index - The index (in)
edge - A reference to a com.esri.arcgis.geodatabase.INetworkEdge (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.