Click or drag to resize

TerrainProviderGetGradient Method

Get the interpolated gradient of height with respect to the terrain at the specified longitude and latitude relative to the provider's Shape. This method produces a vector representing the gradient of height in the ShapeFixedFrame.

Note: The direction for the gradient is defined for use as the outward facing surface normal direction. To obtain the directional derivative for the height (rate of change of height with respect to time), take the negative gradient and dot it with a unit vector along the desired azimuth (change in height with respect to distance), times the speed along that direction in meters/second.

The gradient, as defined above, is parallel to the upward facing terrain surface normal, but its magnitude indicates the rate of change in the height at that location.

Namespace:  AGI.Foundation.Terrain
Assembly:  AGI.Foundation.Models (in AGI.Foundation.Models.dll) Version: 19.1.398.0 (19.1.398.0)
Syntax
public Cartesian GetGradient(
	double longitude,
	double latitude
)

Parameters

longitude
Type: SystemDouble
The longitude, in radians. Requesting a gradient for a longitude less than -PI or greater than PI will always return NaN.
latitude
Type: SystemDouble
The latitude, in radians. Requesting a gradient for a latitude less than -PI/2 or greater than PI/2 will always return NaN.

Return Value

Type: Cartesian
The gradient vector in the ShapeFixedFrame at the given location, with units of meters of height per meters of surface distance.
See Also