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 );
Optional Values
[C++]
HRESULT QuerySurfaceLength(
IGeometry* pShape,
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 [optional] pStepSize is a parameter of type VARIANTTo indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.
Product Availability
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.