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

Public Member Functions

 TSLTerrainVSInputTerrainDatabase (TSLTerrainDatabase *database, TSLMUExtent displayExtent, unsigned int displayWidth, unsigned int displayHeight)
 
virtual bool getData (unsigned int x, unsigned int y, double &value, const TSLTerrainVSAlgorithm::Parameters &params)
 
void displayParameters (TSLMUExtent displayExtent, unsigned int displayWidth, unsigned int displayHeight)
 
virtual bool valid (const TSLTerrainVSAlgorithm::Parameters &params) const
 
void cacheLimit (unsigned int limit)
 
virtual void processFinished ()
 
virtual const TSLCoordinateSystemcoordinateSystem ()
 
- Public Member Functions inherited from TSLTerrainVSInput
virtual TSLMUExtent queryExtent () const
 
virtual unsigned int width () const
 
virtual unsigned int height () const
 
void inc ()
 
void dec ()
 
virtual bool offsetToLatLong (unsigned int x, unsigned int y, double &lat, double &lon)
 
virtual bool offsetToMU (unsigned int x, unsigned int y, double &muX, double &muY)
 
virtual bool MUToOffset (double muX, double muY, unsigned int &x, unsigned int &y)
 
virtual bool LatLongToOffset (double lat, double lon, unsigned int &x, unsigned int &y)
 
virtual double postDistanceX ()
 
virtual double postDistanceY ()
 

Additional Inherited Members

- Protected Member Functions inherited from TSLTerrainVSInput
 TSLTerrainVSInput (unsigned int width, unsigned int height, TSLMUExtent extent, TSLCoordinateSystem *coordinateSystem)
 
 TSLTerrainVSInput ()
 
 TSLTerrainVSInput (const TSLTerrainVSInput &other)
 
virtual ~TSLTerrainVSInput ()
 
- Protected Attributes inherited from TSLTerrainVSInput
unsigned int m_width
 
unsigned int m_height
 
TSLCoordinateSystemm_coordinateSystem
 
double m_postDistanceX
 
double m_postDistanceY
 
TSLMUExtent m_extent
 

Constructor & Destructor Documentation

◆ TSLTerrainVSInputTerrainDatabase()

TSLTerrainVSInputTerrainDatabase::TSLTerrainVSInputTerrainDatabase ( TSLTerrainDatabase * database,
TSLMUExtent displayExtent,
unsigned int displayWidth,
unsigned int displayHeight )

Constructor.

Initialises the base parameters of the input object.

The displayExtent, width and height are used to select an appropriate layer, and data resolution from the terrain database.

Parameters
databaseThe TSLTerrainDatabase to read input data from. The application is responsible for deleting this object.
displayExtentThe extent currently displayed by an application
displayWidthThe width of an application's current display
displayHeightThe height of an application's current display

Member Function Documentation

◆ cacheLimit()

void TSLTerrainVSInputTerrainDatabase::cacheLimit ( unsigned int limit)

Set the maximum size of the cache, in MB.

The initial cache size limit is 64MB.

◆ coordinateSystem()

virtual const TSLCoordinateSystem * TSLTerrainVSInputTerrainDatabase::coordinateSystem ( )
virtual

Query the coordinate system of the input data.

This object must provide a coordinate system in order for viewshed operations, and any height adjustment calculations to be valid.

Reimplemented from TSLTerrainVSInput.

◆ displayParameters()

void TSLTerrainVSInputTerrainDatabase::displayParameters ( TSLMUExtent displayExtent,
unsigned int displayWidth,
unsigned int displayHeight )

Constructor.

Initialises the base parameters of the input object.

The displayExtent, width and height are used to select an appropriate layer, and data resolution from the terrain database.

Parameters
displayExtentThe extent currently displayed by an application
displayWidthThe width of an application's current display
displayHeightThe height of an application's current display

◆ getData()

virtual bool TSLTerrainVSInputTerrainDatabase::getData ( unsigned int x,
unsigned int y,
double & value,
const TSLTerrainVSAlgorithm::Parameters & params )
virtual

Query a height value from the input data.

If the valid() method has returned false, this method will never be called by the viewshed algorithm.

The location given to this method is specified as an offset, from the bottom-left of the data.

This method should set the value parameter to the requested height value, and return true. If there is no height data available for the requested location this method should return false.

Parameters
xThe x offset to query
yThe y offset to query
valueStorage for the height value
paramsThe parameters of the viewshed operation

Implements TSLTerrainVSInput.

◆ processFinished()

virtual void TSLTerrainVSInputTerrainDatabase::processFinished ( )
virtual

This method will be called by the viewshed algorithm when the viewshed calculation has finished.

This object uses this method to cleanup the per-thread storage used in the caching mechanism.

Implements TSLTerrainVSInput.

◆ valid()

virtual bool TSLTerrainVSInputTerrainDatabase::valid ( const TSLTerrainVSAlgorithm::Parameters & params) const
virtual

This method will be called by the viewshed algorithm, to provide the input object with a mechanism for initialisation, and an opportunity to terminate the viewshed calculation if required.

The extent provided by params.m_viewShedMUExtent should not be considered valid during this call, as it will not have been fully calculated.

The TSLTerrainVSInputTerrainDatabase object is considered valid if: The provided TSLTerrainDatabase is not empty. The provided TSLTerrainDatabase contains data, for the provided extent.

Parameters
paramsThe parameters of the viewshed operation.
Returns
true if the input object is valid, or false otherwise.

Implements TSLTerrainVSInput.