The terrain accessor class Terrainaccessor provides a variety of interface interface for terrain (elevation) Terrain (elevation) access, and is the base class for Nltterrainaccessor classes. The class diagram is as follows.
The main processing methods provided by the base class Terrainaccessor are briefly described below:
protected string M_name; Terrain Model Name
protected double M_north; Terrain North Border
protected double M_south; Terrain Southern Border
protected double m_east; Eastern boundary of terrain
protected double m_west; Western border of topography
public abstract float Getelevationat (double latitude, double longitude, double targetsamplesperdegree), abstract function with a given longitude, Latitude and the resolution precision of the reference frame at that location to obtain a floating-point elevation value. Returns 0 if no tiles are available on the disk. The derived class must implement the function.
The public virtual float Getelevationat (double latitude, double longitude) virtual function obtains floating-point elevation values with a given latitude and longitude. Returns 0 if no tiles are available on the disk. The inside is actually called the above abstract function. Derived classes can overload the function to suit their needs.
Public virtual Terraintile Getelevationarray (double North, double south, double west, double east, int samples) virtual functions through the given terrain area Domain bounding box and resolution to get an array of elevations. Returns tiles representing the elevation of the specified terrain. Derived classes can overload the function to suit their needs.
The derived class nltterrainaccessor is used to read the terrain/elevation data NLT stored in the Bil file.
WorldWind Source Analysis Series: Terrain accessor class Terrainaccessor