ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / SurfaceInterpolationMethod Enumeration
Example Example Version

SurfaceInterpolationMethod Enumeration
Interpolation method used for elevation calculations. See TinLayer.InterpolateShape and TinLayer.GetSurfaceLength.
Syntax
Members
MemberDescription
Linear Linear interpolation. The default.
NaturalNeighbor Natural neighbor interpolation.
NaturalNeighborInverseDistanceWeight Inverse Distance Weight based on natural neighbors.
NaturalNeighborZAverage Z closest to the average of all natural neighbor nodes.
NaturalNeighborZMax Maximum Z of all natural neighbor nodes.
NaturalNeighborZMin Minimum Z of all natural neighbor nodes.
NaturalNeighborZNearest Z value of the nearest node.
Example
Interpolate Shape
var tinLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<TinLayer>().FirstOrDefault();
await QueuedTask.Run(() =>
{
  Geometry output = null;
  // interpolate z values for a geometry
  if (tinLayer.CanInterpolateShape(polyline))
    output = tinLayer.InterpolateShape(polyline, SurfaceInterpolationMethod.NaturalNeighbor);

  if (output != null)
  {
    // process the output
  }


  // densify the shape before interpolating
  if (tinLayer.CanInterpolateShape(polygon))
    output = tinLayer.InterpolateShape(polygon, SurfaceInterpolationMethod.Linear, 0.01, 0);

  if (output != null)
  {
    // process the output
  }

});
Interpolate Shape Verticies
var tinLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<TinLayer>().FirstOrDefault();
await QueuedTask.Run(() =>
{
  // interpolate z values at the geometry vertices only
  Geometry output = tinLayer.InterpolateShapeVertices(polyline, SurfaceInterpolationMethod.NaturalNeighbor);
  if (output != null)
  {
    // process the output
  }

  // or use a different interpolation method
  output = tinLayer.InterpolateShapeVertices(polyline, SurfaceInterpolationMethod.Linear);
});
Interpolate Z at an x,y location
var tinLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<TinLayer>().FirstOrDefault();
await QueuedTask.Run(() =>
{
  // interpolate values at the specified x,y location
  double z = tinLayer.InterpolateZ(x, y, SurfaceInterpolationMethod.NaturalNeighborZNearest);

  // or use a different interpolation method
  z = tinLayer.InterpolateZ(x, y, SurfaceInterpolationMethod.Linear);
});
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);
});
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         ArcGIS.Desktop.Mapping.SurfaceInterpolationMethod

Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3.4 or higher.
See Also