public SurfaceValues GetSurfaceValues( MapPoint point )
Public Function GetSurfaceValues( _ ByVal point As MapPoint _ ) As SurfaceValues
Parameters
- point
- The point location.
public SurfaceValues GetSurfaceValues( MapPoint point )
Public Function GetSurfaceValues( _ ByVal point As MapPoint _ ) As SurfaceValues
Exception | Description |
---|---|
System.ArgumentNullException | point is null or empty. |
MappingException | An exception occurred within the GetSurfaceValues calculation. |
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
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.
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; });
Target Platforms: Windows 11, Windows 10