ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TinLayer Class / CanInterpolateShape Method
The geometry to be interpolated. It must be a point, multipoint, polyline or polygon.
Example

In This Topic
    CanInterpolateShape Method (TinLayer)
    In This Topic
    Determines if values can be interpolated for the given geometry. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Function CanInterpolateShape( _
       ByVal geometry As Geometry _
    ) As Boolean
    public bool CanInterpolateShape( 
       Geometry geometry
    )

    Parameters

    geometry
    The geometry to be interpolated. It must be a point, multipoint, polyline or polygon.

    Return Value

    True if the shape can be interpolated. False otherwise.
    Remarks
    It is important to call this method prior to InterpolateShape(Geometry,SurfaceInterpolationMethod) or InterpolateShape(Geometry,SurfaceInterpolationMethod,Double,Double) to ensure that a possible result can be found given the set of input parameters.

    This method also checks for a 3D Analyst license which is required to perform the analysis.

    Note that if this method returns true it does not preclude the InterpolateShape method from throwing an exception due to a calculation error and callers should code defensively and use appropriate exception handling.
    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
        }
      }
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.4 or higher.
    See Also