com.esri.arcgis.geometry
Class IPolygonProxy

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
                  extended bycom.esri.arcgis.geometry.IPolygonProxy
All Implemented Interfaces:
java.io.Externalizable, ICurve, IGeometry, IPolycurve, IPolygon, java.io.Serializable
Direct Known Subclasses:
IPolygon2Proxy

public class IPolygonProxy
extends IPolycurveProxy
implements IPolygon, java.io.Serializable

Provides access to members that identify a polygon and permit controlled access to its inner and outer rings.

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
  IPolygonProxy()
          For internal use only
  IPolygonProxy(java.lang.Object obj)
           
protected IPolygonProxy(java.lang.Object obj, java.lang.String iid)
           
  IPolygonProxy(java.lang.String CLSID, java.lang.String host, AuthInfo authInfo)
           
protected IPolygonProxy(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 close()
          Closes all rings in this polygon.
 IRing findExteriorRing(IRing interiorRing)
          Returns the exterior ring containing the specified interior ring.
 int getExteriorRingCount()
          The number of exterior rings.
 int getInteriorRingCount(IRing exteriorRing)
          The number of rings interior to the specified exterior ring.
 void queryExteriorRings(IRing exteriorRings)
          Populates an array with references to all exterior rings.
 void queryInteriorRings(IRing exteriorRing, IRing interiorRings)
          Populates an array with references to rings that are interior to the specified exterior ring.
 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 simplifyPreserveFromTo()
          Simplifies the polygon and maintains the index location of the from/to point of each ring.
 
Methods inherited from class com.esri.arcgis.geometry.IPolycurveProxy
densify, generalize, smooth, splitAtDistance, splitAtPoint, weed
 
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.IPolycurve
densify, generalize, smooth, splitAtDistance, splitAtPoint, weed
 
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

IPolygonProxy

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

IPolygonProxy

public IPolygonProxy()
For internal use only


IPolygonProxy

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

IPolygonProxy

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

IPolygonProxy

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

findExteriorRing

public IRing findExteriorRing(IRing interiorRing)
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IPolygon
Returns the exterior ring containing the specified interior ring.

Supported Platforms

Windows, Solaris, Linux

Description

Returns the Exterior Ring to which the input Interior Ring belongs.  Every interior ring belongs to one and only one exterior ring.

Remarks

 

IPolygon FindExteriorRing Example

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

getExteriorRingCount

public int getExteriorRingCount()
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: IPolygon
The number of exterior rings.

Supported Platforms

Windows, Solaris, Linux

Description

Returns the number of Exterior Rings that are part of the polygon.  Exterior Rings have a clockwise orientation.

Remarks

 

IPolygon ExteriorRingCount Example

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

queryExteriorRings

public void queryExteriorRings(IRing exteriorRings)
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: IPolygon
Populates an array with references to all exterior rings. This method does not marshall correctly out-of-proc. Use QueryExteriorRingsEx on the IPolygon2 interface instead.

Supported Platforms

Windows, Solaris, Linux

Description

Returns an array of IRings containing all of the Exterior Rings in the Polygon.  Whenever possible, IPolygon2::QueryExteriorRingsEx should be used instead to ensure proper functionality and better control of the returned array.

Remarks

Note : That method only accepts an array of type IRing for exteriorRings. Using an array of IRing2 won't work.

IPolygon QueryExteriorRings Example

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

getInteriorRingCount

public int getInteriorRingCount(IRing exteriorRing)
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: IPolygon
The number of rings interior to the specified exterior ring.

Supported Platforms

Windows, Solaris, Linux

Description

Returns the number of Interior Rings within the given Exterior Ring.  Interior Rings have a counterclockwise orientation.

Remarks

 

IPolygon InteriorRingCount Example

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

queryInteriorRings

public void queryInteriorRings(IRing exteriorRing,
                               IRing interiorRings)
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: IPolygon
Populates an array with references to rings that are interior to the specified exterior ring. This method does not marshall correctly out-of-proc. Use QueryInteriorRingsEx on the IPolygon2 interface instead.

Supported Platforms

Windows, Solaris, Linux

Description

Returns an array of IRings containing all Interior Rings belonging to a specified input Exterior Ring.  Whenever possible, IPolygon2::QueryInteriorRingsEx should be used to ensure proper functionality and better control of the returned array.

Remarks

Note : That method only accepts an array of type IRing for interiorRings. Using an array of IRing2 won't work.

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

close

public void close()
           throws java.io.IOException,
                  AutomationException
Description copied from interface: IPolygon
Closes all rings in this polygon. The resulting polygon may not be simple.

Supported Platforms

Windows, Solaris, Linux

Description

Closes all Rings in the Polygon by adding a Segment between the To Point and From Point of each Ring if those points are not already identical.  This may result in a non-simple Polygon with Rings crossing each other.  Also, this only closes the last segment and does not fix improperly constructed Rings.

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

simplifyPreserveFromTo

public void simplifyPreserveFromTo()
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: IPolygon
Simplifies the polygon and maintains the index location of the from/to point of each ring.

Supported Platforms

Windows, Solaris, Linux

Description

SimplifyPreserveFromTo simplifies the polygon in the same manner as the ITopologicalOperator method Simplify, but once simplification is complete, SimplifyPreserveFromTo reorients each ring such that the original From/To points of each preexisting ring are in the simplified result.  Newly created rings are not reoriented.

Remarks

 

SimplifyPreserveFromTo Example

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