Click or drag to resize

TerrainAlongLineComputeTerrainIntersection Method (Cartographic, UnitCartesian, Double, Double, TerrainProvider)

Computes the location of the first intersection with terrain from the provided location along the indicated direction. The DefaultMinimumTerrainHeight and DefaultMaximumTerrainHeight are used for the computation.

Namespace:  AGI.Foundation.Terrain
Assembly:  AGI.Foundation.TerrainAnalysis (in AGI.Foundation.TerrainAnalysis.dll) Version: 21.2.409.0 (21.2.409.0)
Syntax
public static Cartographic? ComputeTerrainIntersection(
	Cartographic cartographic,
	UnitCartesian direction,
	double granularity,
	double maximumDistance,
	TerrainProvider terrainProvider
)

Parameters

cartographic
Type: AGI.Foundation.CoordinatesCartographic
The planetodetic cartographic representation of the location expressed in the reference frame fixed to the ellipsoid specified by the Shape property of the terrainProvider.
direction
Type: AGI.Foundation.CoordinatesUnitCartesian
The direction along which to check for intersection with terrain.
granularity
Type: SystemDouble
The sampling step as a positively valued fraction of the terrain resolution.
maximumDistance
Type: SystemDouble
A positively valued limit on the distance in meters along the indicated direction at which intersection with terrain is no longer checked.
terrainProvider
Type: AGI.Foundation.TerrainTerrainProvider
The terrain provider describing the terrain that is potentially obscuring the path between the two objects.

Return Value

Type: NullableCartographic
The planetodetic location of intersection with terrain expressed in the reference frame fixed to the ellipsoid specified by the Shape property of the terrainProvider or null if no intersection exists. The provided location may be returned as the point of intersection if it lies on the terrain surface and the indicated direction is directly into the terrain surface.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown if terrainProvider is .
See Also