GetSurfaceLength(Multipart,SurfaceInterpolationMethod,Double,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.
This method must be called on the MCT. Use QueuedTask.Run.
Parameters
- multipart
- The multipart to calculate the 3D length for.
- interpolationMethod
- The method of interpolation. The default method of interpolation for TINs is SurfaceInterpolationMethod.Linear.
- stepSize
- A densification parameter. If specified, the multipart will be densified by the value prior to
interpolating heights from the surface.
- profileWeedTolerance
- A 2D distance filter to prevent oversampled output. If specified, this value ensures that no two consecutive
vertices will be closer than this distance. Use 0 to turn off weeding.
Return Value
the 3D length of the multipart.
Get 3D length of multipart by interpolating heights
var tinLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<TinLayer>().FirstOrDefault();
await QueuedTask.Run(() =>
{
// interpolate heights and calculate the sum of 3D distances between the vertices
double length3d = tinLayer.GetSurfaceLength(polygon, SurfaceInterpolationMethod.NaturalNeighbor);
// or use a different interpolation method
length3d = tinLayer.GetSurfaceLength(polyline, SurfaceInterpolationMethod.NaturalNeighborZNearest);
// densify the shape before interpolating
length3d = tinLayer.GetSurfaceLength(polygon, SurfaceInterpolationMethod.NaturalNeighbor, 0.01, 0);
});
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3.4 or higher.