GlsMap Toolkit  1.10.3
disti::ECRGMapChartDataSource Class Reference

#include <gls_map_ecrg.h>

+ Inheritance diagram for disti::ECRGMapChartDataSource:

Public Member Functions

GLSGEN_GLSMAPECRG_EXPORT ECRGMapChartDataSource (EcrgJustInTimeFileLoading isUsingJustInTime=ECRG_PROCESS_LATER)
 
GLSGEN_GLSMAPECRG_EXPORT void ParseDirectory (const char *directoryPath, EcrgParseDirectoryRules isUsingTocFile=FIND_ECRG_TOC)
 
GLSGEN_GLSMAPECRG_EXPORT void ParseDirectoryForLocation (const char *directoryPath, const double longitude, const double latitude, const double parseRadius)
 
GLSGEN_GLSMAPECRG_EXPORT unsigned int GetLayerCount () const
 
GLSGEN_GLSMAPECRG_EXPORT EcrgJustInTimeFileLoading IsEcrgJustInTimeFileLoadingEnabled () const
 
GLSGEN_GLSMAPECRG_EXPORT void SetTargetCellLoadRate (const double targetCellLoadRate)
 
GLSGEN_GLSMAPECRG_EXPORT double GetTargetCellLoadRate () const
 
GLSGEN_GLSMAPECRG_EXPORT std::set< EcrgDataSeriesCodeEnum > GetPopulatedLayers ()
 
GLSGEN_GLSMAPECRG_EXPORT bool GetAvailableCoverage (GeoRect *dest) DISTI_METHOD_OVERRIDE
 
GLSGEN_GLSMAPECRG_EXPORT unsigned long GetBestLayer (GlsMapView *view, GlsMapChart *chart) const DISTI_METHOD_OVERRIDE
 
GLSGEN_GLSMAPECRG_EXPORT void GetCellList (const GeoRect &coverage, const unsigned long layerID, double viewLogicalHeight, double viewGeoHeight, MapChartCellList &viewList) DISTI_METHOD_OVERRIDE
 
GLSGEN_GLSMAPECRG_EXPORT void SetEcrgLayer (const EcrgDataSeriesCodeEnum layer)
 
GLSGEN_GLSMAPECRG_EXPORT EcrgDataSeriesCodeEnum GetEcrgLayer (void)
 
GLSGEN_GLSMAPECRG_EXPORT void SetUseEcrgLayerFlag (bool layerFlag)
 
GLSGEN_GLSMAPECRG_EXPORT bool GetUseEcrgLayerFlag ()
 
GLSGEN_GLSMAPECRG_EXPORT void SetLayerCacheCount (const unsigned int cacheCount)
 
GLSGEN_GLSMAPECRG_EXPORT unsigned int GetLayerCacheCount () const
 
GLSGEN_GLSMAPECRG_EXPORT void CalcAvailableCoverage ()
 
GLSGEN_GLSMAPECRG_EXPORT Image * LoadCellImage (MapChartCell *cell)
 
- 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 PrepareCells ()
 
virtual void PostDraw (GlsMapView *view, GlsMapChart *chart)
 
virtual bool AreAllCellsLoaded (GlsMapView *view, GlsMapChart *chart)
 

Protected Member Functions

GLSGEN_GLSMAPECRG_EXPORT ECRGMapChartDataSource (const ECRGMapChartDataSource &)
 
GLSGEN_GLSMAPECRG_EXPORT const ECRGMapChartDataSource & operator= (const ECRGMapChartDataSource &)
 
- Protected Member Functions inherited from disti::GlsMapChartDataSource
 GlsMapChartDataSource ()
 

Detailed Description

The runtime implementation of an ECRGMapChartDataSource.

Member Function Documentation

◆ CalcAvailableCoverage()

void disti::ECRGMapChartDataSource::CalcAvailableCoverage ( )

Updates the coverage area that is returned by GetAvailableCoverage(). This is called automatically when something causes the coverage area to change.

Note
This method is slow; users of the class should not need to call it directly.

◆ GetAvailableCoverage()

bool disti::ECRGMapChartDataSource::GetAvailableCoverage ( GeoRect *  dest)
virtual

Sets a GeoRect to describe the area containing all areas covered by this MapDataSource. This area may change as different databases are loaded. Calling this method may be slow. \dest Pointer to a GeoRect to recieve the coverage.

Returns
true on success (dest contains the coverage description) or false if there was an error (dest is undefined)

Implements disti::GlsMapChartDataSource.

◆ GetBestLayer()

unsigned long disti::ECRGMapChartDataSource::GetBestLayer ( GlsMapView *  view,
GlsMapChart *  chart 
) const
virtual

Returns the cell layer ('zoom level') that best matches the given area

Parameters
viewThe GlsMapView used to draw the chart
chartThe GlsMapChart that is being drawn
Returns
The recommended layer to use
Note
Data sources that do not support layers should always return 0.

Reimplemented from disti::GlsMapChartDataSource.

◆ GetCellList()

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

Get the list of the available cells in a given coverage area The caller will AddRef() any of the cells that it will be holding a reference to

Parameters
coverageGeoRect describing the requested area
layerIDWhich layer to return MapCells from
viewLogicalHeightThe height of the view in logical units
viewGeoHeightThe height of the view in geographic units
viewListPointer MapChartCellList to recieve the list of available cells

Implements disti::GlsMapChartDataSource.

◆ GetEcrgLayer()

GLSGEN_GLSMAPECRG_EXPORT EcrgDataSeriesCodeEnum disti::ECRGMapChartDataSource::GetEcrgLayer ( void  )
inline

Gets the currently set layer for ECRG data.

Returns
The currently set layer for ECRG data.

◆ GetLayerCacheCount()

unsigned int disti::ECRGMapChartDataSource::GetLayerCacheCount ( ) const

Gets the count of the layer cache.

Returns
The maximum number of layers to cache (0 if layer caching is disabled).

◆ GetLayerCount()

unsigned int disti::ECRGMapChartDataSource::GetLayerCount ( ) const

Gets the size of the layer container. This gives an upper bound to SetEcrgLayer() when using custom layers.

Returns
The size of the layer container (i.e., an upper bound to SetEcrgLayer()).

◆ GetPopulatedLayers()

std::set< EcrgDataSeriesCodeEnum > disti::ECRGMapChartDataSource::GetPopulatedLayers ( )

Gets the set of ECRG layers that have loaded data. Refer to EcrgDataSeriesCodeEnum for the list of ECRG layers.

Returns
The set of ECRG layers with data.

◆ GetTargetCellLoadRate()

double disti::ECRGMapChartDataSource::GetTargetCellLoadRate ( ) const

Gets the target rate in Hz at which cells will be loaded.

Returns
The target rate in Hz, or 0.0 for no target rate (i.e., load as quickly as possible).

◆ GetUseEcrgLayerFlag()

GLSGEN_GLSMAPECRG_EXPORT bool disti::ECRGMapChartDataSource::GetUseEcrgLayerFlag ( )
inline

Gets the current setting of the use ECRG layer flag.

Returns
True if the user-specified layer is enabled, false otherwise.

◆ IsEcrgJustInTimeFileLoadingEnabled()

EcrgJustInTimeFileLoading disti::ECRGMapChartDataSource::IsEcrgJustInTimeFileLoadingEnabled ( ) const

Get whether the ECRG files will be processed now or later (JIT).

Gets whether the source will delay loading metadata for all files until they are shown.

Returns
True if JustInTimeFileLoading is enabled, false otherwise.

◆ LoadCellImage()

Image * disti::ECRGMapChartDataSource::LoadCellImage ( MapChartCell *  cell)

Loads the image data for a specific map chart cell.

Note
This method is typically not called directly by the user.
Parameters
cellThe map chart cell for which to load the image.
Returns
Pointer to the loaded Image, or nullptr if loading fails.

◆ ParseDirectory()

void disti::ECRGMapChartDataSource::ParseDirectory ( const char *  directoryPath,
EcrgParseDirectoryRules  isUsingTocFile = FIND_ECRG_TOC 
)

Parse ECRG data from the specified directory.

Parameters
directoryPathThe string of the path to the directory.
isUsingTocFileThe EcrgParseDirectoryRules enumerator (default: FIND_ECRG_TOC).

◆ ParseDirectoryForLocation()

void disti::ECRGMapChartDataSource::ParseDirectoryForLocation ( const char *  directoryPath,
const double  longitude,
const double  latitude,
const double  parseRadius 
)

Loads ECRG data from the specified directory if the data is located within the coordinate coverage area.

Parameters
directoryPathThe string of the path to the directory.
longitudeThe longitude of the center coordinate of the coverage area.
latitudeThe latitude of the center coordinate of the coverage area.
parseRadiusThe radius of the coverage area in nautical miles.

◆ SetEcrgLayer()

void disti::ECRGMapChartDataSource::SetEcrgLayer ( const EcrgDataSeriesCodeEnum  layer)

Sets the user-specified layer to display for ECRG data.

Note
This value will NOT be used unless SetUseEcrgLayerFlag() is true.
Parameters
layerThe layer to display. Refer to EcrgDataSeriesCodeEnum for layer definitions.

◆ SetLayerCacheCount()

void disti::ECRGMapChartDataSource::SetLayerCacheCount ( const unsigned int  cacheCount)

Sets the count of the layer cache.

Parameters
cacheCountThe maximum number of layers to cache, or 0 to disable layer caching.

◆ SetTargetCellLoadRate()

void disti::ECRGMapChartDataSource::SetTargetCellLoadRate ( const double  targetCellLoadRate)

Sets the target rate in Hz at which cells will be loaded.

Parameters
targetCellLoadRateThe target rate in Hz, or 0.0 for no target rate (i.e., load as quickly as possible).

◆ SetUseEcrgLayerFlag()

GLSGEN_GLSMAPECRG_EXPORT void disti::ECRGMapChartDataSource::SetUseEcrgLayerFlag ( bool  layerFlag)
inline

Sets the use ECRG layer flag, which enables or disables the use of the user-specified layer for ECRG data.

Parameters
layerFlagTrue to enable the user-specified layer, false to disable it.

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