GlsMap Toolkit  1.7.0
disti::DTEDMapChartDataSource Class Reference

#include <gls_map_dted.h>

+ Inheritance diagram for disti::DTEDMapChartDataSource:

Public Member Functions

 DTEDMapChartDataSource ()
 
virtual ~DTEDMapChartDataSource ()
 
virtual bool GetAvailableCoverage (GeoRect *dest) DISTI_METHOD_OVERRIDE
 
void GetCellList (const GeoRect &coverage, unsigned long layerID, double viewLogicalHeight, double viewGeoHeight, MapChartCellList &viewList) DISTI_METHOD_OVERRIDE
 
virtual bool AreAllCellsLoaded (GlsMapView *view, GlsMapChart *chart) DISTI_METHOD_OVERRIDE
 
void AddDataFile (const std::string &filename)
 
void AddAllFiles (const std::string &directory, bool recurse)
 
short GetElevationDataPoint (double latDegs, double lonDegs)
 
short GetElevationDataPoint (GeoCoord coord)
 
void SetAircraftHeight (short aircraftHeight)
 
void SetDiffuseTerrainLayerEnabled (bool enabled)
 
void SetDiffuseTerrainLayerLightDirection (float x, float y, float z)
 
void SetDiffuseTerrainLayerTransparency (unsigned char alpha)
 
void SetTerrainLayerEnabled (bool enabled)
 
void SetTerrainLayerIntensityRange (unsigned char lowValue, unsigned char highValue)
 
void SetTerrainLayerElevationRange (short lowValue, short highValue)
 
void SetTerrainLayerTransparency (unsigned char alpha)
 
void SetTerrainLayerWaterEnabled (bool enabled)
 
void SetTerrainLayerWaterColor (const glsColor &waterColor)
 
void SetBandingLayerEnabled (bool enabled)
 
void SetBandingLayerBandCount (unsigned int numberOfBands)
 
void SetBandingLayerBandColor (unsigned int bandIndex, const glsColor &bandColor)
 
void SetBandingLayerBandDistance (unsigned int bandIndex, unsigned short bandDistance)
 
void SetContourLayerEnabled (bool enabled)
 
void SetContourLayerDrawPriority (bool drawOnTop)
 
void SetContourLayerInterval (unsigned short interval)
 
void SetContourLayerLineColor (const glsColor &lineColor)
 
void SetContourLayerLineThickness (unsigned char lineThickness)
 
void SetContourLayerHighQuality (bool highQuality)
 
void SetThreatLayerEnabled (bool enabled)
 
void SetThreatLayerBand (unsigned int bandIndex)
 
void SetThreatLayerThreatEnabled (unsigned int threatIndex, bool enabled)
 
void SetThreatLayerThreatLocation (unsigned int threatIndex, GeoCoord location)
 
void SetThreatLayerThreatRadius (unsigned int threatIndex, double sightRadius)
 
void SetThreatLayerThreatLethalityRadius (unsigned int threatIndex, double lethalityRadius)
 
void SetThreatLayerThreatDetectionRadius (unsigned int threatIndex, double detectionRadius)
 
void SetThreatLayerThreatHeight (unsigned int threatIndex, double height)
 
void SetThreatLayerColor (const glsColor &threatColor)
 
void SetThreatLayerAlgorithmRingEnabled (bool enabled)
 
void SetThreatLayerLethalityRingEnabled (bool enabled)
 
void SetThreatLayerDetectionRingEnabled (bool enabled)
 
void SetThreatLayerAlgorithmRingDashesEnabled (bool enabled)
 
void SetThreatLayerAlgorithmRingColor (glsColor &ringColor)
 
void SetThreatLayerLethalityRingColor (glsColor &ringColor)
 
void SetThreatLayerDetectionRingColor (glsColor &ringColor)
 
void SetThreatLayerAlgorithmRingThickness (unsigned char lineThickness)
 
void SetThreatLayerLethalityRingThickness (unsigned char lineThickness)
 
void SetThreatLayerDetectionRingThickness (unsigned char lineThickness)
 
bool HasWorkerThreadFinishedForArea (const GeoRect &rect)
 
void RemoveData (void)
 
- Public Member Functions inherited from disti::GlsMapChartDataSource
virtual ~GlsMapChartDataSource ()
 
virtual unsigned long GetBestLayer (GlsMapView *view, GlsMapChart *chart) const
 
virtual void PostDraw (GlsMapView *view, GlsMapChart *chart)
 

Additional Inherited Members

- Protected Member Functions inherited from disti::GlsMapChartDataSource
 GlsMapChartDataSource ()
 

Detailed Description

Runtime implementation of a DTEDMapChartDataSource

Constructor & Destructor Documentation

DTEDMapChartDataSource::DTEDMapChartDataSource ( )

Constructor

DTEDMapChartDataSource::~DTEDMapChartDataSource ( )
virtual

Destructor

Member Function Documentation

void DTEDMapChartDataSource::AddAllFiles ( const std::string &  directory,
bool  recurse 
)

Reads in all compatble DTED files within the specified directory and adds their data to the data source.

Parameters
directoryThe path of the directory containing the files to be read in
recursetrue if the file search should decend into child directories, false otherwise
void DTEDMapChartDataSource::AddDataFile ( const std::string &  filename)

Reads in a single DTED file and adds its data to the data source.

Parameters
filenameThe path and name of the file to be read in
bool DTEDMapChartDataSource::AreAllCellsLoaded ( GlsMapView view,
GlsMapChart chart 
)
virtual
bool DTEDMapChartDataSource::GetAvailableCoverage ( GeoRect dest)
virtual
void DTEDMapChartDataSource::GetCellList ( const GeoRect coverage,
unsigned long  layerID,
double  viewLogicalHeight,
double  viewGeoHeight,
MapChartCellList &  viewList 
)
virtual
short DTEDMapChartDataSource::GetElevationDataPoint ( double  latDegs,
double  lonDegs 
)

Retrieves one data point from the currently loaded data. Performs interpolation if the requested location is between data points.

Parameters
latDegsThe latitude of the height data point to retrieve, in degrees
lonDegsThe longitude of the height data point to retrieve, in degrees
Returns
The terrain height at the specified location, or DTED_NULL_ELEVATION_VALUE if no data is available for that location.
short DTEDMapChartDataSource::GetElevationDataPoint ( GeoCoord  coord)

Retrieves one data point from the currently loaded data. Performs interpolation if the requested location is between data points.

Parameters
coordThe GeoCoord structure containing the location of the data point
Returns
The terrain height at the specified location, or DTED_NULL_ELEVATION_VALUE if no data is available for that location.
bool DTEDMapChartDataSource::HasWorkerThreadFinishedForArea ( const GeoRect rect)
Returns
whether the worker threads have finished running
Parameters
rectThe region that all cells that should be done with are in
void DTEDMapChartDataSource::SetAircraftHeight ( short  aircraftHeight)

Sets the current height of the aircraft for use in the elevation banding and threat region rendering. This value is measured in meters above sea level. Negative height values represent elevations below sea level.

Parameters
aircraftHeightThe current height of the aircraft
void DTEDMapChartDataSource::SetBandingLayerBandColor ( unsigned int  bandIndex,
const glsColor &  bandColor 
)

Sets the render color of one of the terrain elevation bands.

Parameters
bandIndexThe zero-based index of the band to set the color of. Must be in the range 0 - 15.
bandColorThe color to use when rendering the specified elevation band.
void DTEDMapChartDataSource::SetBandingLayerBandCount ( unsigned int  numberOfBands)

Sets the number of bands to use in the elevation banding rendering.

Parameters
numberOfBandsThe number of elevation bands. Must be in the range 1 - 16, inclusive.
void DTEDMapChartDataSource::SetBandingLayerBandDistance ( unsigned int  bandIndex,
unsigned short  bandDistance 
)

Sets the 'distance' for one of the terrain elevation bands. This value represents the number of meters between the low and high boundaries for the elevation band. (Or, in the case of the top elevation band, the number of meters between the bottom of the band and the aircraft height.)

Parameters
bandIndexThe zero-based index of the band to set the distance of. Must be in the range 0 - 15.
bandDistanceThe band's distance value, measured in meters.
void DTEDMapChartDataSource::SetBandingLayerEnabled ( bool  enabled)

Enables or disables rendering of the Terrain Elevation Banding.

Parameters
enabledtrue if banding should be rendered, false if it should not
void DTEDMapChartDataSource::SetContourLayerDrawPriority ( bool  drawOnTop)

Sets the draw priority of the contour lines. If this value is set to true, the contour lines are drawn on top of all other map elements. If false, the contour lines are drawn on top of the terrain but underneath the elevation banding and threat regions.

Parameters
drawOnToptrue to draw contour lines on top, false otherwise
void DTEDMapChartDataSource::SetContourLayerEnabled ( bool  enabled)

Enables or disables rendering of the Terrain Contour Lines.

Parameters
enabledtrue if contour lines should be rendered, false if they should not
void DTEDMapChartDataSource::SetContourLayerHighQuality ( bool  highQuality)

Sets the 'quality' of the contour lines. If this value is false, contour lines are only drawn at elevation data point boundaries. If this value is true, bilinear interpolation is used to calculate contour lines within the elevation point boundaries.

Parameters
highQualitytrue to use interpolation for contour lines, false otherwise
void DTEDMapChartDataSource::SetContourLayerInterval ( unsigned short  interval)

Sets the elevation interval for the contour lines, in meters. A contour line is rendered wherever the terrain elevation crosses any integer multiple of this value.

Parameters
intervalThe interval distance, in meters. Must be at least 1.
void DTEDMapChartDataSource::SetContourLayerLineColor ( const glsColor &  lineColor)

Sets the render color for the contour lines.

Parameters
lineColorThe color to use when rendering contour lines
void DTEDMapChartDataSource::SetContourLayerLineThickness ( unsigned char  lineThickness)

Sets the thickness of the rendered contour lines, in pixels.

Parameters
lineThicknessThe contour line thickness in pixels
void DTEDMapChartDataSource::SetDiffuseTerrainLayerEnabled ( bool  enabled)

Enables or disables rendering of the diffuse shaded terrain.

Parameters
enabledtrue if terrain should be rendered shaded, false if it should not
void DTEDMapChartDataSource::SetDiffuseTerrainLayerLightDirection ( float  x,
float  y,
float  z 
)

Sets the direction of the light (not position) used in the diffuse terrain layer.

Parameters
xThe X value of the direction vector.
yThe Y value of the direction vector.
zThe Z value of the direction vector.
void DTEDMapChartDataSource::SetDiffuseTerrainLayerTransparency ( unsigned char  alpha)

Sets the transparency for the diffuse terrain.

Parameters
alphaThe terrain's alpha color component. 0-255 range.
void DTEDMapChartDataSource::SetTerrainLayerElevationRange ( short  lowValue,
short  highValue 
)

Sets the elevation range for the terrain. Elevation values outside of this range are clamped to the nearest value within the range. Mapping of terrain elevation values to grayscale intensity values is performed using linear interpolation, with the low and high elevation values mapped to the low and high intensity values, respectively.

Parameters
lowValueThe elevation lower limit value.
highValueThe elevation upper limit value. Must be greater than or equal to the low value.
void DTEDMapChartDataSource::SetTerrainLayerEnabled ( bool  enabled)

Enables or disables rendering of the height terrain.

Parameters
enabledtrue if terrain should be rendered, false if it should not
void DTEDMapChartDataSource::SetTerrainLayerIntensityRange ( unsigned char  lowValue,
unsigned char  highValue 
)

Sets the intensity range for the terrain. The brightness of the terrain pixels will always be within this range. Mapping of terrain elevation values to grayscale intensity values is performed using linear interpolation, with the low and high elevation values mapped to the low and high intensity values, respectively.

Parameters
lowValueThe lowest intensity value used to render the terrain. Must be at least 1.
highValueThe highest intensity value used to render the terrain. Must be greater than or equal to the low value.
void DTEDMapChartDataSource::SetTerrainLayerTransparency ( unsigned char  alpha)

Sets the transparency for the height terrain.

Parameters
alphaThe terrain's alpha color component. 0-255 range.
void DTEDMapChartDataSource::SetTerrainLayerWaterColor ( const glsColor &  waterColor)

Sets the color of the water for water rendering mode. If water rendering mode is enabled, all elevation values at or below sea level (elevation zero) are considered to be 'water' and are rendered using this color. This is set for both height and diffuse terrain.

Parameters
waterColorThe color to use for rendering water
void DTEDMapChartDataSource::SetTerrainLayerWaterEnabled ( bool  enabled)

Enables or disables water rendering mode. If enabled, all elevation values at or below sea level (elevation zero) are considered to be 'water', and are rendered using the water color.

Parameters
enabledtrue if water mode should be enabled, false if disabled
void DTEDMapChartDataSource::SetThreatLayerAlgorithmRingColor ( glsColor &  ringColor)

Sets the render color of the 'Algorithm' threat ring.

Parameters
ringColorThe color to use when rendering the threat ring
void DTEDMapChartDataSource::SetThreatLayerAlgorithmRingDashesEnabled ( bool  enabled)

Enables or disables rendering of dashes on the 'Algorithm' threat ring.

Parameters
enabledtrue to enable dashes, false to disable them
void DTEDMapChartDataSource::SetThreatLayerAlgorithmRingEnabled ( bool  enabled)

Enables or disables rendering of the 'Algorithm' threat ring.

Parameters
enabledtrue to enable the ring, false to disable it
void DTEDMapChartDataSource::SetThreatLayerAlgorithmRingThickness ( unsigned char  lineThickness)

Sets the thickness of the 'Algorithm' threat ring, in pixels.

Parameters
lineThicknessThe threat ring line thickness in pixels
void DTEDMapChartDataSource::SetThreatLayerBand ( unsigned int  bandIndex)

Sets the elevation band priority for the threat regions. This value indicates which terrain elevation bands that the threat regions should take render priority over. Any elevation bands with an index equal to or higher than this value are visually superseded by the presense of a threat region. For example, if this value is 2, then the first two elevation bands are always displayed, even within threatened regions, but the threat regions are displayed instead of the third (and subsequent) bands.

Parameters
bandIndexThe index of the elevation band which the threat region should visually override. Must be in the range 0 - 15, inclusive.
void DTEDMapChartDataSource::SetThreatLayerColor ( const glsColor &  threatColor)

Sets the render color of the threat regions.

Parameters
threatColorThe color to use when rendering the threat regions
void DTEDMapChartDataSource::SetThreatLayerDetectionRingColor ( glsColor &  ringColor)

Sets the render color of the 'Detection' threat ring.

Parameters
ringColorThe color to use when rendering the threat ring
void DTEDMapChartDataSource::SetThreatLayerDetectionRingEnabled ( bool  enabled)

Enables or disables rendering of the 'Detection' threat ring.

Parameters
enabledtrue to enable the ring, false to disable it
void DTEDMapChartDataSource::SetThreatLayerDetectionRingThickness ( unsigned char  lineThickness)

Sets the thickness of the 'Detection' threat ring, in pixels.

Parameters
lineThicknessThe threat ring line thickness in pixels
void DTEDMapChartDataSource::SetThreatLayerEnabled ( bool  enabled)

Enables or disables rendering of the Threat Intervisibility regions.

Parameters
enabledtrue if threat regions should be rendered, false if they should not
void DTEDMapChartDataSource::SetThreatLayerLethalityRingColor ( glsColor &  ringColor)

Sets the render color of the 'Lethality' threat ring.

Parameters
ringColorThe color to use when rendering the threat ring
void DTEDMapChartDataSource::SetThreatLayerLethalityRingEnabled ( bool  enabled)

Enables or disables rendering of the 'Lethality' threat ring.

Parameters
enabledtrue to enable the ring, false to disable it
void DTEDMapChartDataSource::SetThreatLayerLethalityRingThickness ( unsigned char  lineThickness)

Sets the thickness of the 'Lethality' threat ring, in pixels.

Parameters
lineThicknessThe threat ring line thickness in pixels
void DTEDMapChartDataSource::SetThreatLayerThreatDetectionRadius ( unsigned int  threatIndex,
double  detectionRadius 
)

Sets the radius of a threat's 'Detection' area. A circle of this radius is drawn centered on the threat's location.

Parameters
threatIndexThe zero-based index of the threat to set the range of. Must be in the range 0 - 15, inclusive.
detectionRadiusThe radius of the detection circle, measured in meters.
void DTEDMapChartDataSource::SetThreatLayerThreatEnabled ( unsigned int  threatIndex,
bool  enabled 
)

Enables or disables one of the threat sources for the threat region rendering. A disabled threat never generates any threat region.

Parameters
threatIndexThe zero-based index of the threat to enable or disable. Must be in the range 0 - 15, inclusive.
enabledtrue to enable the threat, false to disable it
void DTEDMapChartDataSource::SetThreatLayerThreatHeight ( unsigned int  threatIndex,
double  height 
)

Sets a threat's height. This value is added to the threat's altitude to determine it's elevation for the threat intervisibility calculation.

Parameters
threatIndexThe zero-based index of the threat to set the height of. Must be in the range 0 - 15, inclusive.
heightThe height of the threat, in meters.
void DTEDMapChartDataSource::SetThreatLayerThreatLethalityRadius ( unsigned int  threatIndex,
double  lethalityRadius 
)

Sets the radius of a threat's 'Lethality' area. A circle of this radius is drawn centered on the threat's location.

Parameters
threatIndexThe zero-based index of the threat to set the range of. Must be in the range 0 - 15, inclusive.
lethalityRadiusThe radius of the lethality circle, measured in meters.
void DTEDMapChartDataSource::SetThreatLayerThreatLocation ( unsigned int  threatIndex,
GeoCoord  location 
)

Sets the position of a threat source. The location structure contains the latitude (degrees), longitude (degrees), and altitude (meters) of the threat.

Parameters
threatIndexThe zero-based index of the threat to set the location of. Must be in the range 0 - 15, inclusive.
locationThe structure containing the threat's new location.
void DTEDMapChartDataSource::SetThreatLayerThreatRadius ( unsigned int  threatIndex,
double  sightRadius 
)

Sets the radius of a threat's 'Algorithm' area. Locations outside of this range are not considered in the line-of-sight calculations.

Parameters
threatIndexThe zero-based index of the threat to set the range of. Must be in the range 0 - 15, inclusive.
sightRadiusThe distance at which this source can threaten, measured in meters.

The documentation for this class was generated from the following files: