ElevationMaskFromTerrain Method (TerrainProvider, Double, Double, Cartographic, Double, Double, Double, Boolean, ITrackCalculationProgress) | 
 
            Computes elevation masks from the specified terrain provider along the provided azimuths with progress tracking.
            
 
    Namespace: 
   AGI.Foundation.Terrain
    Assembly:
   AGI.Foundation.Models (in AGI.Foundation.Models.dll) Version: 25.1.421.0 (25.1.421.0)
Syntaxpublic static List<ElevationMask> FromTerrain(
	TerrainProvider provider,
	double minimumTerrainHeight,
	double maximumTerrainHeight,
	Cartographic observerPosition,
	double stepSize,
	double maximumSearchAngle,
	double[] azimuths,
	bool multithreadComputations,
	ITrackCalculationProgress tracker
)
Public Shared Function FromTerrain ( 
	provider As TerrainProvider,
	minimumTerrainHeight As Double,
	maximumTerrainHeight As Double,
	observerPosition As Cartographic,
	stepSize As Double,
	maximumSearchAngle As Double,
	azimuths As Double(),
	multithreadComputations As Boolean,
	tracker As ITrackCalculationProgress
) As List(Of ElevationMask)
public:
static List<ElevationMask^>^ FromTerrain(
	TerrainProvider^ provider, 
	double minimumTerrainHeight, 
	double maximumTerrainHeight, 
	Cartographic observerPosition, 
	double stepSize, 
	double maximumSearchAngle, 
	array<double>^ azimuths, 
	bool multithreadComputations, 
	ITrackCalculationProgress^ tracker
)
static member FromTerrain : 
        provider : TerrainProvider * 
        minimumTerrainHeight : float * 
        maximumTerrainHeight : float * 
        observerPosition : Cartographic * 
        stepSize : float * 
        maximumSearchAngle : float * 
        azimuths : float[] * 
        multithreadComputations : bool * 
        tracker : ITrackCalculationProgress -> List<ElevationMask> 
Parameters
- provider
 - Type: AGI.Foundation.TerrainTerrainProvider
The source of terrain from which to compute the masks. - minimumTerrainHeight
 - Type: SystemDouble
            The minimum height in meters that can be returned by the
            TerrainProvider's GetHeightRelativeToShape(Double, Double) method.
            Setting this value lower than necessary will not affect the results, but it will decrease
            performance.  Setting it too high can cause incorrect results.
             - maximumTerrainHeight
 - Type: SystemDouble
            The maximum height in meters that can be returned by the
            TerrainProvider's GetHeightRelativeToShape(Double, Double) method.
            Setting this value higher than necessary will not affect the results, but it will decrease
            performance.  Setting it too low can cause incorrect results.
             - observerPosition
 - Type: AGI.Foundation.CoordinatesCartographic
The planetodetic position of the stationary observer at which the masks are computed. - stepSize
 - Type: SystemDouble
The size of the step along each azimuth ray, in radians. - maximumSearchAngle
 - Type: SystemDouble
The maximum angle, in radians, to move along each azimuth ray in constructing the masks. - azimuths
 - Type: SystemDouble
The azimuths, in radians, along which to compute the elevation masks. - multithreadComputations
 - Type: SystemBoolean
Indicates whether the computations should be multithreaded. - tracker
 - Type: AGI.FoundationITrackCalculationProgress
            The object to which progress is reported and that is able to cancel this operation before it is complete, or .
            When reporting progress, the 'additionalInformation' parameter to ReportProgress(Int32, Object) will be .
             
Return Value
Type: 
ListElevationMaskThe elevation masks corresponding to each of the 
azimuths.
Exceptions
Remarks
            This method works by casting a ray out from the observerPosition along a specified direction to
            determine the minimum elevation angle that is visible above the terrain in that direction.  More specifically,
            the various distances at which the minimum elevation angle increases in that direction are determined.
            
stepSize is the distance between steps along the ray, in radians.  A reasonable value for this
            parameter would sample approximately three times per terrain grid cell.
            
maximumSearchAngle is the maximum angle, in radians, to move along each ray.  In other words,
            this parameter indicates the stopping point for sampling along the ray.  A reasonable value will take into account
            the difference between the maximum and minimum heights of terrain provided by provider and
            potentially how close together the minimum and maximum heights are located.
            
ExamplesThe following example shows one way this value might be chosen:
double approximateHeightOfMtEverest = 8850.0;
double semimajorAxisLength = WorldGeodeticSystem1984.Shape.SemimajorAxisLength;
double maximumSearchAngle = Math.Acos(semimajorAxisLength / (semimajorAxisLength + approximateHeightOfMtEverest));
See Also