com.esri.arcgis.geometry
Class ICurveProxy

java.lang.Object
  extended bycom.esri.arcgis.interop.Dispatch
      extended bycom.esri.arcgis.geometry.IGeometryProxy
          extended bycom.esri.arcgis.geometry.ICurveProxy
All Implemented Interfaces:
java.io.Externalizable, ICurve, IGeometry, java.io.Serializable
Direct Known Subclasses:
IBezierCurveProxy, ICircularArcProxy, ICurve2Proxy, IEllipticArcProxy, ILineProxy, IPathProxy, IPolycurveProxy, ISegmentProxy

public class ICurveProxy
extends IGeometryProxy
implements ICurve, java.io.Serializable

Provides access to properties and methods of all 1 dimensional curves (polylines, segments, boundaries of polygons, etc.).

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
  ICurveProxy()
          For internal use only
  ICurveProxy(java.lang.Object obj)
           
protected ICurveProxy(java.lang.Object obj, java.lang.String iid)
           
  ICurveProxy(java.lang.String CLSID, java.lang.String host, AuthInfo authInfo)
           
protected ICurveProxy(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.
 IPoint getFromPoint()
          The 'from' point of the curve.
 double getLength()
          The length of the curve.
 void getSubcurve(double fromDistance, double toDistance, boolean asRatio, ICurve[] outSubcurve)
          Extracts a portion of this curve into a new curve.
 IPoint getToPoint()
          The 'to' point of the curve.
 boolean isClosed()
          Indicates if 'from' and 'to' points (of each part) are identical.
 void queryFromPoint(IPoint from)
          Copies this curve's 'from' point to the input point.
 void queryNormal(int extension, double distanceAlongCurve, boolean asRatio, double length, ILine normal)
          Constructs a line normal to a curve from a point at a specified distance along the curve.
 void queryPoint(int extension, double distanceAlongCurve, boolean asRatio, IPoint outPoint)
          Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve.
 void queryPointAndDistance(int extension, IPoint inPoint, boolean asRatio, IPoint outPoint, double[] distanceAlongCurve, double[] distanceFromCurve, boolean[] bRightSide)
          Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items.
 void queryTangent(int extension, double distanceAlongCurve, boolean asRatio, double length, ILine tangent)
          Constructs a line tangent to a curve from a point at a specified distance along the curve.
 void queryToPoint(IPoint to)
          Copies the curve's 'to' point into the input point.
 void removeListener(java.lang.String iidStr, java.lang.Object theListener)
          Removes a Java object as a listener to events generated by a COM object.
 void reverseOrientation()
          Reverses the parameterization of the curve ('from' point becomes 'to' point, first segment becomes last segment, etc).
 void setFromPoint(IPoint from)
          The 'from' point of the curve.
 void setToPoint(IPoint to)
          The 'to' point of the curve.
 
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.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

ICurveProxy

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

ICurveProxy

public ICurveProxy()
For internal use only


ICurveProxy

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

ICurveProxy

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

ICurveProxy

protected ICurveProxy(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 IGeometryProxy
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 IGeometryProxy
Throws:
java.io.IOException

getLength

public double getLength()
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: ICurve
The length of the curve.

Supported Platforms

Windows, Solaris, Linux

Description

Returns the length of the entire curve.  The length of the curve is the sum of the lengths along each parameterized Segment between vertices along the curve. 

Specified by:
getLength in interface ICurve
Returns:
The length
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getFromPoint

public IPoint getFromPoint()
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: ICurve
The 'from' point of the curve.

Supported Platforms

Windows, Solaris, Linux

Description

Returns or Sets the FromPoint of the first segment of the first part of the curve.  While the curve may be composed of many parts and segments each with their own FromPoint, each curve only has a single From Point.

Remarks

 

FromPoint Example

Specified by:
getFromPoint in interface ICurve
Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPoint

setFromPoint

public void setFromPoint(IPoint from)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: ICurve
The 'from' point of the curve.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setFromPoint in interface ICurve
Parameters:
from - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

queryFromPoint

public void queryFromPoint(IPoint from)
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: ICurve
Copies this curve's 'from' point to the input point.

Supported Platforms

Windows, Solaris, Linux

Description

Used to query the FromPoint of the first Segment of the first part of the curve.

Remarks

Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

QueryFromPoint Example

Specified by:
queryFromPoint in interface ICurve
Parameters:
from - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
See Also:
IPoint

getToPoint

public IPoint getToPoint()
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: ICurve
The 'to' point of the curve.

Supported Platforms

Windows, Solaris, Linux

Description

Returns or Sets the ToPoint of the first Segment of the first part of the curve.  While the curve may be composed of many parts and segments each with their own ToPoint, each curve only has a single To Point.

Remarks

 

ToPoint Example

Specified by:
getToPoint in interface ICurve
Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPoint

setToPoint

public void setToPoint(IPoint to)
                throws java.io.IOException,
                       AutomationException
Description copied from interface: ICurve
The 'to' point of the curve.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setToPoint in interface ICurve
Parameters:
to - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

queryToPoint

public void queryToPoint(IPoint to)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: ICurve
Copies the curve's 'to' point into the input point.

Supported Platforms

Windows, Solaris, Linux

Description

Used to query the ToPoint of the first Segment of the first part of the curve.

Remarks

Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

QueryToPoint Example

Specified by:
queryToPoint in interface ICurve
Parameters:
to - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPoint

queryPoint

public void queryPoint(int extension,
                       double distanceAlongCurve,
                       boolean asRatio,
                       IPoint outPoint)
                throws java.io.IOException,
                       AutomationException
Description copied from interface: ICurve
Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve.

Supported Platforms

Windows, Solaris, Linux

Description

Returns the Point at a given distance along the curve or extended curve.  If the distance is less than the length of the curve, then the returned point is the point at that distance along the curve.  If the distance is less than zero, or greater than the length of the curve, then the returned point is on the curve specified by the extension method.  The distance may be specified as a fixed unit of measure or a ratio of the length of the curve.

Remarks

Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

ICurve QueryPoint Example

Specified by:
queryPoint in interface ICurve
Parameters:
extension - A com.esri.arcgis.geometry.esriSegmentExtension constant (in)
distanceAlongCurve - The distanceAlongCurve (in)
asRatio - The asRatio (in)
outPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPoint, esriSegmentExtension

queryPointAndDistance

public void queryPointAndDistance(int extension,
                                  IPoint inPoint,
                                  boolean asRatio,
                                  IPoint outPoint,
                                  double[] distanceAlongCurve,
                                  double[] distanceFromCurve,
                                  boolean[] bRightSide)
                           throws java.io.IOException,
                                  AutomationException
Description copied from interface: ICurve
Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items.

Supported Platforms

Windows, Solaris, Linux

Description

Finds the Point on the specified extended curve nearest to the input point and the distance between those points.  Also returns information about the side of the curve the input point is on as well as the distance along the curve that the nearest point occurs.

Remarks

AsRatio is an input parameter that only affects the DistanceAlongCurve

distanceFromCurve is an output parameter that represents the minimum distance between the curve and the input point.

DistanceAlongCurve is an output parameter that represents the distance between the Frompoint of the input curve and the returned point on the curve.

bRightSide is an output parameter that tells if the output point is on the right side of the curve. The direction of the curve determines the right and left sides.

Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

QueryPointAndDistance Example

Specified by:
queryPointAndDistance in interface ICurve
Parameters:
extension - A com.esri.arcgis.geometry.esriSegmentExtension constant (in)
inPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
asRatio - The asRatio (in)
outPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
distanceAlongCurve - The distanceAlongCurve (in/out: use single element array)
distanceFromCurve - The distanceFromCurve (in/out: use single element array)
bRightSide - The bRightSide (in/out: use single element array)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
See Also:
IPoint

queryTangent

public void queryTangent(int extension,
                         double distanceAlongCurve,
                         boolean asRatio,
                         double length,
                         ILine tangent)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: ICurve
Constructs a line tangent to a curve from a point at a specified distance along the curve.

Supported Platforms

Windows, Solaris, Linux

Description

Given a distance along the curve specified either as a ratio of the length or as a specific fixed distance, QueryTangent returns the Line tangent to the Point.  The length and method of tangential extension of the tangent line are given by the user.  The method of tangential extension determines the direction of the tangent line as though it were being extended at a From point or a To point.

Remarks

 

QueryTangent Example

Specified by:
queryTangent in interface ICurve
Parameters:
extension - A com.esri.arcgis.geometry.esriSegmentExtension constant (in)
distanceAlongCurve - The distanceAlongCurve (in)
asRatio - The asRatio (in)
length - The length (in)
tangent - A reference to a com.esri.arcgis.geometry.ILine (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ILine

queryNormal

public void queryNormal(int extension,
                        double distanceAlongCurve,
                        boolean asRatio,
                        double length,
                        ILine normal)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: ICurve
Constructs a line normal to a curve from a point at a specified distance along the curve.

Supported Platforms

Windows, Solaris, Linux

Description

Given a distance along the curve specified either as a ratio of the Length or as a specific fixed distance, QueryNormal returns the Line normal to the Point.  The length and method of tangential extension of the normal line are given by the user.  The method of tangential extension determines the direction of the normal line as though it were being extended at a From point or a To point.

Remarks

 

QueryNormal Example

Specified by:
queryNormal in interface ICurve
Parameters:
extension - A com.esri.arcgis.geometry.esriSegmentExtension constant (in)
distanceAlongCurve - The distanceAlongCurve (in)
asRatio - The asRatio (in)
length - The length (in)
normal - 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.
See Also:
ILine

getSubcurve

public void getSubcurve(double fromDistance,
                        double toDistance,
                        boolean asRatio,
                        ICurve[] outSubcurve)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: ICurve
Extracts a portion of this curve into a new curve.

Supported Platforms

Windows, Solaris, Linux

Description

Gets the subcurve between the specified points along the original curve and creates a new curve. The elements in the new subcurve are the same type and have the same properties as the elements of the original curve. Which means if:

Input Geometry Output Geometry
Polygon Polyline
Polyline Polyline
Ring Path
Path Path
Segment Segment

 

If the input geometry is a polygon, you may want to use IRing::GetSubCurveEx which has more capabilities.

Remarks

 

Subcurve Example

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

reverseOrientation

public void reverseOrientation()
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: ICurve
Reverses the parameterization of the curve ('from' point becomes 'to' point, first segment becomes last segment, etc).

Supported Platforms

Windows, Solaris, Linux

Description

ReverseOrientation changes the direction of the curve without changing the spatial position of the curve.  The From Point and To Point of each Segment in each part of the curve are interchanged.

Remarks

The ReverseOrientation method works the same way as the Arcedit FLIP command. It reverses the order of the vertices in the Curve.

Caution should be taken in using ReverseOrientation on Polygons.  Since ReverseOrientation changes the direction of each Ring within the Polygon, all Exterior Rings become Interior Rings and vice versa.

Reverse Orientation Example

Specified by:
reverseOrientation in interface ICurve
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isClosed

public boolean isClosed()
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: ICurve
Indicates if 'from' and 'to' points (of each part) are identical.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isClosed in interface ICurve
Returns:
The isClosed
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.