![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
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:
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.
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 |
TSL3DEntitySet * | entitySet () |
const TSL3DEntitySet * | entitySet () 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) |
![]() | |
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 | |
~TSL3DStandardDataLayer () | |
![]() | |
TSL3DDataLayer () | |
~TSL3DDataLayer () | |
TSL3DStandardDataLayer::TSL3DStandardDataLayer | ( | ) |
|
protected |
Protected destructor prevents creation of objects on the stack.
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.
filename | Name of the file from which to get the data. |
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.
data_stream | Address of the first byte of the buffer to be appended to the Data Layer. |
data_len | Size of the buffer to be appended. |
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.
src_data_layer | Data layer where to find the feature. |
entity_id | ID of the entities to be cloned. |
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.
buffer | Buffer to be deleted, returned from saveDataToBuffer. |
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.
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.
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.
data_stream | Address of the first byte of the buffer to be loaded onto the Data Layer. |
data_len | Size of the buffer to be loaded. |
void * TSL3DStandardDataLayer::operator new | ( | size_t | size | ) |
Allocation override for API redirection.
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.
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.
entity_id | ID of the entity to remove from the TSLStandardDataLayer. |
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.
filename | Save data file name. |
ver | MapLink version to save as. |
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.
data_len | Storage for size of the data to be saved. |
ver | MapLink version to save as. |