![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
An input data object, which stores terrain data in a 2-dimensional array.
Public Member Functions | |
TSLTerrainVSInputArray (unsigned int width, unsigned int height, TSLMUExtent extent, TSLCoordinateSystem *coordinateSystem, double nullValue=-(std::numeric_limits< double >::max)(), double *data=NULL) | |
virtual bool | getData (unsigned int x, unsigned int y, double &value, const TSLTerrainVSAlgorithm::Parameters ¶ms) |
bool | setData (unsigned int x, unsigned int y, double value) |
virtual bool | valid (const TSLTerrainVSAlgorithm::Parameters ¶ms) const |
virtual void | processFinished () |
![]() | |
virtual TSLMUExtent | queryExtent () const |
virtual unsigned int | width () const |
virtual unsigned int | height () const |
void | inc () |
void | dec () |
virtual const TSLCoordinateSystem * | coordinateSystem () |
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 | |
![]() | |
TSLTerrainVSInput (unsigned int width, unsigned int height, TSLMUExtent extent, TSLCoordinateSystem *coordinateSystem) | |
TSLTerrainVSInput () | |
TSLTerrainVSInput (const TSLTerrainVSInput &other) | |
virtual | ~TSLTerrainVSInput () |
![]() | |
unsigned int | m_width |
unsigned int | m_height |
TSLCoordinateSystem * | m_coordinateSystem |
double | m_postDistanceX |
double | m_postDistanceY |
TSLMUExtent | m_extent |
TSLTerrainVSInputArray::TSLTerrainVSInputArray | ( | unsigned int | width, |
unsigned int | height, | ||
TSLMUExtent | extent, | ||
TSLCoordinateSystem * | coordinateSystem, | ||
double | nullValue = -(std::numeric_limits< double >::max)(), | ||
double * | data = NULL ) |
Initialise the basic input object parameters, and setup the data array.
The nullValue will be used by the getData method, in order to identify areas of no data. The input data aray will be initialised to this value.
This object will use the provided data pointer if provided, and will not perform any initialisation on the array. The application is responsible for deleting this array, and ensuring that it is of a sufficient size.
width | The number of horizontal elements in the input data array. |
height | The number of vertical elements in the input data array. |
extent | The data extent, in map units. |
coordinateSystem | The coordinate system of the data. |
nullValue | The value which represents a lack of data. |
data | A pointer to an existing double array. |
|
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.
If the provided location is valid, the height value will be populated, and this method will return true. If the height value is equal to the 'nullValue', or the input location is invalid, then this method will return false.
x | The x offset to query |
y | The y offset to query |
value | Storage for the height value |
params | The viewshed operation parameters |
Implements TSLTerrainVSInput.
|
virtual |
This method will be called by the viewshed algorithm when the viewshed calculation has finished. If the viewshed algorithm is multithreaded, this method will be called for each of the calculation threads.
For this class no cleanup or reinitialisation is required.
Implements TSLTerrainVSInput.
bool TSLTerrainVSInputArray::setData | ( | unsigned int | x, |
unsigned int | y, | ||
double | value ) |
Set a height value in the array.
The location given to this method is specified as an offset, from the bottom-left of the data.
The array is iniitialised to the constructor's 'nullValue' parameter, meaning that only valid data needs to be set into the array.
x | The x offset in the array |
y | The y offset in the array |
value | The value to set. |
This method will return true if the data was set, or false if the location was invalid.
|
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 TSLTerrianVSInputArray object is considered valid if it has a non-zero extent, width and height.
params | The parameters of the viewshed operation. |
Implements TSLTerrainVSInput.