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

Detailed Description

The interface to a compositor object, for use by the TSLTerrainViewShed Algorithm class.

The compositor is reponsible for converting the output of the viewshed operations and the application-specific output format. It may use the provided TSLTerrainVSOutput classes, or define its own format.

If multiple viewshed operations are performed simultaneously, any calculation/cumulation of result data is performed by this object.

An application may inherit from this object, in order to use application-specific result calculation/storage classes.

This object is reference counted. If the application is finished with it, the dec() method should be called.

Public Member Functions

virtual void setData (unsigned int x, unsigned int y, TSLTerrainVSVisibility visibility, double terrainHeight, const TSLTerrainVSAlgorithm::Parameters &viewshedParameters)=0
 
void inc ()
 
void dec ()
 
virtual bool valid (const TSLTerrainVSAlgorithm::Parameters &params)=0
 

Protected Member Functions

 TSLTerrainVSCompositor (const TSLTerrainVSCompositor &other)
 
 TSLTerrainVSCompositor ()
 
virtual ~TSLTerrainVSCompositor ()
 

Constructor & Destructor Documentation

◆ TSLTerrainVSCompositor() [1/2]

TSLTerrainVSCompositor::TSLTerrainVSCompositor ( const TSLTerrainVSCompositor & other)
protected

◆ TSLTerrainVSCompositor() [2/2]

TSLTerrainVSCompositor::TSLTerrainVSCompositor ( )
protected

◆ ~TSLTerrainVSCompositor()

virtual TSLTerrainVSCompositor::~TSLTerrainVSCompositor ( )
protectedvirtual

Member Function Documentation

◆ dec()

void TSLTerrainVSCompositor::dec ( )

Decrement this object's reference count

◆ inc()

void TSLTerrainVSCompositor::inc ( )

Increment this object's reference count.

◆ setData()

virtual void TSLTerrainVSCompositor::setData ( unsigned int x,
unsigned int y,
TSLTerrainVSVisibility visibility,
double terrainHeight,
const TSLTerrainVSAlgorithm::Parameters & viewshedParameters )
pure virtual

This method is called by the viewshed algorithm, each time a point has been processed.

The compositor is responsible for interpreting these results, performing any required calculations, and storing the data.

Parameters
xThe x offset of the point, from the bottom-left of the input data.
yThe y offset of the point, from the bottom-left of the input data.
visibilityAn enum which specifies whether this point is visible/not visible from the centre of the viewshed, or that there was no input data available for this point.
terrainHeightThe height of the terrain at this point, read from the input object.
viewshedParametersThe parameters of the current viewshed operation.

Implemented in TSLTerrainVSCompositorCumulativeVisibility, and TSLTerrainVSCompositorVisibility.

◆ valid()

virtual bool TSLTerrainVSCompositor::valid ( const TSLTerrainVSAlgorithm::Parameters & params)
pure virtual

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

The map unit extent that the viewshed will be calculated for can be retrieved via params.m_viewShedMUExtent. This may not be the same as the input object's extent, or the requested extent (based on center point and maxRadius).

Parameters
paramsThe parameters of the viewshed operation.
Returns
If this method true, the viewshed calculation will proceed. If false the viewshed calculation will terminate, and an error will be logged on the error stack.

Implemented in TSLTerrainVSCompositorCumulativeVisibility, and TSLTerrainVSCompositorVisibility.