![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
The interface to an input data object, for use by the TSLTerrainVSAlgorithm class.
An application may inherit from this object, in order to use application-specfic input data.
This object is reference counted. If the application is finished with it, the dec() method should be called.
Public Member Functions | |
virtual TSLMUExtent | queryExtent () const |
virtual bool | getData (unsigned int x, unsigned int y, double &value, const TSLTerrainVSAlgorithm::Parameters ¶ms)=0 |
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 () |
virtual bool | valid (const TSLTerrainVSAlgorithm::Parameters ¶ms) const =0 |
virtual void | processFinished ()=0 |
Protected Member Functions | |
TSLTerrainVSInput (unsigned int width, unsigned int height, TSLMUExtent extent, TSLCoordinateSystem *coordinateSystem) | |
TSLTerrainVSInput () | |
TSLTerrainVSInput (const TSLTerrainVSInput &other) | |
virtual | ~TSLTerrainVSInput () |
Protected Attributes | |
unsigned int | m_width |
unsigned int | m_height |
TSLCoordinateSystem * | m_coordinateSystem |
double | m_postDistanceX |
double | m_postDistanceY |
TSLMUExtent | m_extent |
|
protected |
Constructor.
Initialises the base parameters of the input object.
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. |
|
protected |
|
protected |
|
protectedvirtual |
|
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 in TSLTerrainVSInputEarthCurvature, and TSLTerrainVSInputTerrainDatabase.
void TSLTerrainVSInput::dec | ( | ) |
Decrement this object's reference count.
|
pure 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.
x | The x offset to query |
y | The y offset to query |
value | Storage for the height value |
params | The parameters of the viewshed operation |
Implemented in TSLTerrainVSInputArray, TSLTerrainVSInputEarthCurvature, and TSLTerrainVSInputTerrainDatabase.
|
virtual |
Query the height of the input data
Reimplemented in TSLTerrainVSInputEarthCurvature.
void TSLTerrainVSInput::inc | ( | ) |
Increment this object's reference count.
|
virtual |
Query the X/Y offset which corresponds to the provided Latitude/Longitude.
The base-class implementation of this method will call LatLongToMU on the input object's coordinate system.
lat | The latitude of the point to convert |
lon | The logitude of the point to convert |
x | Storage for the returned x offset |
y | Storage for the returned y offset |
Reimplemented in TSLTerrainVSInputEarthCurvature.
|
virtual |
Query the X/Y offset which corresponds to the provided map unit location
muX | The MU X coordinate of the point to convert |
muY | The MU Y coordinate of the point to convert |
x | Storage for the returned x offset |
y | Storage for the returned y offset |
Reimplemented in TSLTerrainVSInputEarthCurvature.
|
virtual |
Query the geographic location of the provided X/Y offset, in Latitude/Longitude.
The base-class implementation of this method will call MUToLatLong on the input object's coordinate system.
x | The X coordinate of the point to convert |
y | The Y coordinate of the point to convert |
lat | Storage for the returned latitude |
lon | Storage for the returned longitude |
Reimplemented in TSLTerrainVSInputEarthCurvature.
|
virtual |
Query the geographic location of the provided X/Y offset, in map units.
x | The X coordinate of the point to convert |
y | The Y coordinate of the point to convert |
muX | Storage for the returned MU X value |
muY | Storage for the returned MU Y value |
Reimplemented in TSLTerrainVSInputEarthCurvature.
|
virtual |
Query the horizontal post-distance of the input data.
This is the distance between sample points, in map units
Reimplemented in TSLTerrainVSInputEarthCurvature.
|
virtual |
Query the vertical post-distance of the input data.
This is the distance between sample points, in map units
Reimplemented in TSLTerrainVSInputEarthCurvature.
|
pure 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.
This method is provided as an opportunity for the input object to release any per-thread or per-calculation resources, and to reset any internal state required for another viewshed calculation.
Implemented in TSLTerrainVSInputArray, TSLTerrainVSInputEarthCurvature, and TSLTerrainVSInputTerrainDatabase.
|
virtual |
Query the extent of the input data.
The units of this extent are defined by this object's coordinate system.
Returns the input object's extent.
Reimplemented in TSLTerrainVSInputEarthCurvature.
|
pure 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.
params | The parameters of the viewshed operation. |
Implemented in TSLTerrainVSInputArray, TSLTerrainVSInputEarthCurvature, and TSLTerrainVSInputTerrainDatabase.
|
virtual |
Query the width of the input data
Reimplemented in TSLTerrainVSInputEarthCurvature.
|
protected |
|
protected |
The Map-Unit extent of the input object.
The units of this extent are defined by the source data coordinate system.
|
protected |
The number of vertical elements in the input data.
|
protected |
The horizontal distance between posts, in the units of the terrain data.
|
protected |
The horizontal distance between posts, in the units of the terrain data.
|
protected |
Data Members for Class Attributes The number of horizontal elements in the input data.