STK ObjectsSend comments on this topic.
GetAltitudesBetweenPointsAtResolution Method (IAgCentralBodyTerrainCollectionElement)
See Also
SWLatitude
SWLongitude
NELatitude
NELongitude
StepSize
DistanceType
AltRef
Windows





Windows & Linux

Description

Returns the terrain profile at the specified resolution relative to the input reference surface. If a position along the profile is outside terrain sources, the altitude of 0.0 relative to the default reference ellipsoid (WGS84 for Earth) is used.

Syntax

[Visual Basic .NET]
Public Function GetAltitudesBetweenPointsAtResolution( _
    ByVal SWLatitude As System.Object, _
    ByVal SWLongitude As System.Object, _
    ByVal NELatitude As System.Object, _
    ByVal NELongitude As System.Object, _
    ByVal StepSize As System.Object, _
    ByVal DistanceType As AgEDistanceOnSphere, _
    ByVal AltRef As AgEAltRefType _
) As System.Array
[C#]
public System.Array GetAltitudesBetweenPointsAtResolution(
    System.Object SWLatitude,
    System.Object SWLongitude,
    System.Object NELatitude,
    System.Object NELongitude,
    System.Object StepSize,
    AgEDistanceOnSphere DistanceType,
    AgEAltRefType AltRef
);
[Managed C++]
public: System::Array GetAltitudesBetweenPointsAtResolution(
    VARIANT SWLatitude,
    VARIANT SWLongitude,
    VARIANT NELatitude,
    VARIANT NELongitude,
    VARIANT StepSize,
    AgEDistanceOnSphere DistanceType,
    AgEAltRefType AltRef
);
[Unmanaged C++]
public: HRESULT GetAltitudesBetweenPointsAtResolution(
    VARIANT SWLatitude,
    VARIANT SWLongitude,
    VARIANT NELatitude,
    VARIANT NELongitude,
    VARIANT StepSize,
    AgEDistanceOnSphere DistanceType,
    AgEAltRefType AltRef,
    SAFEARRAY * * ppRetVal
);
[Java]
public AgSafeArray getAltitudesBetweenPointsAtResolution(
    AgVariant SWLatitude,
    AgVariant SWLongitude,
    AgVariant NELatitude,
    AgVariant NELongitude,
    AgVariant StepSize,
    AgEDistanceOnSphere DistanceType,
    AgEAltRefType AltRef
);
[Python - STK API ]
def GetAltitudesBetweenPointsAtResolution(self, SWLatitude:typing.Any, SWLongitude:typing.Any, NELatitude:typing.Any, NELongitude:typing.Any, StepSize:typing.Any, DistanceType:"AgEDistanceOnSphere", AltRef:"AgEAltRefType") -> list:

Parameters

SWLatitude
SWLongitude
NELatitude
NELongitude
StepSize
DistanceType
AltRef

See Also

Example

Gets the altitude profile of the terrain.
[C#]
IAgScenario scenario = (IAgScenario)root.CurrentScenario;

// If you haven't done so, add the terrain to your scenario (for example .PDTT)
IAgCentralBodyTerrainCollectionElement earthTerrain = scenario.Terrain["Earth"];
IAgTerrain terrain = earthTerrain.TerrainCollection.Add(terrainFile, AgETerrainFileType.ePDTTTerrainFile);

// Get diagonal altitude profile using the max resolution of the terrain file.
Array terrainProfile = earthTerrain.GetAltitudesBetweenPointsAtResolution(terrain.SWLatitude, terrain.SWLongitude, terrain.NELatitude, terrain.NELongitude, terrain.Resolution, AgEDistanceOnSphere.eDistanceOnSphereGreatCircle, AgEAltRefType.eMSL);

// GetAltitudesBetweenPointsAtResolution returns a two dimensional array of lat lon alt values.
int numPoints = terrainProfile.GetLength(0);
for (int i = 0; i < numPoints; ++i)
{
    Console.WriteLine("Latitude={0}, Longitude={1}, Altitude={2}", terrainProfile.GetValue(i, 0), terrainProfile.GetValue(i, 1), terrainProfile.GetValue(i, 2));
}
Gets the altitude profile of the terrain.
[Visual Basic .NET]
© 2024 Analytical Graphics, Inc. All Rights Reserved.