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 ITerrain66.CoordinateSystem for information.

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

Note:    Progress will be received on the standard OnAnalysisProgress event, including the option to abort. In cases where the extent of progress is unknown, this event will serve as an indeterminate progress notification (indicating that the process is still running) and provide a mechanism to abort.

 

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.

DimensionY

The height, in pixels, of the raster array.

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.