![]() |
MapLink Pro 11.1.2.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
Specialist data layer for the handling of 3D Terrain data.
The 3D Terrain Layer component is provided to allow the user to load, visualise and query a Terrain Database generated from MapLink Studio.
Public Member Functions | |
TSLTerrainReturn | latLongToMU (double latitude, double longitude, double *x, double *y, bool local=false) const |
TSLTerrainReturn | MUToLatLong (double x, double y, double *latitude, double *longitude, bool local=false, bool boundCheck=true) const |
TSLTerrainReturn | query (double x, double y, TSLTerrainDataItem *dataItem, TSLTerrainData_LEVEL filter=TSLTerrainData_Min, bool highestRes=false, TSLTerrainInterpolate interpolate=TSLTerrainInterpolate_NONE) const |
TSLTerrainReturn | queryArea (double x1, double y1, double x2, double y2, int numX, int numY, TSLTerrainDataItem *data, TSLTerrainData_LEVEL filter=TSLTerrainData_Min, bool highestRes=false, TSLTerrainInterpolate interpolate=TSLTerrainInterpolate_NONE) const |
TSLCoordinateSystem * | queryCoordinateSystem () const |
TSLTerrainReturn | queryExtent (double &x1, double &y1, double &x2, double &y2) const |
TSLTerrainReturn | queryLine (double x1, double y1, double x2, double y2, int numPoints, TSLTerrainDataItem *data, TSLTerrainData_LEVEL filter=TSLTerrainData_Min, bool highestRes=false, TSLTerrainInterpolate interpolate=TSLTerrainInterpolate_NONE) const |
TSL3DTerrainDataLayer () | |
unsigned long | cacheSize () const |
void | cacheSize (unsigned long newSize) |
void * | operator new (size_t size) TSL_NO_THROW |
void * | operator new (size_t size, char *filename, int line) |
![]() | |
TSL3DBoundingBox | get3DExtent () const |
TSL3DMapQuery * | query (const TSL3DBoundingBox &extent, TSL3DSelector *selector, int drawingSurfaceID=-1) const |
![]() | |
void | addDrawingCallback (TSLDataLayerDrawingCallback *drawingCallback) |
bool | addFeatureRendering (const char *featureName, TSLFeatureID featureID) |
bool | addLoader (TSLFileLoader *loader, TSLLoaderAppCallback callback, void *arg, TSLAllLoadedCallback allLoadedCallback=0, void *arg2=0) |
bool | addPathList (const TSLPathList *path_list) |
void | cancelFlashback () |
bool | clearFeatureRendering (const char *featureName, TSLFeatureID featureID) |
TSLDataHandler * | createDataHandler (const char *config_file=0) |
TSLHistoryVersion | currentVersion () const |
TSLDataHandler * | dataHandler () |
const TSLDataHandler * | dataHandler () const |
void | destroy () |
bool | entityIsVisible (const TSLEntity *entity, const TSLDrawingSurface *drawingSurface) const |
const TSLFeatureClassList * | featureList () const |
const TSLFeatureClassList * | featureList (const char *detailLayerName) const |
bool | fileModificationTime (const char *filename, TSLTimeType &lastModificationTime) |
TSLEntity * | findEntity (TSLTMC x, TSLTMC y, TSLTMC aperture, int depth, const char *featureName=0, int drawingSurfaceID=-1) |
bool | findFile (const char *filename, TSLSimpleString &foundPath) const |
void | flashbackToTimestamp (TSLHistoryTimestamp timestamp, TSLLayerArchiveCallback archiveCallback, void *arg=0) |
void | flashbackToTimestamp (TSLHistoryTimestamp timestamp, TSLLayerArchiveTileCallback archiveTileCallback, void *arg=0) |
void | flashbackToVersion (TSLHistoryVersion version, TSLLayerArchiveCallback archiveCallback, void *arg=0) |
void | flashbackToVersion (TSLHistoryVersion version, TSLLayerArchiveTileCallback archiveTileCallback, void *arg=0) |
bool | getActiveLayerName (const TSLEnvelope &extent, double screenResolution, TSLSimpleString &activeLayerName) const |
TSLEntityIterator * | getEntityIterator (const char *detailLayer, TSLSelector *selector=NULL, TSLEnvelope *extent=NULL, bool splitOptimisedPrimitives=true) |
bool | getFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeInt attribute, int *result) const |
bool | getFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeDouble attribute, double *result) const |
bool | getFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeBool attribute, bool *result) const |
bool | getFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributes *result) const |
TSLFileLoader * | getLoader () |
bool | getMUExtent (double *x1, double *y1, double *x2, double *y2, int drawingSurfaceID=-1) const |
bool | getTMCExtent (TSLTMC *x1, TSLTMC *y1, TSLTMC *x2, TSLTMC *y2, int drawingSurfaceID=-1) const |
bool | getUUExtent (double *x1, double *y1, double *x2, double *y2, const TSLDrawingSurface *drawingSurface) const |
bool | importHistory (TSLHistoryVersion mapVersion, TSLHistoryTimestamp timestamp, TSLHistoryImportSet *historySet) |
bool | latLongToTMC (double latitude, double longitude, TSLTMC *x, TSLTMC *y, bool local=false) const |
bool | latLongToTMC (int num, double *latitudes, double *longitudes, TSLTMC *xs, TSLTMC *ys, bool local=false) const |
TSLDataLayerTypeEnum | layerType () const |
bool | loadData (const char *filename) |
bool | loadRendering (const char *filename) |
void | notifyChanged (bool changed=true) |
TSLMapQuery * | query (TSLTMC x1, TSLTMC y1, TSLTMC x2, TSLTMC y2, int depth=-1, const char *featureName=NULL, int drawingSurfaceID=-1) const |
TSLMapQuery * | query (TSLTMC x1, TSLTMC y1, TSLTMC x2, TSLTMC y2, TSLSelector *selector, int drawingSurfaceID=-1) const |
const TSLCoordinateSystem * | getCoordinateSystem () const |
bool | queryVersionHistory (const TSLEnvelope &extent, TSLVersionHistorySet &history) |
void | refreshFlashback () |
bool | removeData () |
void | releaseResources (int surfaceID) |
bool | saveRendering (const char *filename, TSLMapLinkVersion ver=TSL_CURRENT_MAPLINK_VERSION) |
bool | setCoordinateSystem (const TSLCoordinateSystem *coordinateSystem) |
bool | setFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeInt attribute, int value) |
bool | setFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeDouble attribute, double value) |
bool | setFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributeBool attribute, bool value) |
bool | setFeatureRendering (const char *featureName, TSLFeatureID featureID, TSLRenderingAttributes *value) |
bool | TMCToLatLong (TSLTMC x, TSLTMC y, double *latitude, double *longitude, bool local=false, bool boundCheck=true) const |
bool | TMCToLatLong (int num, TSLTMC *xs, TSLTMC *ys, double *latitudes, double *longitudes, bool local=false) const |
const TSLVersionHistorySet * | versionHistory () const |
Protected Member Functions | |
~TSL3DTerrainDataLayer () | |
![]() | |
TSL3DDataLayer () | |
~TSL3DDataLayer () | |
TSL3DTerrainDataLayer::TSL3DTerrainDataLayer | ( | ) |
|
protected |
Protected destructor prevents creation of objects on the stack.
unsigned long TSL3DTerrainDataLayer::cacheSize | ( | ) | const |
Experimental
void TSL3DTerrainDataLayer::cacheSize | ( | unsigned long | newSize | ) |
TSLTerrainReturn TSL3DTerrainDataLayer::latLongToMU | ( | double | latitude, |
double | longitude, | ||
double * | x, | ||
double * | y, | ||
bool | local = false ) const |
Returns the MU position of a given latitude/longitude point. The conversion is performed using the coordinate system loaded from the current terrain database, configured by MapLink Studio.
(latitude,longitude) | Geodetic position to convert to Map Units. |
(x,y) | Pointers to doubles that will be filled with the Map Units for the required position on return. |
local | Indicates whether the lat/long co-ordinate is in WGS84 or the local datum. |
TSLTerrainReturn TSL3DTerrainDataLayer::MUToLatLong | ( | double | x, |
double | y, | ||
double * | latitude, | ||
double * | longitude, | ||
bool | local = false, | ||
bool | boundCheck = true ) const |
Returns the latitude/longitude position of a given Map Unit point. The conversion is performed using the coordinate system loaded from the current terrain database, configured by MapLink Studio.
(x,y) | Position in Map Units of the point to convert. |
(latitude,longitude) | Pointers to doubles that will contain the converted geodetic position on return. |
local | Indicates whether the lat/long co-ordinate is in WGS84 or the local datum. |
boundCheck | When the initial coordinates are outside of the map extent, the lat/long returned could be invalid. When this flag is true, a check for invalid results is performed. This check will double the processing time required by the method, but return a validated status code. If the specified coordinate is guaranteed to be within the map extent, then this flag may be turned off. |
void * TSL3DTerrainDataLayer::operator new | ( | size_t | size | ) |
Allocation override for API redirection.
void * TSL3DTerrainDataLayer::operator new | ( | size_t | size, |
char * | filename, | ||
int | line ) |
When included in an MFC application in debug mode, the debug new expects this to be here. Override it and return the same as the normal one. The library must include it when compiled in release mode, since the user's application may be in debug mode.
TSLTerrainReturn TSL3DTerrainDataLayer::query | ( | double | x, |
double | y, | ||
TSLTerrainDataItem * | dataItem, | ||
TSLTerrainData_LEVEL | filter = TSLTerrainData_Min, | ||
bool | highestRes = false, | ||
TSLTerrainInterpolate | interpolate = TSLTerrainInterpolate_NONE ) const |
Returns terrain information about the given point.
(x,y) | Coordinate to retrieve data for. The units are the Map Units as created in MapLink Studio. |
dataItem | Pointer to TSLTerrainDataItem structure to contain information on the point on return. |
filter | Specifies the level of information to request from the database. Currently, only TSLTerrainData_Min is supported which populates m_x, m_y and m_z of the structure. |
highestRes | If set to true, returns the highest resolution (most accurate) data for the point. If false, data using the resolution setup with displayExtent(). |
Returns TSLTerrain_OK if successful else an error code.
TSLTerrainReturn TSL3DTerrainDataLayer::queryArea | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2, | ||
int | numX, | ||
int | numY, | ||
TSLTerrainDataItem * | data, | ||
TSLTerrainData_LEVEL | filter = TSLTerrainData_Min, | ||
bool | highestRes = false, | ||
TSLTerrainInterpolate | interpolate = TSLTerrainInterpolate_NONE ) const |
Returns information of a specific area using the required spacing.
The area is defined by the bottom-left and top-right values passed into the function. The bottom-left and top-right coordinates are included in the outputted data.
The caller is responsible for allocating enough room for the returned data grid.
The grid is return on a row by row basis with the first row being the range of longitude from the bottom-left to the bottom-right.
(x1,y1) | bottom-left corner of the area. The units are the Map Units as created in MapLink Studio. |
(x2,y2) | top-right corner of the area. The units are the Map Units as created in MapLink Studio. |
numX,numY | Number of samples to retrieve along the x and y axis - also |
defines | how large the buffer "data" should be numX * numY. |
data | Pointer to an array of TSLTerrainDataItem structures, the size of which is equal to numPoints, to contain information on the points along the line on return. |
filter | Specifies the level of information to request from the database. Currently, only TSLTerrainData_Min is supported which populates m_x, m_y and m_z of the structure. |
highestRes | If set to true, returns the highest resolution (most accurate) data for the point. If false, data using the resolution setup with displayExtent(). |
Returns TSLTerrain_OK if successful else an error code.
TSLCoordinateSystem * TSL3DTerrainDataLayer::queryCoordinateSystem | ( | ) | const |
Returns the coordinate system used by the currently loaded terrain database as configured by MapLink Studio.
Returns a pointer to the coordinate system. If no coordinate system has been defined for the terrain database then the function returns 0.
TSLTerrainReturn TSL3DTerrainDataLayer::queryExtent | ( | double & | x1, |
double & | y1, | ||
double & | x2, | ||
double & | y2 ) const |
Returns the data extent covered by the terrain database. The extent is in the same units as are used by the terrain database.
(x1,y1) | Filled with position of bottom-left corner on return. |
(x2,y2) | Filled with position of top-right corner on return. |
TSLTerrainReturn TSL3DTerrainDataLayer::queryLine | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2, | ||
int | numPoints, | ||
TSLTerrainDataItem * | data, | ||
TSLTerrainData_LEVEL | filter = TSLTerrainData_Min, | ||
bool | highestRes = false, | ||
TSLTerrainInterpolate | interpolate = TSLTerrainInterpolate_NONE ) const |
Returns information at regular spaces between the two lat/long points.
The number of samples between the two points is determined by the numPoints argument. Space should be allocated by the caller for numPoints TSLTerrain DataItem structures in the data parameter.
(x1,y1) | First coordinate, defining the start of the line. The units are the Map Units as created in MapLink Studio. |
(x2,y2) | Second coordinate, defining the end of the line. The units are the Map Units as created in MapLink Studio. |
numPoints | Number of samples to retrieve along the line - also defines how large the buffer "dataItem" should be. |
dataItem | Pointer to an array of TSLTerrainDataItem structures, the size of which is equal to numPoints, to contain information on the points along the line on return. |
filter | Specifies the level of information to request from the database. Currently, only TSLTerrainData_Min is supported which populates m_x, m_y and m_z of the structure. |
highestRes | If set to true, returns the highest resolution (most accurate) data for the point. If false, data using the resolution setup with displayExtent(). |
Returns TSLTerrain_OK if successful else an error code.