| GlsMap Toolkit 1.10.1

Public Member Functions | List of all members
disti::DTEDMapChartDataSource Class Reference
DTED

`#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 bool | GetAvailableCoverage (GeoRect *dest)=0
virtual unsigned long | GetBestLayer (GlsMapView *view, GlsMapChart *chart) const
virtual void | GetCellList (const GeoRect &coverage, unsigned long layerID, double viewLogicalHeight, double viewGeoHeight, MapChartCellList &viewList)=0
virtual void | PostDraw (GlsMapView *view, GlsMapChart *chart)
virtual bool | AreAllCellsLoaded (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::DTEDMapChartDataSource | ( |  | ) |

Constructor

## ◆ ~DTEDMapChartDataSource()

DTEDMapChartDataSource::~DTEDMapChartDataSource | ( |  | ) |
| virtual

Destructor

## Member Function Documentation

## ◆ AddAllFiles()

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

  directory | The path of the directory containing the files to be read in
  recurse | true if the file search should decend into child directories, false otherwise

## ◆ AddDataFile()

void DTEDMapChartDataSource::AddDataFile | ( | const std::string & | filename | ) |

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

Parameters

  filename | The path and name of the file to be read in

## ◆ AreAllCellsLoaded()

bool DTEDMapChartDataSource::AreAllCellsLoaded | ( | GlsMapView * | view,
|  | GlsMapChart * | chart
| ) |  |
| virtual

See also
  GlsMapChartDataSource

Reimplemented from disti::GlsMapChartDataSource.

## ◆ GetAvailableCoverage()

bool DTEDMapChartDataSource::GetAvailableCoverage | ( | GeoRect * | dest | ) |
| virtual

See also
  GlsMapChartDataSource

Implements disti::GlsMapChartDataSource.

## ◆ GetCellList()

void DTEDMapChartDataSource::GetCellList | ( | const GeoRect & | coverage,
|  | unsigned long | layerID,
|  | double | viewLogicalHeight,
|  | double | viewGeoHeight,
|  | MapChartCellList & | viewList
| ) |  |
| virtual

See also
  GlsMapChartDataSource

Implements disti::GlsMapChartDataSource.

## ◆ GetElevationDataPoint() [1/2]

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

  latDegs | The latitude of the height data point to retrieve, in degrees
  lonDegs | The 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.

## ◆ GetElevationDataPoint() [2/2]

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

  coord | The 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.

## ◆ HasWorkerThreadFinishedForArea()

bool DTEDMapChartDataSource::HasWorkerThreadFinishedForArea | ( | const GeoRect & | rect | ) |

Returns
  whether the worker threads have finished running

Parameters

  rect | The region that all cells that should be done with are in

## ◆ SetAircraftHeight()

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

  aircraftHeight | The current height of the aircraft

## ◆ SetBandingLayerBandColor()

void DTEDMapChartDataSource::SetBandingLayerBandColor | ( | unsigned int | bandIndex,
|  | const glsColor & | bandColor
| ) |  |

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

Parameters

  bandIndex | The zero-based index of the band to set the color of. Must be in the range 0 - 49.
  bandColor | The color to use when rendering the specified elevation band.

## ◆ SetBandingLayerBandCount()

void DTEDMapChartDataSource::SetBandingLayerBandCount | ( | unsigned int | numberOfBands | ) |

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

Parameters

  numberOfBands | The number of elevation bands. Must be in the range 1 - 50, inclusive.

## ◆ SetBandingLayerBandDistance()

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

  bandIndex | The zero-based index of the band to set the distance of. Must be in the range 0 - 49.
  bandDistance | The band's distance value, measured in meters.

## ◆ SetBandingLayerEnabled()

void DTEDMapChartDataSource::SetBandingLayerEnabled | ( | bool | enabled | ) |

Enables or disables rendering of the Terrain Elevation Banding.

Parameters

  enabled | true if banding should be rendered, false if it should not

## ◆ SetContourLayerDrawPriority()

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

  drawOnTop | true to draw contour lines on top, false otherwise

## ◆ SetContourLayerEnabled()

void DTEDMapChartDataSource::SetContourLayerEnabled | ( | bool | enabled | ) |

Enables or disables rendering of the Terrain Contour Lines.

Parameters

  enabled | true if contour lines should be rendered, false if they should not

## ◆ SetContourLayerHighQuality()

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

  highQuality | true to use interpolation for contour lines, false otherwise

## ◆ SetContourLayerInterval()

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

  interval | The interval distance, in meters. Must be at least 1.

## ◆ SetContourLayerLineColor()

void DTEDMapChartDataSource::SetContourLayerLineColor | ( | const glsColor & | lineColor | ) |

Sets the render color for the contour lines.

Parameters

  lineColor | The color to use when rendering contour lines

## ◆ SetContourLayerLineThickness()

void DTEDMapChartDataSource::SetContourLayerLineThickness | ( | unsigned char | lineThickness | ) |

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

Parameters

  lineThickness | The contour line thickness in pixels

## ◆ SetDiffuseTerrainLayerEnabled()

void DTEDMapChartDataSource::SetDiffuseTerrainLayerEnabled | ( | bool | enabled | ) |

Enables or disables rendering of the diffuse shaded terrain.

Parameters

  enabled | true if terrain should be rendered shaded, false if it should not

## ◆ SetDiffuseTerrainLayerLightDirection()

void DTEDMapChartDataSource::SetDiffuseTerrainLayerLightDirection | ( | float | x,
|  | float | y,
|  | float | z
| ) |  |

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

Parameters

  x | The X value of the direction vector.
  y | The Y value of the direction vector.
  z | The Z value of the direction vector.

## ◆ SetDiffuseTerrainLayerTransparency()

void DTEDMapChartDataSource::SetDiffuseTerrainLayerTransparency | ( | unsigned char | alpha | ) |

Sets the transparency for the diffuse terrain.

Parameters

  alpha | The terrain's alpha color component. 0-255 range.

## ◆ SetTerrainLayerElevationRange()

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

  lowValue | The elevation lower limit value.
  highValue | The elevation upper limit value. Must be greater than or equal to the low value.

## ◆ SetTerrainLayerEnabled()

void DTEDMapChartDataSource::SetTerrainLayerEnabled | ( | bool | enabled | ) |

Enables or disables rendering of the height terrain.

Parameters

  enabled | true if terrain should be rendered, false if it should not

## ◆ SetTerrainLayerIntensityRange()

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

  lowValue | The lowest intensity value used to render the terrain. Must be at least 1.
  highValue | The highest intensity value used to render the terrain. Must be greater than or equal to the low value.

## ◆ SetTerrainLayerTransparency()

void DTEDMapChartDataSource::SetTerrainLayerTransparency | ( | unsigned char | alpha | ) |

Sets the transparency for the height terrain.

Parameters

  alpha | The terrain's alpha color component. 0-255 range.

## ◆ SetTerrainLayerWaterColor()

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

  waterColor | The color to use for rendering water

## ◆ SetTerrainLayerWaterEnabled()

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

  enabled | true if water mode should be enabled, false if disabled

## ◆ SetThreatLayerAlgorithmRingColor()

void DTEDMapChartDataSource::SetThreatLayerAlgorithmRingColor | ( | glsColor & | ringColor | ) |

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

Parameters

  ringColor | The color to use when rendering the threat ring

## ◆ SetThreatLayerAlgorithmRingDashesEnabled()

void DTEDMapChartDataSource::SetThreatLayerAlgorithmRingDashesEnabled | ( | bool | enabled | ) |

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

Parameters

  enabled | true to enable dashes, false to disable them

## ◆ SetThreatLayerAlgorithmRingEnabled()

void DTEDMapChartDataSource::SetThreatLayerAlgorithmRingEnabled | ( | bool | enabled | ) |

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

Parameters

  enabled | true to enable the ring, false to disable it

## ◆ SetThreatLayerAlgorithmRingThickness()

void DTEDMapChartDataSource::SetThreatLayerAlgorithmRingThickness | ( | unsigned char | lineThickness | ) |

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

Parameters

  lineThickness | The threat ring line thickness in pixels

## ◆ SetThreatLayerBand()

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

  bandIndex | The index of the elevation band which the threat region should visually override. Must be in the range 0 - 49, inclusive.

## ◆ SetThreatLayerColor()

void DTEDMapChartDataSource::SetThreatLayerColor | ( | const glsColor & | threatColor | ) |

Sets the render color of the threat regions.

Parameters

  threatColor | The color to use when rendering the threat regions

## ◆ SetThreatLayerDetectionRingColor()

void DTEDMapChartDataSource::SetThreatLayerDetectionRingColor | ( | glsColor & | ringColor | ) |

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

Parameters

  ringColor | The color to use when rendering the threat ring

## ◆ SetThreatLayerDetectionRingEnabled()

void DTEDMapChartDataSource::SetThreatLayerDetectionRingEnabled | ( | bool | enabled | ) |

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

Parameters

  enabled | true to enable the ring, false to disable it

## ◆ SetThreatLayerDetectionRingThickness()

void DTEDMapChartDataSource::SetThreatLayerDetectionRingThickness | ( | unsigned char | lineThickness | ) |

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

Parameters

  lineThickness | The threat ring line thickness in pixels

## ◆ SetThreatLayerEnabled()

void DTEDMapChartDataSource::SetThreatLayerEnabled | ( | bool | enabled | ) |

Enables or disables rendering of the Threat Intervisibility regions.

Parameters

  enabled | true if threat regions should be rendered, false if they should not

## ◆ SetThreatLayerLethalityRingColor()

void DTEDMapChartDataSource::SetThreatLayerLethalityRingColor | ( | glsColor & | ringColor | ) |

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

Parameters

  ringColor | The color to use when rendering the threat ring

## ◆ SetThreatLayerLethalityRingEnabled()

void DTEDMapChartDataSource::SetThreatLayerLethalityRingEnabled | ( | bool | enabled | ) |

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

Parameters

  enabled | true to enable the ring, false to disable it

## ◆ SetThreatLayerLethalityRingThickness()

void DTEDMapChartDataSource::SetThreatLayerLethalityRingThickness | ( | unsigned char | lineThickness | ) |

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

Parameters

  lineThickness | The threat ring line thickness in pixels

## ◆ SetThreatLayerThreatDetectionRadius()

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

  threatIndex | The zero-based index of the threat to set the range of. Must be in the range 0 - 49, inclusive.
  detectionRadius | The radius of the detection circle, measured in meters.

## ◆ SetThreatLayerThreatEnabled()

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

  threatIndex | The zero-based index of the threat to enable or disable. Must be in the range 0 - 49, inclusive.
  enabled | true to enable the threat, false to disable it

## ◆ SetThreatLayerThreatHeight()

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

  threatIndex | The zero-based index of the threat to set the height of. Must be in the range 0 - 49, inclusive.
  height | The height of the threat, in meters.

## ◆ SetThreatLayerThreatLethalityRadius()

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

  threatIndex | The zero-based index of the threat to set the range of. Must be in the range 0 - 49, inclusive.
  lethalityRadius | The radius of the lethality circle, measured in meters.

## ◆ SetThreatLayerThreatLocation()

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

  threatIndex | The zero-based index of the threat to set the location of. Must be in the range 0 - 49, inclusive.
  location | The structure containing the threat's new location.

## ◆ SetThreatLayerThreatRadius()

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

  threatIndex | The zero-based index of the threat to set the range of. Must be in the range 0 - 49, inclusive.
  sightRadius | The distance at which this source can threaten, measured in meters.

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

- gls_map_dted.h
- gls_map_dted.cpp