com.esri.arcgis.geometry
Interface IArea

All Superinterfaces:
Serializable
All Known Implementing Classes:
Envelope, MultiPatch, Polygon, Ring

public interface IArea
extends Serializable

Provides access to members that return properties common to rings and polygons.

Description

Use the IArea interface to get the Area of a Geometry. It can also be used to get the Centroid point and Label point for a Geometry.

Product Availability

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


Method Summary
 double getArea()
          The area.
 IPoint getCentroid()
          The center of gravity (centroid).
 IPoint getLabelPoint()
          A point guaranteed to be inside this area.
 void queryCentroid(IPoint center)
          Copies the centroid of this area to the specified point.
 void queryLabelPoint(IPoint labelPoint)
          Copies to the input point a point guaranteed to be inside this area.
 

Method Detail

getArea

double getArea()
               throws IOException,
                      AutomationException
The area.

Description

Returns the area enclosed between the Exterior Rings and the Interior Rings of the 2 (or 2.5) Dimensional geometry. Interior Rings return a negative Area.

Remarks

Area Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The area
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCentroid

IPoint getCentroid()
                   throws IOException,
                          AutomationException
The center of gravity (centroid).

Description

Returns the Centroid of the 2 (or 2.5) Dimensional figure. The Centroid is the center of the weighted area.

Remarks

The Centroid does not always occur inside the Area of the geometry. The Centroid is not the same as the center of the geometry or the Envelope binding the geometry (but it may be if and only if that is also the center of the weighted area).

Centroid Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IArea.queryCentroid(com.esri.arcgis.geometry.IPoint), IArea.getCentroid(), IArea.queryLabelPoint(com.esri.arcgis.geometry.IPoint), IArea.getLabelPoint()

getLabelPoint

IPoint getLabelPoint()
                     throws IOException,
                            AutomationException
A point guaranteed to be inside this area.

Description

Returns the Label Point of the object. The Label Point is the point at which the label is located. The Label Point is always located within the Area of the object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IArea.queryCentroid(com.esri.arcgis.geometry.IPoint), IArea.getCentroid(), IArea.queryLabelPoint(com.esri.arcgis.geometry.IPoint), IArea.getLabelPoint()

queryCentroid

void queryCentroid(IPoint center)
                   throws IOException,
                          AutomationException
Copies the centroid of this area to the specified point.

Description

Queries the Centroid of the 2 (or 2.5) Dimensional figure. The Centroid is the center of the weighted area. You must instantiate the Point before calling QueryCentroid. For example,

Dim pPoint as IPoint

Set pPoint = New Point

Remarks

The Centroid does not always occur inside the Area of the geometry. The Centroid is not the same as the center of the geometry or the Envelope binding the geometry (but it may be if and only if that is also the center of the weighted area).

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.

Centroid Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
center - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IArea.queryCentroid(com.esri.arcgis.geometry.IPoint), IArea.getCentroid(), IArea.queryLabelPoint(com.esri.arcgis.geometry.IPoint), IArea.getLabelPoint()

queryLabelPoint

void queryLabelPoint(IPoint labelPoint)
                     throws IOException,
                            AutomationException
Copies to the input point a point guaranteed to be inside this area.

Description

Queries the Label Point of the object. The Label Point is the point at which the label is located. The Label Point is always located within the Area of the object. You must instantiate the point before calling QueryLabelPoint. For example,


Dim pPoint as IPoint

Set pPoint = New Point

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.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
labelPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IArea.queryCentroid(com.esri.arcgis.geometry.IPoint), IArea.getCentroid(), IArea.queryLabelPoint(com.esri.arcgis.geometry.IPoint), IArea.getLabelPoint()