com.esri.arcgis.geodatabase
Class NetworkTurn

java.lang.Object
  extended by com.esri.arcgis.geodatabase.NetworkTurn
All Implemented Interfaces:
INetworkElement, INetworkTurn, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class NetworkTurn
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, INetworkElement, INetworkTurn

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

Description

To access the NetworkTurn object for an existing turn element in the network dataset, use the QueryTurn method on the INetworkQuery interface.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
NetworkTurn(Object obj)
          Construct a NetworkTurn using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 double getAngle()
          Angle of the turning movement described by this network turn.
 Object getAttributeValue(int attributeID)
          Value of this network element for the given network attribute ID.
 Object getAttributeValueByName(String attributeName)
          Value of this network element for the given network attribute name.
 int getEdgeCount()
          Number of network edge elements that participate in this network turn.
 int getEID()
          Element ID for this network element.
 int getElementType()
          Type of this network element.
 int getOID()
          Object ID of the object corresponding to this network element.
 int getSourceID()
          ID of the network dataset source from which this network element was derived.
 int getTurnType()
          Type of network turn.
 int hashCode()
          the hashcode for this object
 void queryAtJunction(INetworkJunction junction)
          Queries the at-junction of this network turn.
 void queryEdge(int index, INetworkEdge edge)
          Queries the index'th edge element of this network turn.
 
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

NetworkTurn

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

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

Throws:
IOException - if there are interop problems NetworkTurn theNetworkTurn = (NetworkTurn) 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.

getTurnType

public int getTurnType()
                throws IOException,
                       AutomationException
Type of network turn.

Remarks

The TurnType property indicates whether or not this NetworkTurn is a turn element in the network.

If the TurnType is esriNTTImplicit, then this NetworkTurn represents an implicit turn. An implicit turn is a turning movement that is implied from two adjacent edge elements where there is no turn element in the network. An implicit turn can only be returned in a NetworkTurn object by the INetworkForwardStarAdjacencies::QueryTurn method.

If the TurnType is esriNTTExplicit, then this NetworkTurn represents a turn element in the network.

Product Availability

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

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

queryAtJunction

public void queryAtJunction(INetworkJunction junction)
                     throws IOException,
                            AutomationException
Queries the at-junction of this network turn.

Remarks

The QueryAtJunction method retrieves the junction element that anchors this turn element. The anchor junction of a turn element is the junction connecting the last two edges that the turn traverses.

This method requires an instantiated NetworkJunction 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:
queryAtJunction in interface INetworkTurn
Parameters:
junction - 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.

getAngle

public double getAngle()
                throws IOException,
                       AutomationException
Angle of the turning movement described by this network turn.

Remarks

The Angle property returns the turning angle of the turn. The turning angle is determined by the difference in the azimuth values of the first and last edge elements of the turn.

The value returned for Angle ranges from 0 to 360. The Angle in measured clockwise from straight in degrees. Below are sample Angle values:

Product Availability

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

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

getEdgeCount

public int getEdgeCount()
                 throws IOException,
                        AutomationException
Number of network edge elements that participate in this network turn.

Remarks

The EdgeCount is the number of edge element that this turn traverses.

Product Availability

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

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

queryEdge

public void queryEdge(int index,
                      INetworkEdge edge)
               throws IOException,
                      AutomationException
Queries the index'th edge element of this network turn.

Remarks

The QueryEdge method retrieves the edge element traversed by this turn at the specified index. The index values range from 0 to (EdgeCount - 1).

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:
queryEdge in interface INetworkTurn
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.