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

Detailed Description

Specialist data layer for the handling of non-map 3D data.

The 3D Standard Layer component is provided to allow the user to load, create, manipulate and save non-map 3D data.

The methods provided by the TSL3DStandardLayer are divided into a number of categories:

  • Loading and saving data
  • Manipulation of data
  • Miscellaneous

The methods 'loadData', 'loadDataFromBuffer', 'append' and 'appendDataFrom Buffer' allow data to be loaded from files or data streams. 'removeData' removes all data from the data layer. The data stream is expected as a pointer to a memory buffer of unsigned char *. The methods 'saveData' and 'saveDataToBuffer' allow the user to save all the data in the layer to a file or a data stream. When saving to a buffer, the buffer should be deleted using the 'deleteBufferData' call. A buffer is often used when the data is subsequently saved to a database.

Entities may be cloned from other data layers using the methods 'clone Entity', and 'cloneFeature'. Entities may be removed from the TSL3DStandard DataLayer using the methods 'removeEntity'.

A number of miscellaneous methods and properties are also available.

Instances of this class should be destroyed using the destroy method.

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

Public Member Functions

bool appendData (const char *filename)
 
bool appendDataFromBuffer (unsigned char *data_stream, TSLSize data_len)
 
bool cloneEntity (TSL3DDataLayer *src_data_layer, TSLEntityID entity_id)
 
void deleteBufferData (unsigned char *buffer) const
 
TSL3DEntitySetentitySet ()
 
const TSL3DEntitySetentitySet () const
 
bool loadDataFromBuffer (unsigned char *data_stream, TSLTMC data_len)
 
bool removeEntity (TSLEntityID entity_id)
 
bool saveData (const char *filename, TSLMapLinkVersion ver=TSL_CURRENT_MAPLINK_VERSION) const
 
unsigned char * saveDataToBuffer (TSLSize *data_len, TSLMapLinkVersion ver=TSL_CURRENT_MAPLINK_VERSION) const
 
 TSL3DStandardDataLayer ()
 
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

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

Constructor & Destructor Documentation

◆ TSL3DStandardDataLayer()

TSL3DStandardDataLayer::TSL3DStandardDataLayer ( )

◆ ~TSL3DStandardDataLayer()

TSL3DStandardDataLayer::~TSL3DStandardDataLayer ( )
protected

Protected destructor prevents creation of objects on the stack.

Member Function Documentation

◆ appendData()

bool TSL3DStandardDataLayer::appendData ( const char * filename)

Add data from a file.

This method allows the user to append data to this TSL3DStandardDataLayer from the named file.

Parameters
filenameName of the file from which to get the data.
Returns
true on success or false on error.

◆ appendDataFromBuffer()

bool TSL3DStandardDataLayer::appendDataFromBuffer ( unsigned char * data_stream,
TSLSize data_len )

Add data from a memory buffer.

This method allows the user to append data to this TSLStandardDataLayer from the given buffer. The data must be the equivalent of a 3D TMF file, although it is usually extracted from a database. The management of the buffer is the user's responsibility.

Parameters
data_streamAddress of the first byte of the buffer to be appended to the Data Layer.
data_lenSize of the buffer to be appended.
Returns
true on success, false on error.

◆ cloneEntity()

bool TSL3DStandardDataLayer::cloneEntity ( TSL3DDataLayer * src_data_layer,
TSLEntityID entity_id )

Clone entities with the specified entity_id.

This method allows the user to clone all entities with the given entity_id from the source TSL3DStandardDataLayer to this TSL3DStandardDataLayer.

Parameters
src_data_layerData layer where to find the feature.
entity_idID of the entities to be cloned.
Returns
true if any entities were cloned, false otherwise.

◆ deleteBufferData()

void TSL3DStandardDataLayer::deleteBufferData ( unsigned char * buffer) const

Delete the buffer returned from 'saveDataToBuffer'.

This method must be used to delete the buffer after a call to 'saveDataTo Buffer'. If this does not happen then memory will be leaked.

Parameters
bufferBuffer to be deleted, returned from saveDataToBuffer.

◆ entitySet() [1/2]

TSL3DEntitySet * TSL3DStandardDataLayer::entitySet ( )

Query the top level 3D entity set.

This method allows the user to get the TSL3DEntitySet attached to this TSL3DStandardDataLayer. This will give access to the set of entities within the tile.

Returns a pointer to a TSL3DEntitySet object or NULL on error. The user should not delete the TSL3DEntitySet passed, since it is embedded within the TSL3DStandardDataLayer.

◆ entitySet() [2/2]

const TSL3DEntitySet * TSL3DStandardDataLayer::entitySet ( ) const

Query the read-only top level 3D entity set.

This method allows the user to get a read-only TSL3DEntitySet attached to this TSL3DStandardDataLayer. This will give access to the set of 3D entities within the tile.

Returns a pointer to a TSL3DEntitySet object or NULL on error. The user should not delete the TSL3DEntitySet passed, since it is embedded within the TSL3DStandardDataLayer.

◆ loadDataFromBuffer()

bool TSL3DStandardDataLayer::loadDataFromBuffer ( unsigned char * data_stream,
TSLTMC data_len )

Load data from a data buffer.

This method allows the user to load data onto this TSL3DStandardDataLayer from the given buffer. Any data which is currently in the layer will be deleted. The data must be the equivalent of a 3D TMF file, although it is usually extracted from a database. The management of the buffer is the user's responsibility.

Parameters
data_streamAddress of the first byte of the buffer to be loaded onto the Data Layer.
data_lenSize of the buffer to be loaded.
Returns
true on success, false on error.

◆ operator new() [1/2]

void * TSL3DStandardDataLayer::operator new ( size_t size)

Allocation override for API redirection.

◆ operator new() [2/2]

void * TSL3DStandardDataLayer::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.

◆ removeEntity()

bool TSL3DStandardDataLayer::removeEntity ( TSLEntityID entity_id)

Remove all entities with a specified entity_id.

This method allows the user to remove an entity of the given id.

Parameters
entity_idID of the entity to remove from the TSLStandardDataLayer.
Returns
true if the entity was found and successfully removed from the data layer. False otherwise.

◆ saveData()

bool TSL3DStandardDataLayer::saveData ( const char * filename,
TSLMapLinkVersion ver = TSL_CURRENT_MAPLINK_VERSION ) const

Saves data to the specified file.

This method allows the user to save the data currently loaded in the TSL3DStandardDataLayer to the given filename.

Parameters
filenameSave data file name.
verMapLink version to save as.
Returns
true on success, or false on error.

◆ saveDataToBuffer()

unsigned char * TSL3DStandardDataLayer::saveDataToBuffer ( TSLSize * data_len,
TSLMapLinkVersion ver = TSL_CURRENT_MAPLINK_VERSION ) const

Create a buffer and saves the contents to it.

This method allows the user to save data from this TSL3DStandardDataLayer to a buffer. A buffer is created, whose size is returned. It is the user's responsibility to free the buffer using the 'deleteBufferData' call.

Parameters
data_lenStorage for size of the data to be saved.
verMapLink version to save as.
Returns
the address of the buffer where the data has been saved.