ArcObjects Library Reference (GeoDatabaseExtensions)  

IDynamicSurface2.InterpolateShape Method

Interpolates z values for a defined geometric shape.

[Visual Basic .NET]
Public Sub InterpolateShape ( _
    ByVal pInShape As IGeometry, _
    ByVal Resolution As Double, _
    ByVal Type As esriSurfaceInterpolationType, _
    ByVal pTrackCancel As ITrackCancel, _
    ByRef ppOutShape As IGeometry, _
    [ByRef pStepSize As Object] _
)
[C#]
public void InterpolateShape (
    IGeometry pInShape,
    double Resolution,
    esriSurfaceInterpolationType Type,
    ITrackCancel pTrackCancel,
    ref IGeometry ppOutShape,
    ref object pStepSize
);
[C#]

Optional Values

pStepSize   To indicate that this parameter is undefined, first define a variable object Missing = Type.Missing; then pass this in as ref Missing.
[C++]
HRESULT InterpolateShape(
  IGeometry* pInShape,
  double Resolution,
  esriSurfaceInterpolationType Type,
  ITrackCancel* pTrackCancel,
  IGeometry** ppOutShape,
  VARIANT* pStepSize
);
[C++]

Parameters

pInShape [in]

  pInShape is a parameter of type IGeometry

Resolution [in]   Resolution is a parameter of type double Type [in]

  Type is a parameter of type esriSurfaceInterpolationType

pTrackCancel [in]

  pTrackCancel is a parameter of type ITrackCancel

ppOutShape [out]

  ppOutShape is a parameter of type IGeometry

pStepSize [optional]   pStepSize is a parameter of type VARIANT

  To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.

Product Availability

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

Description

pInShape is the input geometry for which heights will be interpolated. The shape types supported are points, multipoints, polylines, and polygons.

Resolution controls which pyramid level of the terrain to use as a surface. Depending on the type of filter used to generate the terrain pyramid, resolution represents either the z-tolerance or window size of the desired pyramid level. Pass a value of 0.0 to use the full resolution surface.

Type is used to control which interpolant is applied; linear or natural neighbors.

pTrackCancel supports process interruption. This can be set to NULL ('Nothing' in VB).

pOutShape is a placeholder for the resulting 3D geometry. It does not need to reference an instantiated, empty geometry. The geometry will be created by the function. The result will be NULL ('Nothing' in VB) if the input geometry does not have any overlap with the 2D extent of the surface.

stepSize is used to densify input polylines and polygon boundaries. If stepsize is omitted input polylines and polygon boundaries will be densified where they intersect terrain triangle edges. Typically, stepSize should be omitted when using linear interpolation because the 'natural' densification applied with triangle edges is sufficient to capture what information is available in the surface.

 

Notes

This function is best used to interpolate heights for one feature that crosses over multiple terrain tiles which, at the desired resolution, can't all be held in memory.  An alternative is IDynamicSurface2.InterpolateFeatureClass, which is optimized for processing multiple features. If multiple features fall within an extent of the terrain which can be held in memory (estimate this using ITerrain.GetPointCount) then consider using IDynamicSurface.GetTin followed by ISurface.InterpolateShape on the TIN. Another approach would be to retreive a TIN using ITerrainLayer.GetCurrentSurface followed by ISurface.InterpolateShape on the TIN if the current representation of a terrain layer's surface is sufficient.

See Also

IDynamicSurface2 Interface