QueryElevationBuffer

This method returns an array of elevation values for a designated area of the terrain. The query includes all ground objects, modify terrain objects, 3DML, etc. that are currently loaded on the terrain. If a layer is being streamed, this QueryElevationBuffer only returns elevation values for features that were already streamed at the time this method is called.

The designated area’s coordinates and coordinate system units should be passed in the coordinate system of the terrain and they are not translated by ICoordServices.SourceCoordinateSystem like other places in the API. See ITerrain80.CoordinateSystem for information.

Note:    Make sure the terrain opacity is set to 100% (ITerrain.Opacity = 1) before calling this method.

 

JavaScript

 

 

 

QueryElevationBuffer (

       UpperLeftX,

       UpperLeftY,

       ResX,

       ResY,

       DimensionX,

       DimensionY)

 

C#

 

 

 

dynamic QueryElevationBuffer (

       double UpperLeftX,

       double UpperLeftY,

       double ResX,

       double ResY,

       int DimensionX,

       int DimensionY)

 

C++

 

 

 

HRESULT QueryElevationBuffer (

       double UpperLeftX,

       double UpperLeftY,

       double ResX,

       double ResY,

       long DimensionX,

       long DimensionY,

       VARIANT* pVal)

Parameters

UpperLeftX

The West-East coordinate of the elevation layer’s upper left corner in the terrain coordinate system.

UpperLeftY

The North-South coordinate of the elevation layer’s upper left corner in the terrain coordinate system.

ResX

The X cell resolution in the terrain coordinate system units.

ResY

The Y cell resolution in the terrain coordinate system units.

DimensionX

The width, in pixels, of the raster array. This value can range from 512-2048.

DimensionY

The height, in pixels, of the raster array. This value can range from 512-2048.

Return Value

pVal

SafeArray of float values representing the elevation values in the designated area. The values are stored in the array in typewriter order, beginning with the UpperLeftX, UpperLeftY coordinate.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.