ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TinLayer Class / GetSurfaceValues Method
The point location.
Example Version

GetSurfaceValues Method (TinLayer)
Gets elevation, slope and aspect values from the surface at the specified xy location. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public SurfaceValues GetSurfaceValues( 
   MapPoint point
)

Parameters

point
The point location.

Return Value

Exceptions
ExceptionDescription
point is null or empty.
An exception occurred within the GetSurfaceValues calculation.
This method or property must be called within the lambda passed to QueuedTask.Run.
Remarks
Linear interpolation is used to return the z value or elevation.

GetSurfaceValues will handle differences in spatial reference between the input point and the surface. It will project (a copy of) the input point to match the surface for the sake of interpolation.

Example
Get Elevation, Slope, Aspect from TIN layer at a location
var tinLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<TinLayer>().FirstOrDefault();
await QueuedTask.Run(() =>
{
  // get elevation, slope and aspect values
  SurfaceValues values = tinLayer.GetSurfaceValues(mapPoint);
  var elev = values.Elevation;
  var slopeRadians = values.Slope;
  var slopeDegrees = values.SlopeDegrees;
  var slopePercent = values.SlopePercent;
  var aspectRadians = values.Aspect;
  var aspectDegrees = values.AspectDegrees;
});
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3.4 or higher.
See Also