MapLink Pro 11.1.2.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Loading...
Searching...
No Matches
TSL3DTerrainDataLayer Class Reference
Inheritance diagram for TSL3DTerrainDataLayer:

Detailed Description

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.

Deprecated
Deprecated as of MapLink 11.1. Advised to use MapLink Earth SDK instead.

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
 
TSLCoordinateSystemqueryCoordinateSystem () 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)
 
- Public Member Functions inherited from TSL3DDataLayer
TSL3DBoundingBox get3DExtent () const
 
TSL3DMapQueryquery (const TSL3DBoundingBox &extent, TSL3DSelector *selector, int drawingSurfaceID=-1) const
 
- Public Member Functions inherited from TSLDataLayer
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)
 
TSLDataHandlercreateDataHandler (const char *config_file=0)
 
TSLHistoryVersion currentVersion () const
 
TSLDataHandlerdataHandler ()
 
const TSLDataHandlerdataHandler () const
 
void destroy ()
 
bool entityIsVisible (const TSLEntity *entity, const TSLDrawingSurface *drawingSurface) const
 
const TSLFeatureClassListfeatureList () const
 
const TSLFeatureClassListfeatureList (const char *detailLayerName) const
 
bool fileModificationTime (const char *filename, TSLTimeType &lastModificationTime)
 
TSLEntityfindEntity (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
 
TSLEntityIteratorgetEntityIterator (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
 
TSLFileLoadergetLoader ()
 
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)
 
TSLMapQueryquery (TSLTMC x1, TSLTMC y1, TSLTMC x2, TSLTMC y2, int depth=-1, const char *featureName=NULL, int drawingSurfaceID=-1) const
 
TSLMapQueryquery (TSLTMC x1, TSLTMC y1, TSLTMC x2, TSLTMC y2, TSLSelector *selector, int drawingSurfaceID=-1) const
 
const TSLCoordinateSystemgetCoordinateSystem () 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 TSLVersionHistorySetversionHistory () const
 

Protected Member Functions

 ~TSL3DTerrainDataLayer ()
 
- Protected Member Functions inherited from TSL3DDataLayer
 TSL3DDataLayer ()
 
 ~TSL3DDataLayer ()
 

Constructor & Destructor Documentation

◆ TSL3DTerrainDataLayer()

TSL3DTerrainDataLayer::TSL3DTerrainDataLayer ( )

◆ ~TSL3DTerrainDataLayer()

TSL3DTerrainDataLayer::~TSL3DTerrainDataLayer ( )
protected

Protected destructor prevents creation of objects on the stack.

Member Function Documentation

◆ cacheSize() [1/2]

unsigned long TSL3DTerrainDataLayer::cacheSize ( ) const

Experimental

◆ cacheSize() [2/2]

void TSL3DTerrainDataLayer::cacheSize ( unsigned long newSize)

◆ latLongToMU()

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.

Parameters
(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.
localIndicates whether the lat/long co-ordinate is in WGS84 or the local datum.
Returns
TSLTerrain_OK if successful else an error code.

◆ MUToLatLong()

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.

Parameters
(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.
localIndicates whether the lat/long co-ordinate is in WGS84 or the local datum.
boundCheckWhen 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.
Returns
TSLTerrain_OK if successful else an error code.

◆ operator new() [1/2]

void * TSL3DTerrainDataLayer::operator new ( size_t size)

Allocation override for API redirection.

◆ operator new() [2/2]

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.

◆ query()

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.

Parameters
(x,y)Coordinate to retrieve data for. The units are the Map Units as created in MapLink Studio.
dataItemPointer to TSLTerrainDataItem structure to contain information on the point on return.
filterSpecifies 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.
highestResIf 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.

◆ queryArea()

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.

Parameters
(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,numYNumber of samples to retrieve along the x and y axis - also
defineshow large the buffer "data" should be numX * numY.
dataPointer 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.
filterSpecifies 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.
highestResIf 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.

◆ queryCoordinateSystem()

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.

◆ queryExtent()

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.

Parameters
(x1,y1)Filled with position of bottom-left corner on return.
(x2,y2)Filled with position of top-right corner on return.
Returns
TSLTerrain_OK if successful else an error code.

◆ queryLine()

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.

Parameters
(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.
numPointsNumber of samples to retrieve along the line - also defines how large the buffer "dataItem" should be.
dataItemPointer 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.
filterSpecifies 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.
highestResIf 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.