com.esri.arcgis.geometry
Class ISegmentProxy

java.lang.Object
  extended bycom.esri.arcgis.interop.Dispatch
      extended bycom.esri.arcgis.geometry.IGeometryProxy
          extended bycom.esri.arcgis.geometry.ICurveProxy
              extended bycom.esri.arcgis.geometry.ISegmentProxy
All Implemented Interfaces:
java.io.Externalizable, ICurve, IGeometry, ISegment, java.io.Serializable
Direct Known Subclasses:
ITopologicalSegmentProxy

public class ISegmentProxy
extends ICurveProxy
implements ISegment, java.io.Serializable

Provides access to members that identify a segment. A segment is a way of getting between two endpoints.

Product Availability

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

See Also:
Serialized Form

Field Summary
static java.lang.Class targetClass
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF
 
Constructor Summary
  ISegmentProxy()
          For internal use only
  ISegmentProxy(java.lang.Object obj)
           
protected ISegmentProxy(java.lang.Object obj, java.lang.String iid)
           
  ISegmentProxy(java.lang.String CLSID, java.lang.String host, AuthInfo authInfo)
           
protected ISegmentProxy(java.lang.String CLSID, java.lang.String iid, java.lang.String host, AuthInfo authInfo)
           
 
Method Summary
 void addListener(java.lang.String iidStr, java.lang.Object theListener, java.lang.Object theSource)
          Adds a Java object to be a listener for a specific kind of event generated by the COM object.
 void densify(int cInSlots, double maxDeviation, int[] pcOutSegments, ILine[] segments)
          Densify segment into the specified number of smaller segments.
 void geographicShift(double splitLongitude)
          Shift longitudes to the right of splitLongitude.
 void queryCurvature(double distanceAlongCurve, boolean asRatio, double[] curvature, ILine unitVector)
          Finds curvature and unit vector starting at point on segment and directed to embedded circle center.
 void removeListener(java.lang.String iidStr, java.lang.Object theListener)
          Removes a Java object as a listener to events generated by a COM object.
 int returnTurnDirection(ISegment otherSegment)
          Finds turn direction between two connected segments.
 void splitAtDistance(double distances, boolean asRatio, ISegment[] fromSegment, ISegment[] toSegment)
          Split segment at specified distance.
 void splitDivideLength(double offset, double length, boolean asRatio, int[] numSplitSegments, ISegment splitSegments)
          Divide segment into smaller segments of the specified length.
 
Methods inherited from class com.esri.arcgis.geometry.ICurveProxy
getFromPoint, getLength, getSubcurve, getToPoint, isClosed, queryFromPoint, queryNormal, queryPoint, queryPointAndDistance, queryTangent, queryToPoint, reverseOrientation, setFromPoint, setToPoint
 
Methods inherited from class com.esri.arcgis.geometry.IGeometryProxy
geoNormalize, geoNormalizeFromLongitude, getDimension, getEnvelope, getGeometryType, getSpatialReference, isEmpty, project, queryEnvelope, setEmpty, setSpatialReferenceByRef, snapToSpatialReference
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, hashCode, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, queryInterface, readExternal, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.geometry.ICurve
getFromPoint, getLength, getSubcurve, getToPoint, isClosed, queryFromPoint, queryNormal, queryPoint, queryPointAndDistance, queryTangent, queryToPoint, reverseOrientation, setFromPoint, setToPoint
 
Methods inherited from interface com.esri.arcgis.geometry.IGeometry
geoNormalize, geoNormalizeFromLongitude, getDimension, getEnvelope, getGeometryType, getSpatialReference, isEmpty, project, queryEnvelope, setEmpty, setSpatialReferenceByRef, snapToSpatialReference
 

Field Detail

targetClass

public static final java.lang.Class targetClass
Constructor Detail

ISegmentProxy

public ISegmentProxy(java.lang.String CLSID,
                     java.lang.String host,
                     AuthInfo authInfo)
              throws java.net.UnknownHostException,
                     java.io.IOException

ISegmentProxy

public ISegmentProxy()
For internal use only


ISegmentProxy

public ISegmentProxy(java.lang.Object obj)
              throws java.io.IOException

ISegmentProxy

protected ISegmentProxy(java.lang.Object obj,
                        java.lang.String iid)
                 throws java.io.IOException

ISegmentProxy

protected ISegmentProxy(java.lang.String CLSID,
                        java.lang.String iid,
                        java.lang.String host,
                        AuthInfo authInfo)
                 throws java.io.IOException
Method Detail

addListener

public void addListener(java.lang.String iidStr,
                        java.lang.Object theListener,
                        java.lang.Object theSource)
                 throws java.io.IOException
Description copied from class: Dispatch
Adds a Java object to be a listener for a specific kind of event generated by the COM object. when you wish to invoke method on the COM object using IDispatch (not using custom marshalling).

Overrides:
addListener in class ICurveProxy
Throws:
java.io.IOException

removeListener

public void removeListener(java.lang.String iidStr,
                           java.lang.Object theListener)
                    throws java.io.IOException
Description copied from class: Dispatch
Removes a Java object as a listener to events generated by a COM object. when you wish to invoke method on the COM object using IDispatch (not using custom marshalling).

Overrides:
removeListener in class ICurveProxy
Throws:
java.io.IOException

queryCurvature

public void queryCurvature(double distanceAlongCurve,
                           boolean asRatio,
                           double[] curvature,
                           ILine unitVector)
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: ISegment
Finds curvature and unit vector starting at point on segment and directed to embedded circle center.

Supported Platforms

Windows, Solaris, Linux

Description

Returns the curvature at a specified distance along the segment.  The distance can be given explicitly or as a ratio of the entire length of the segment.  The curvature is returned as a Line representing a directional unit vector (in the direction going from the From Point to the To Point) and a double representing the magnitude of the vector of curvature.

Remarks

The unit vector returned by QueryCurvature points toward the center of the circle that has the same first and second derivative at the queried point with a curvature value equal to 1 / Radius of that circle.

QueryCurvature Example

Specified by:
queryCurvature in interface ISegment
Parameters:
distanceAlongCurve - The distanceAlongCurve (in)
asRatio - The asRatio (in)
curvature - The curvature (out: use single element array)
unitVector - A reference to a com.esri.arcgis.geometry.ILine (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

returnTurnDirection

public int returnTurnDirection(ISegment otherSegment)
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: ISegment
Finds turn direction between two connected segments.

Supported Platforms

Windows, Solaris, Linux

Description

Returns the Turn Direction of the Segment immediately following the current Segment.  The two segments must be connected between the To Point of the first segment and the From Point of the second segment.  ReturnTurnDirection returns a long corresponding to an esriTurnDirectionEnum or a combination of esriNoTurn or esriUTurn and esriRightTurn or esriLeftTurn.  If the two segments are tangential at the point of connection and not completely colinear, then a combination of esriTurnDirectionEnums are returned.

Remarks

ReturnTurnDirection is only available for Lines and CircularArcs, not BezierCurves or EllipticArcs.

ReturnTurnDirection Example

Specified by:
returnTurnDirection in interface ISegment
Parameters:
otherSegment - A reference to a com.esri.arcgis.geometry.ISegment (in)
Returns:
The turnDirection
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

splitAtDistance

public void splitAtDistance(double distances,
                            boolean asRatio,
                            ISegment[] fromSegment,
                            ISegment[] toSegment)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: ISegment
Split segment at specified distance.

Supported Platforms

Windows, Solaris, Linux

Description

Splits the input Segment at the given distance and returns the Segment between the original From Point and the split point as well as the Segment between the split point and the original To Point.  The split distance may be specified as a ratio of the total distance if AsRatio = TRUE, otherwise the distance is in the same units as the Length of the Segment.

Remarks

 

SplitAtDistance Example

Specified by:
splitAtDistance in interface ISegment
Parameters:
distances - The distances (in)
asRatio - The asRatio (in)
fromSegment - A reference to a com.esri.arcgis.geometry.ISegment (out: use single element array)
toSegment - A reference to a com.esri.arcgis.geometry.ISegment (out: use single element array)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

splitDivideLength

public void splitDivideLength(double offset,
                              double length,
                              boolean asRatio,
                              int[] numSplitSegments,
                              ISegment splitSegments)
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: ISegment
Divide segment into smaller segments of the specified length.

Supported Platforms

Windows, Solaris, Linux

Description

Outputs an array of Segments of a desired input length starting at an offset distance along the curve and continuing until the end of the Segment is reached.  The offset and length may be specified as a ratio of the total length of the Segment.  SplitDivideLength outputs an array of Segments and the number of Segments in that array.  All of the output Segments in the array have the desired input length with the exception of the final Segment which has a length less than or equal to the input length (the remainder of the Segment).

Remarks

 

SplitDivideLength Example

Specified by:
splitDivideLength in interface ISegment
Parameters:
offset - The offset (in)
length - The length (in)
asRatio - The asRatio (in)
numSplitSegments - The numSplitSegments (in)
splitSegments - A reference to a com.esri.arcgis.geometry.ISegment (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

densify

public void densify(int cInSlots,
                    double maxDeviation,
                    int[] pcOutSegments,
                    ILine[] segments)
             throws java.io.IOException,
                    AutomationException
Description copied from interface: ISegment
Densify segment into the specified number of smaller segments. This method is intended for internal use only.

Supported Platforms

Windows, Solaris, Linux

Remarks

Densifying individual segments can be accomplished in client code by add the segment to a temporary polyline, then densifying the polyline using one of the methods on IPolycurve. Alternatively, the IGeometryBridge interface on the GeometryEnvironment object can be used.

Specified by:
densify in interface ISegment
Parameters:
cInSlots - The cInSlots (in)
maxDeviation - The maxDeviation (in)
pcOutSegments - The pcOutSegments (out: use single element array)
segments - A reference to a com.esri.arcgis.geometry.ILine (out: use single element array)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

geographicShift

public void geographicShift(double splitLongitude)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: ISegment
Shift longitudes to the right of splitLongitude. This method is obsolete.

Supported Platforms

Windows, Solaris, Linux

Specified by:
geographicShift in interface ISegment
Parameters:
splitLongitude - The splitLongitude (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.