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

Detailed Description

The interface to a viewshed algorithm object.

This class, and its implementations are responsible for performing the viewshed analysis.

The parameters to this operation may be accessed via the parameters() method.

This object is stateful. Only 1 viewshed operation should be performed at a time for each algorithm object. The other objects such as input and compositor objects may be shared between operations, provided that the implementations are threadsafe.

Classes

class  Parameters
 

Public Member Functions

 TSLTerrainVSAlgorithm (TSLTerrainVSInput *input, TSLTerrainVSCompositor *compositor)
 
virtual ~TSLTerrainVSAlgorithm ()
 
virtual bool calculateViewshed (double x, double y, double startHeight, bool startRelativeToGround, double maxRadius, double endHeight=0.0, bool endRelativeToGround=true)=0
 
TSLTerrainVSAlgorithm::Parametersparameters ()
 

Static Public Member Functions

static void maxThreads (unsigned int max=0)
 

Protected Member Functions

 TSLTerrainVSAlgorithm ()
 

Protected Attributes

TSLTerrainVSAlgorithm::Parameters m_parameters
 

Static Protected Attributes

static unsigned int m_maxThreads
 

Constructor & Destructor Documentation

◆ TSLTerrainVSAlgorithm() [1/2]

TSLTerrainVSAlgorithm::TSLTerrainVSAlgorithm ( TSLTerrainVSInput * input,
TSLTerrainVSCompositor * compositor )

Constructor.

This will setup the viewshed algorithm, with a minimal configuration. Further configuration options may be set on the parameters object.

Parameters
inputThe input data object used for viewshed calculations.
compositorThe output compositor object used for viewshed calculations.

◆ ~TSLTerrainVSAlgorithm()

virtual TSLTerrainVSAlgorithm::~TSLTerrainVSAlgorithm ( )
virtual

◆ TSLTerrainVSAlgorithm() [2/2]

TSLTerrainVSAlgorithm::TSLTerrainVSAlgorithm ( )
protected

Member Function Documentation

◆ calculateViewshed()

virtual bool TSLTerrainVSAlgorithm::calculateViewshed ( double x,
double y,
double startHeight,
bool startRelativeToGround,
double maxRadius,
double endHeight = 0.0,
bool endRelativeToGround = true )
pure virtual

Perform a viewshed calculation.

The input data is defined by parameters().m_inputData The output compositor is defined by parameters().m_compositor

Parameters
xThe X coordinate of the viewshed operation's center
yThe Y coordinate of the viewshed operation's center
startHeightThe start height of the viewshed operation
startRelativeToGroundIf true, the start height is relative to the terrain height, otherwise it is an absolute value
maxRadiusThe maximum radius of the viewshed operation
endHeightThe end height of the viewshed operation
endRelativeToGroundIf true, the end height is relative to the terrain height, otherwise it is an absolute value
Returns
true if the viewshed operation was performed, or false if there was an error.

Implemented in TSLTerrainVSAlgorithmRFVS.

◆ maxThreads()

static void TSLTerrainVSAlgorithm::maxThreads ( unsigned int max = 0)
static

Set the maximum number of threads to use for viewshed operations.

By default, or if this value is set to zero, the viewshed operations will determine how many threads to use based on the number of processor cores.

◆ parameters()

TSLTerrainVSAlgorithm::Parameters & TSLTerrainVSAlgorithm::parameters ( )

Query the viewshed's parameters object

Member Data Documentation

◆ m_maxThreads

unsigned int TSLTerrainVSAlgorithm::m_maxThreads
staticprotected

The maximum number of threads a viewshed algorithm may use.

A value of zero means that the algorithm should select an appropriate value, based on the number of available processor cores.

◆ m_parameters

TSLTerrainVSAlgorithm::Parameters TSLTerrainVSAlgorithm::m_parameters
protected

Data Members for Class Attributes