MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLDTEDTerrainDatabase Class Reference
Inheritance diagram for TSLDTEDTerrainDatabase:

Detailed Description

This class is a specialised version of TSLTerrainDatabase used for directly loading DTED data, either via a DMED file or individual cells, into a terrain database for querying. This class functions like TSLTerrainDatabase, except for the following:

  • Before any data can be loaded into this class, it must be unlocked using TSLUtilityFunctions::unlockSupport( TSLKeyedDMEDTerrainDatabase, key ), using the licence key provided by Envitia.
  • Terrain databases generated from MapLink Studio cannot be loaded into this class.
  • Multiple DTED or DMED files may be loaded into a single terrain database using the append method.

If DTED datasets of different resolution are loaded into the same terrain database (e.g. DTED0 and DTED1), the terrain database interally assigns these to layers based on the resolution of the data, in a similar fashion to terrain databases generated via MapLink Studio. See the 'How does this work? section from the MapLink developer guide for a more detailed explanation.

When datasets of different resolution are loaded into the terrain database, the layer that is queried is controlled by the displayExtent function, in the following order:

  1. The first layer that covers the requested extent and has a resolution at least equal to that requested is used.
  2. If no layer satisfies 1, the most detailed layer that covers the requested extent is used.
  3. If no layer satisfies 2, the first layer that covers at least part of the requested extent and has a resolution at least equal to that requested is used.
  4. If no layer satisfies 3, the most detailed layer that covers at least part of the requested extent is used.

The queried layer may also be set manually, via the setCurrentLayer method.

The coordinate system of DTED terrain databases is always latitude/longitude. The queryCoordinateSystem() method will always return NULL.

Public Member Functions

 TSLDTEDTerrainDatabase ()
 
virtual ~TSLDTEDTerrainDatabase ()
 
TSLTerrainReturn append (const char *filename)
 
virtual TSLTerrainDatabase::TSLTerrainDatabaseTypeEnum type () const
 
- Public Member Functions inherited from TSLTerrainDatabase
 TSLTerrainDatabase ()
 
virtual ~TSLTerrainDatabase ()
 
void cacheSize (unsigned int newSize)
 
unsigned int cacheSize () const
 
virtual void close ()
 
virtual TSLTerrainReturn displayExtent (int wndWidth, int wndHeight, double x1, double y1, double x2, double y2)
 
TSLTerrainReturn findLOSIntersection (double startLatitude, double startLongitude, double startAltitude, double suppressionAngle, double bearing, double sampleDistance, bool allowForCurvatureOfEarth, bool useHighestResolution, double maximumAltitude, TSLTerrainInterpolate interpolate, bool &intercepts, double &interceptLatitude, double &interceptLongitude, double &interceptAltitude, bool ignoreNull=false, bool local=false)
 
virtual int getCurrentLayer () const
 
virtual TSLTerrainDatabaseLayergetLayerAt (int index) const
 
virtual bool isOpen ()
 
TSLTerrainReturn latLongToMU (double latitude, double longitude, double *x, double *y, bool local=false)
 
TSLTerrainReturn MUToLatLong (double x, double y, double *latitude, double *longitude, bool local=false, bool boundCheck=true)
 
virtual int numberOfLayers () const
 
virtual TSLTerrainReturn open (const char *filename, const TSLPathList *pathList=0)
 
double postDistance (double x1, double y1, double x2, double y2, bool highestRes)
 
virtual TSLTerrainReturn query (double x, double y, TSLTerrainDataItem *dataItem, TSLTerrainData_LEVEL filter=TSLTerrainData_Min, bool highestRes=false, TSLTerrainInterpolate interpolate=TSLTerrainInterpolate_NONE)
 
virtual TSLTerrainReturn queryArea (double x1, double y1, double x2, double y2, int numX, int numY, TSLTerrainDataItem *data, TSLTerrainData_LEVEL filter=TSLTerrainData_Min, bool highestRes=false, TSLTerrainInterpolate interpolate=TSLTerrainInterpolate_NONE)
 
virtual TSLTerrainReturn queryAreaForViewshed (double x1, double y1, double x2, double y2, int numX, int numY, double nullDataValue, double *data, TSLTerrainData_LEVEL filter=TSLTerrainData_Min, bool highestRes=false, TSLTerrainInterpolate interpolate=TSLTerrainInterpolate_NONE)
 
double queryAverageElevation (double startLatitude, double startLongitude, double endLatitude, double endLongitude, double width, bool vincenty=false, bool straightLine=false, int numPoints=0, int numPointsWidth=0, bool highestRes=false, TSLTerrainInterpolate interpolate=TSLTerrainInterpolate_NONE, bool local=false)
 
virtual TSLCoordinateSystemqueryCoordinateSystem ()
 
virtual TSLTerrainReturn queryExtent (double &x1, double &y1, double &x2, double &y2)
 
virtual TSLTerrainReturn queryLine (double x1, double y1, double x2, double y2, int numPoints, TSLTerrainDataItem *data, TSLTerrainData_LEVEL filter=TSLTerrainData_Min, bool highestRes=false, TSLTerrainInterpolate interpolate=TSLTerrainInterpolate_NONE, bool latLonCrossesDateline=false)
 
virtual bool setCurrentLayer (int index)
 

Additional Inherited Members

- Public Types inherited from TSLTerrainDatabase
enum  TSLTerrainDatabaseTypeEnum { TSLTerrainDatabaseTypeStandard , TSLTerrainDatabaseTypeDTED }
 
- Protected Attributes inherited from TSLTerrainDatabase
TerrainDatabase * m_terrainDB
 

Constructor & Destructor Documentation

◆ TSLDTEDTerrainDatabase()

TSLDTEDTerrainDatabase::TSLDTEDTerrainDatabase ( )

◆ ~TSLDTEDTerrainDatabase()

virtual TSLDTEDTerrainDatabase::~TSLDTEDTerrainDatabase ( )
virtual

Member Function Documentation

◆ append()

TSLTerrainReturn TSLDTEDTerrainDatabase::append ( const char * filename)

Adds the given file to the set of data used by this terrain database. This must be either a DMED file or a DTED file. It is not necessary to call open on the terrain database first.

Parameters
filenameThe full path to the DMED or DTED file to append to the datasets used by the database.
Returns
TSLTerrain_OK if successful, otherwise an error code.

◆ type()

virtual TSLTerrainDatabase::TSLTerrainDatabaseTypeEnum TSLDTEDTerrainDatabase::type ( ) const
virtual

Returns the type of this terrain database.

Reimplemented from TSLTerrainDatabase.