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

In This Topic
    SurfaceInterpolationMethod Enumeration
    In This Topic
    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
    {
      // Note: Needs QueuedTask to run
      // Note: Needs 3d Analyst license to run
      {
        ArcGIS.Core.Geometry.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 vertices
    {
      // Note: Needs QueuedTask to run
      // Note: Needs 3d Analyst license to 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
    {
      // Note: Needs QueuedTask to run
      // Note: Needs 3d Analyst license to 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
    {
      // Note: Needs QueuedTask to 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 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.4 or higher.
    See Also