This document is archived and information here might be outdated. Recommended version. |
Returns volume and/or area above or below an input z value.
[Visual Basic .NET] Public Sub GetVolumeAndArea ( _ ByVal pAOI As IGeometry, _ ByVal Resolution As Double, _ ByVal reference As Double, _ ByVal Type As esriPlaneReferenceType, _ ByVal pTrackCancel As ITrackCancel, _ ByRef pbIsOutsideDataArea As Boolean, _ [ByRef pVolume As Object], _ [ByRef pSurfaceArea As Object], _ [ByRef pProjectedArea As Object] _ )
[C#] public void GetVolumeAndArea ( IGeometry pAOI, double Resolution, double reference, esriPlaneReferenceType Type, ITrackCancel pTrackCancel, ref bool pbIsOutsideDataArea, ref object pVolume, ref object pSurfaceArea, ref object pProjectedArea );
[C++]
HRESULT GetVolumeAndArea(
IGeometry* pAOI,
double Resolution,
double reference,
esriPlaneReferenceType Type,
ITrackCancel* pTrackCancel,
Boolean* pbIsOutsideDataArea,
Variant* pVolume,
Variant* pSurfaceArea,
Variant* pProjectedArea
);
[C++] Parameters pAOI [in]
pAOI is a parameter of type IGeometry* Resolution [in]
Resolution is a parameter of type double reference [in]
reference is a parameter of type double Type [in]
Type is a parameter of type esriPlaneReferenceType pTrackCancel [in]
pTrackCancel is a parameter of type ITrackCancel* pbIsOutsideDataArea [out]
pbIsOutsideDataArea is a parameter of type bool* pVolume
pVolume is a parameter of type VARIANT* pSurfaceArea
pSurfaceArea is a parameter of type VARIANT* pProjectedArea
pProjectedArea is a parameter of type VARIANT*
Returns the volume and/or area that falls between the surface and a plane of a given height. Values can be calculated using the entire surface or using only that portion within an envelope or polygon.
pAOI is the area of interest. It can be set to NULL (nOthing in VB), in which case the entire surface is considered. It can also be set to either an envelope or polygon. These limit that calculation to a given area.
Resolution is used to indicate which pyramid level of the surface to use. This should match the resolution of an existing pyramid level. If there's not an exact match the next highest level that's actually in the terrain will be used.
Reference is the height, or z value, of the plane the calculation will be relative to.
Type is used to control whether the calculation is made for the area below the plane and the top side of the surface or above the plane and the bottom of the surface.
pTrackCancel is a reference to a CancelTracker and permits the user to interrupt the process. You can pass NULL (Nothing in VB) to bypass this functioanlity.
pVolume is an optional output. If used, it should be specified with a double. The volume represents the cubic area between the plane and the surface. You control if it's the volume below the plane and the top of the surface or the above the plane and the underside of the surface via the Type parameter. If you're not interested in volume you can avoid computational effort by omitting this.
pSurfaceArea is an optional output. If used, it should be specified with a double. The surface area is the area of the surface, taking slope into consideration, that, depending on the setting of the Type parameter, is either underneath or above the given plane. Surface area is always greater than projected area unless the surface is flat. If you're not interested in surface area you can avoid computational effort by omitting this.
pProjectedArea is an optional output. If used, it should be specified with a double. The area is the 2D portion of the surface that, depending on the setting of the Type parameter, is either underneath or above the given plane. Projected area is always less than surface area unless the surface is flat. If you're not interested in area you can avoid computational effort by omitting this.