com.esri.arcgis.geometry
Class IPolycurveProxy

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.IPolycurveProxy
All Implemented Interfaces:
java.io.Externalizable, ICurve, IGeometry, IPolycurve, java.io.Serializable
Direct Known Subclasses:
IPolycurve2Proxy, IPolygonProxy, IPolylineProxy

public class IPolycurveProxy
extends ICurveProxy
implements IPolycurve, java.io.Serializable

Provides access to members that define operations common to polylines and the boundaries of polygons.

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
  IPolycurveProxy()
          For internal use only
  IPolycurveProxy(java.lang.Object obj)
           
protected IPolycurveProxy(java.lang.Object obj, java.lang.String iid)
           
  IPolycurveProxy(java.lang.String CLSID, java.lang.String host, AuthInfo authInfo)
           
protected IPolycurveProxy(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(double maxSegmentLength, double maxDeviation)
          Converts this polycurve into a piecewise linear approximation of itself.
 void generalize(double maxAllowableOffset)
          Generalizes this polycurve using the Douglas-Poiker algorithm.
 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 smooth(double maxAllowableOffset)
          Converts this curve into a smooth curve containing only Bezier curve segments.
 void splitAtDistance(double distance, boolean asRatio, boolean createPart, boolean[] splitHappened, int[] newPartIndex, int[] newSegmentIndex)
          Introduces a new vertex into this polyline at a specified distance from the beginning of the polyline.
 void splitAtPoint(IPoint splitPoint, boolean projectOnto, boolean createPart, boolean[] splitHappened, int[] newPartIndex, int[] newSegmentIndex)
          Introduces a new vertex into this polyline at the location on it closest to the input point.
 void weed(double maxAllowableOffsetFactor)
          Generalizes using a small tolerance based upon either the system units of the geometry's spatial reference, or the geometry's bounding box.
 
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

IPolycurveProxy

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

IPolycurveProxy

public IPolycurveProxy()
For internal use only


IPolycurveProxy

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

IPolycurveProxy

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

IPolycurveProxy

protected IPolycurveProxy(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

densify

public void densify(double maxSegmentLength,
                    double maxDeviation)
             throws java.io.IOException,
                    AutomationException
Description copied from interface: IPolycurve
Converts this polycurve into a piecewise linear approximation of itself.

Supported Platforms

Windows, Solaris, Linux

Description

Converts Polycurve into a Polycurve composed of Line segments with length maxSegmentLength (or less) that are within maxDeviation of the original polycurve.  If maxDeviation = 0, maxDeviation is ignored and Line segments with length maxSegmentLength are constructed with vertices laying on the original curve.  All of the segments in the final polyline will be Lines.

Remarks

If the maxSegmentLength is negative IGeometryEnvironment::AutoDensifyTolerance is used. IGeometryEnvironment::AutoDensifyTolerance default value is 0. This value can be explicitly set via IGeometryEnvironment::AutoDensifyTolerance.

If the maxDeviation is negative IGeometryEnvironment::DeviationAutoDensifyTolerance is used. The default value is 2*XYResolution * 100 (2/XYUnits * 100). This value can be explicitly set via IGeometryEnvironment::DeviationAutoDensifyTolerance.

In order to avoid the creation of too many segments,  the geometry system uses a maxdeviation = 2*xyResolution * 100 as default value if maxSegmentLength is 0 and the maxDeviation is 0.

If the maxDeviation is positive but smaller than 2*XYResolution of the spatial reference then the maxDeviation used is 2*XYResolution * 100

NOTE: The default values given in this topic are subject to change without notice. If specific values want to be maintained we recommend using the methods on IGeometryEnvironment to set those explicitly.

The start and end points are always honored and remain the same as for the original feature.

Polycurve Densify Example

Specified by:
densify in interface IPolycurve
Parameters:
maxSegmentLength - The maxSegmentLength (in)
maxDeviation - The maxDeviation (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

generalize

public void generalize(double maxAllowableOffset)
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IPolycurve
Generalizes this polycurve using the Douglas-Poiker algorithm.

Supported Platforms

Windows, Solaris, Linux

Description

Generalizes each part of a Polycurve into a generalized collection of Line segments.  Generalize performs a Douglas-Poiker Generalization algorithm with a specified maximum offset tolerance given as input.  For Line segments, the Generalized output is a subset of the original input vertices.  For non-Linear segments, the Generalized output contains points along all parts of the curve, not necessarily only the vertices.

Remarks

For polycurve with non-linear segments, the output curve may contain more vertices than the input curve, but all output segments will be linear.

IPolycurve Generalize Example

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

weed

public void weed(double maxAllowableOffsetFactor)
          throws java.io.IOException,
                 AutomationException
Description copied from interface: IPolycurve
Generalizes using a small tolerance based upon either the system units of the geometry's spatial reference, or the geometry's bounding box.

Supported Platforms

Windows, Solaris, Linux

Description

Weed Generalizes each part of a Polycurve into a generalized collection of Line segments.  Weed performs a Douglas-Poiker Generalization algorithm with a specified multiple of the internal tolerance given as input.  For Line segments, the Generalized output is a subset of the original input vertices.  For non-Linear segments, the Generalized output contains points along all parts of the curve, not necessarily only the vertices.

Remarks

For polycurve with non-linear segments, the output curve may contain more vertices than the input curve, but all output segments will be linear.

Weed(X) = Generalize(X * InternalTolerance)

IPolycurve Weed Example

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

smooth

public void smooth(double maxAllowableOffset)
            throws java.io.IOException,
                   AutomationException
Description copied from interface: IPolycurve
Converts this curve into a smooth curve containing only Bezier curve segments.

Supported Platforms

Windows, Solaris, Linux

Description

Converts the Polycurve into a Polycurve containing only BezierCurve segments. If the maxAllowableOffset parameter is zero, each segment of the input Polycurve becomes a separate Bezier curve. If maxAllowableOffset if greater than zero, the polycurve is generalized first by the Douglas-Poiker method using the maxAllowableOffset value. Bezier curves are then created for each of the remaining segments. The created BezierCurve polycurve is an approximation of the original polycurve. At each vertex, the adjoining BezierCurves have complementary tangents which creates a continuous (smooth) transition between segments.

As an alternative, compare IConstructCurve2::ApproximateByBeziers.

Remarks

 

IPolycurve Smooth Example

Specified by:
smooth in interface IPolycurve
Parameters:
maxAllowableOffset - The maxAllowableOffset (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
See Also:
IBezierCurve

splitAtPoint

public void splitAtPoint(IPoint splitPoint,
                         boolean projectOnto,
                         boolean createPart,
                         boolean[] splitHappened,
                         int[] newPartIndex,
                         int[] newSegmentIndex)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IPolycurve
Introduces a new vertex into this polyline at the location on it closest to the input point.

Supported Platforms

Windows, Solaris, Linux

Description

Adds a new vertex along the curve as the specified input point, or the projection onto the curve of the specified input point.

Remarks

projectOnto is an input parameter that determines if the output point will be located on the polycurve. If projectOnto is true and the input point is not already on the polycurve then the point is projected on the curve.

createPart is an input parameter that determines if parts (paths) have to be created. createPart must be FALSE for polygons.  For polylines, if createPart is TRUE, the part on which the new split point falls is split into two parts with the newly added vertex serving as the end of the first part and the beginning of the second.

SplitHappened is an output parameter that tells if the polycurve has been split or not.

newPartIndex is an output parameter that tells on which part (ring or path) the point has been introduced.

newSegmentIndex is an output parameter that tells what is the index of the new created segment. That index is zero based and part relative (start at 0 for each part).

 

SplitAtPoint Example

Specified by:
splitAtPoint in interface IPolycurve
Parameters:
splitPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
projectOnto - The projectOnto (in)
createPart - The createPart (in)
splitHappened - The splitHappened (out: use single element array)
newPartIndex - The newPartIndex (out: use single element array)
newSegmentIndex - The newSegmentIndex (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

splitAtDistance

public void splitAtDistance(double distance,
                            boolean asRatio,
                            boolean createPart,
                            boolean[] splitHappened,
                            int[] newPartIndex,
                            int[] newSegmentIndex)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IPolycurve
Introduces a new vertex into this polyline at a specified distance from the beginning of the polyline.

Supported Platforms

Windows, Solaris, Linux

Description

Adds a new vertex point to the curve at a specified distance from the From point of the curve.  For a split to happen, the split distance must be between the From and To points of the polycurve.

Remarks

CreatePart must be FALSE for polygons.  For polylines, if CreatePart is TRUE, the part on which the new split point falls is split into two parts with the newly added vertex serving as the end of the first part and the beginning of the second.

 

SplitAtDistance Example

Specified by:
splitAtDistance in interface IPolycurve
Parameters:
distance - The distance (in)
asRatio - The asRatio (in)
createPart - The createPart (in)
splitHappened - The splitHappened (out: use single element array)
newPartIndex - The newPartIndex (out: use single element array)
newSegmentIndex - The newSegmentIndex (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.