This document is archived and information here might be outdated.  Recommended version.


ISurface.QuerySurfaceLength Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IS > ISurface Interface > ISurface.QuerySurfaceLength Method
ArcGIS Developer Help

ISurface.QuerySurfaceLength Method

Returns the length of an input polyline measured on the surface.

[Visual Basic .NET]
Public Sub QuerySurfaceLength ( _
    ByVal pShape As IGeometry, _
    ByRef pLength As Double, _
    [ByRef pStepSize As Object] _
)
[C#]
public void QuerySurfaceLength (
    IGeometry pShape,
    ref double pLength,
    ref object pStepSize
);
[C++]
HRESULT QuerySurfaceLength(
  IGeometry* pShape,
  System.Double* pLength,
  Variant* pStepSize
);
[C++]
Parameters
pShape [in]

pShape is a parameter of type IGeometry* pLength [out]
pLength is a parameter of type double* pStepSize [in, optional]
pStepSize is a parameter of type VARIANT*

Product Availability

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

Description

Returns the 3D length of the polyline by interpolating heights from the surface and calculating the sum of 3D distances between the vertices. Portions of the line falling outside the interpolation zone are excluded from the calculation.

The stepSize argument isn't very important when the surface is a TIN as the default sampling scheme of using input vertices and triangle edge intersections is sufficient to capture all surface information. If the surface is a raster it becomes more important. Generally, the smaller the interval the greater the detail (unless smaller than 1/2 cellsize), but at an increased cost in processing time and size of resulting geometry. The default stepSize for raster based surface is set equal to the cellsize.

See Also

ISurface Interface