ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / RasterLayer Class / GetSurfaceLength Method / GetSurfaceLength(Multipart,Double) Method
The multipart to calculate the 3D length for.
A densification parameter. If specified, the multipart will be densified by the value prior to interpolating heights from the raster surface.
Version

GetSurfaceLength(Multipart,Double) Method
Gets the 3D length of the multipart by interpolating heights from the surface and calculating the sum of 3D distances between the vertices. Bilinear interpolation is used. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public double GetSurfaceLength( 
   Multipart multipart,
   double stepSize
)

Parameters

multipart
The multipart to calculate the 3D length for.
stepSize
A densification parameter. If specified, the multipart will be densified by the value prior to interpolating heights from the raster surface.

Return Value

the 3D length of the multipart.
Exceptions
ExceptionDescription
multipart is null.
An exception occurred within the GetSurfaceLength calculation.
This method or property must be called within the lambda passed to QueuedTask.Run.
Remarks
Portions of the multipart falling outside the interpolation zone are excluded from the calculation.

Input polylines and polygons are densified by the stepSize. This takes place before interpolating heights from the surface. If specified, this value ensures that no two vertices are spaced more than stepSize apart.

Specifying stepSize should be considered with a raster. Generally, the smaller the stepSize the greater the detail (unless smaller than 1/2 the raster cellsize), but at an increased cost in processing time and size of resulting geometry. The default stepSize for a raster based surface is set equal to the raster cellsize.

Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3.4 or higher.
See Also