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

Detailed Description

Accessor for a set of entities.

Allows creation and query of entities.

Public Member Functions

bool appendData (const char *filename)
 
bool appendDataFromBuffer (unsigned char *buffer, TSLSize length)
 
bool clear ()
 
TSLArccreateArc (TSLFeatureID featureID, double startAngle, double endAngle, TSLTMC cx, TSLTMC cy, TSLTMC radx, TSLTMC rady=0, double rotation=0)
 
TSLBorderedPolygoncreateBorderedPolygon (TSLFeatureID featureID, TSLCoordSet *coords, TSLTMC width, bool keepCoordSet=false)
 
TSLBorderedPolygoncreateBorderedPolygon (TSLFeatureID featureID, const TSLCoordSet &coords, TSLTMC width)
 
TSLEntitycreateClone (const TSLEntity *source)
 
TSLEllipsecreateEllipse (TSLFeatureID featureID, TSLTMC cx, TSLTMC cy, TSLTMC radx, TSLTMC rady=0, double rotation=0.0)
 
TSLEntitySetcreateEntitySet ()
 
TSLGeodeticArccreateGeodeticArc (TSLFeatureID featureID, double startAngle, double endAngle, TSLTMC cx, TSLTMC cy, double radx, double rady=0.0, double rotation=0)
 
TSLGeodeticEllipsecreateGeodeticEllipse (TSLFeatureID featureID, TSLTMC cx, TSLTMC cy, double radx, double rady=0.0, double rotation=0.0)
 
TSLGeodeticPolygoncreateGeodeticPolygon (TSLFeatureID featureID, TSLCoordSet *coords, bool keepCoordSet=false)
 
TSLGeodeticPolygoncreateGeodeticPolygon (TSLFeatureID featureID, const TSLCoordSet &coords)
 
TSLGeodeticPolylinecreateGeodeticPolyline (TSLFeatureID featureID, TSLCoordSet *coords, bool keepCoordSet=false)
 
TSLGeodeticPolylinecreateGeodeticPolyline (TSLFeatureID featureID, const TSLCoordSet &coords)
 
TSLGeodeticSymbolcreateGeodeticSymbol (TSLFeatureID featureID, TSLTMC x, TSLTMC y, TSLTMC height=100, double rotation=0)
 
TSLGeodeticTextcreateGeodeticText (TSLFeatureID featureID, TSLTMC x, TSLTMC y, const char *value, TSLTMC height=100, TSLHorizontalAlignment xalign=TSLHorizontalAlignmentCentre, TSLVerticalAlignment yalign=TSLVerticalAlignmentMiddle, double rotation=0)
 
TSLPolygoncreatePolygon (TSLFeatureID featureID, TSLCoordSet *coords, bool keepCoordSet=false)
 
TSLPolygoncreatePolygon (TSLFeatureID featureID, const TSLCoordSet &coords)
 
TSLPolylinecreatePolyline (TSLFeatureID featureID, TSLCoordSet *coords, bool keepCoordSet=false)
 
TSLPolylinecreatePolyline (TSLFeatureID featureID, const TSLCoordSet &coords)
 
TSLRectanglecreateRectangle (TSLFeatureID featureID, const TSLCoord &bottomLeft, const TSLCoord &topRight, double rotation=0)
 
TSLSymbolcreateSymbol (TSLFeatureID featureID, TSLTMC x, TSLTMC y, TSLTMC height=100, double rotation=0)
 
TSLTextcreateText (TSLFeatureID featureID, TSLTMC x, TSLTMC y, const char *value, TSLTMC height=100, TSLHorizontalAlignment xalign=TSLHorizontalAlignmentCentre, TSLVerticalAlignment yalign=TSLVerticalAlignmentMiddle, double rotation=0)
 
TSLUserGeometryEntitycreateUserGeometry (TSLClientUserGeometryEntity *client, bool takeOwnership=true)
 
bool deleteBufferData (unsigned char *buffer) const
 
int find (const TSLEntity *entity) const
 
bool insert (TSLEntity *source, int index=-1)
 
bool loadData (const char *filename)
 
bool loadDataFromBuffer (unsigned char *buffer, TSLSize length)
 
TSLEntityoperator[] (int index)
 
const TSLEntityoperator[] (int index) const
 
bool removeEntity (TSLEntity *entity)
 
bool removeEntity (Int index)
 
bool saveData (const char *filename, TSLMapLinkVersion ver=TSL_CURRENT_MAPLINK_VERSION) const
 
unsigned char * saveDataToBuffer (TSLSize *length, TSLMapLinkVersion ver=TSL_CURRENT_MAPLINK_VERSION) const
 
int size () const
 
- Public Member Functions inherited from TSLEntity
TSLCoord centroid () const
 
TSLEntityclone () const
 
bool contains (const TSLEntity *other) const
 
bool crosses (const TSLEntity *other) const
 
void alwaysMergeDifferences (bool _alwaysMergeDifferences)
 
TSLEntitydifference (const TSLEntity *other) const
 
double distance (const TSLCoord &point, bool useRenderedExtent=true, int drawingSurfaceID=-1) const
 
TSLEnvelope envelope (int surfaceID=-1) const
 
bool equals (const TSLEntity *other) const
 
TSLEntityintersection (const TSLEntity *other) const
 
bool intersects (const TSLEntity *other) const
 
bool intersects (const TSLEnvelope *envelope) const
 
bool move (const TSLCoord &location, const TSLCoord &reference)
 
bool overlaps (const TSLEntity *other) const
 
TSLEntitySetparent ()
 
const TSLEntitySetparent () const
 
void renderLevel (int level)
 
int renderLevel () const
 
bool rotate (double angle, const TSLCoord *origin=NULL)
 
double rotation () const
 
bool rotation (double newValue)
 
bool scale (double scaleParam, TSLCoord *origin=0)
 
bool scaleXY (double scaleX, double scaleY, TSLCoord *origin=0)
 
double squareDistance (const TSLCoord &point, bool useRenderedExtent=true, int drawingSurfaceID=-1) const
 
double squareDistance (const TSLEntity *otherEntity) const
 
bool touches (const TSLEntity *other) const
 
bool translate (TSLTMC xoffset, TSLTMC yoffset)
 
TSLEntityunionWith (const TSLEntity *other) const
 
bool within (const TSLEntity *other) const
 
TSLCoord adjustedWeightedCentroid ()
 reserved for future use
 
TSLCoord centreOfGravity ()
 reserved for future use
 
- Public Member Functions inherited from TSLEntityBase
bool addDataSet ()
 
bool addDataSet (TSLDataHandler *toUseDataHandler)
 
bool clearRenderingAttributes ()
 
TSLDataSetdataSet ()
 
const TSLDataSetdataSet () const
 
short dataSourceID () const
 
void dataSourceID (short dataSourceID)
 
bool deleteDataSet ()
 
void destroy ()
 
TSLEntityID entityID () const
 
void entityID (TSLEntityID value)
 
TSLFeatureID featureID () const
 
void featureID (TSLFeatureID newValue)
 
bool getRendering (TSLRenderingAttributeInt attribute, int *result) const
 
bool getRendering (TSLRenderingAttributeDouble attribute, double *result) const
 
bool getRendering (TSLRenderingAttributeBool attribute, bool *result) const
 
bool getRendering (TSLRenderingAttributes &result) const
 
TSL3DEntityis3DEntity ()
 
const TSL3DEntityis3DEntity () const
 
TSLEntityisEntity ()
 
const TSLEntityisEntity () const
 
bool isOptimisedEntity () const
 
void name (const char *newValue)
 
const char * name () const
 
void releaseResources (int surfaceID)
 
bool setRendering (TSLRenderingAttributeInt attribute, int value)
 
bool setRendering (TSLRenderingAttributeDouble attribute, double value)
 
bool setRendering (TSLRenderingAttributeBool attribute, bool value)
 
bool setRendering (const TSLRenderingAttributes &attributes)
 
void sourceID (int value)
 
int sourceID () const
 
TSLGeometryType type () const
 
void version (TSLVersion value)
 
TSLVersion version () const
 

Static Public Member Functions

static TSLEntitySetcreate ()
 
static const TSLEntitySetisEntitySet (const TSLEntity *entity)
 
static TSLEntitySetisEntitySet (TSLEntity *entity)
 
- Static Public Member Functions inherited from TSLEntity
static TSLEntitycreateFromWKB (const unsigned char *wkb, unsigned int wkbLength, double TMCPerMU, double mapOffsetX=0.0, double mapOffsetY=0.0, bool multiAsEntitySet=false, double maxCurveAngle=0.0)
 
static TSLEntitycreateFromWKT (const char *wkt, double TMCPerMU, double mapOffsetX=0.0, double mapOffsetY=0.0, bool multiAsEntitySet=false, double maxCurveAngle=0.0)
 

Protected Member Functions

 TSLEntitySet ()
 
 ~TSLEntitySet ()
 
- Protected Member Functions inherited from TSLEntity
 ~TSLEntity ()
 
- Protected Member Functions inherited from TSLEntityBase
 ~TSLEntityBase ()
 

Constructor & Destructor Documentation

◆ TSLEntitySet()

TSLEntitySet::TSLEntitySet ( )
protected

Private constructor to prevent user creation.

◆ ~TSLEntitySet()

TSLEntitySet::~TSLEntitySet ( )
protected

Member Function Documentation

◆ appendData()

bool TSLEntitySet::appendData ( const char * filename)

Appends data from the specified file.

This method allows the user to append data from the given filename into the TSLEntitySet. The data is appended at the end of the TSLEntitySet.

Parameters
filenameLoad data file name.
Returns
true on success, or false on error.

◆ appendDataFromBuffer()

bool TSLEntitySet::appendDataFromBuffer ( unsigned char * buffer,
TSLSize length )

Loads data from the specified buffer.

This method allows the user to load data from the given buffer into the TSLEntitySet. The data is appended at the end of the TSLEntitySet.

Parameters
bufferBuffer containing data to load.
lengthLength of data in buffer.
Returns
true on success, or false on error.

◆ clear()

bool TSLEntitySet::clear ( )

This method clears the set of entities, without deleting it. Returns true if successful, false otherwise.

◆ create()

static TSLEntitySet * TSLEntitySet::create ( )
static

Creates an empty entity set.

This call should only be used for temporary entities. For example, this call may be used to create entities that are used in the spatial tests.

Returns NULL on error.

◆ createArc()

TSLArc * TSLEntitySet::createArc ( TSLFeatureID featureID,
double startAngle,
double endAngle,
TSLTMC cx,
TSLTMC cy,
TSLTMC radx,
TSLTMC rady = 0,
double rotation = 0 )

Creates an arc with the specified parameters.

Once created, the arc is added to this entity set and returned for further manipulation.

All angles are in radians, +ve anti-clockwise from the +ve X axis.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
startAngleAngle for start of arc.
endAngleAngle for end of arc. If the same as startAngle, a full ellipse is drawn.
cxX coordinate of centre of ellipse the arc follows.
cyY coordinate of centre of ellipse the arc follows.
radxRadius of arc along X axis, before rotation.
radyRadius of arc along Y axis, before rotation. If 0, rady is assumed to be the same as radx.
rotationAngle of rotation of arc, about cx,cy.
Returns
entity pointer, NULL on error.

◆ createBorderedPolygon() [1/2]

TSLBorderedPolygon * TSLEntitySet::createBorderedPolygon ( TSLFeatureID featureID,
const TSLCoordSet & coords,
TSLTMC width )

Creates a bordered polygon with the specified parameters.

A bordered polygon is a closed, filled feature. The outline of the polygon may optionally have extra thick edges of a specified width, Each edge may be individually be flipped inside or outside of the polygon. It must be non-complex, ie. edges must not cross. although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.

Once created, the bordered polygon is added to this entity set and returned for further manipulation.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
coordsCoordinate set describing polygon.
widthWidth of thick edges. 0 is drawn as a normal polygon. All edges are initially inside the polygon.
Returns
NULL on error.

◆ createBorderedPolygon() [2/2]

TSLBorderedPolygon * TSLEntitySet::createBorderedPolygon ( TSLFeatureID featureID,
TSLCoordSet * coords,
TSLTMC width,
bool keepCoordSet = false )

Creates a bordered polygon with the specified parameters.

A bordered polygon is a closed, filled feature. The outline of the polygon may optionally have extra thick edges of a specified width, Each edge may be individually be flipped inside or outside of the polygon. It must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.

Once created, the bordered polygon is added to this entity set and returned for further manipulation.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
coordsCoordinate set describing polygon.
widthWidth of thick edges. 0 is drawn as a normal polygon. All edges are initially inside the polygon.
keepCoordSetFlag to indicate whether the entity should keep the specified coordinate set, or clone it. Note that if this flag is set, the entity assumes control of the coordinate set and invalidates it. The user should not attempt to make further use of the coordinate set.
Returns
NULL on error.

◆ createClone()

TSLEntity * TSLEntitySet::createClone ( const TSLEntity * source)

Creates a clone of the specified entity.

Once created, the clone is added to this entity set and returned for further manipulation.

Parameters
sourceSource entity to clone.
Returns
entity pointer, NULL on error.

◆ createEllipse()

TSLEllipse * TSLEntitySet::createEllipse ( TSLFeatureID featureID,
TSLTMC cx,
TSLTMC cy,
TSLTMC radx,
TSLTMC rady = 0,
double rotation = 0.0 )

Creates an ellipse with the specified parameters.

Once created, the ellipse is added to this entity set and returned for further manipulation.

All angles are in radians, +ve anti-clockwise from the +ve X axis.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
cxX coordinate of centre of ellipse.
cyY coordinate of centre of ellipse.
radxRadius of ellipse along X axis, before rotation.
radyRadius of ellipse along Y axis, before rotation. If 0, rady is assumed to be the same as radx.
rotationAngle of rotation of ellipse, about cx,cy.
Returns
NULL on error.

◆ createEntitySet()

TSLEntitySet * TSLEntitySet::createEntitySet ( )

Creates an empty entity set.

Once created, the entity set is added to this entity set and returned for further manipulation.

Returns NULL on error.

◆ createGeodeticArc()

TSLGeodeticArc * TSLEntitySet::createGeodeticArc ( TSLFeatureID featureID,
double startAngle,
double endAngle,
TSLTMC cx,
TSLTMC cy,
double radx,
double rady = 0.0,
double rotation = 0 )

Creates a geodetic arc with the specified parameters.

Once created, the geodetic arc is added to this entity set and returned for further manipulation.

All angles are in radians, +ve anti-clockwise from the +ve X axis.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
startAngleAngle for start of geodetic arc.
endAngleAngle for end of geodetic arc. If the same as startAngle, a full ellipse is drawn.
cxX coordinate of centre of ellipse the geodetic arc follows.
cyY coordinate of centre of ellipse the geodetic arc follows.
radxRadius of geodetic arc along X axis, before rotation. In metres.
radyRadius of geodetic arc along Y axis, before rotation. In metres. If 0, rady is assumed to be the same as radx.
rotationAngle of rotation of geodetic arc, about the centre coordinate of ellipse.
Returns
an entity pointer, NULL on error.

◆ createGeodeticEllipse()

TSLGeodeticEllipse * TSLEntitySet::createGeodeticEllipse ( TSLFeatureID featureID,
TSLTMC cx,
TSLTMC cy,
double radx,
double rady = 0.0,
double rotation = 0.0 )

Creates a new geodetic ellipse with the specified parameters.

Once created, the geodetic ellipse is added to this entity set and returned for further manipulation.

All angles are in radians, +ve anti-clockwise from the +ve X axis.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
cxX coordinate of centre of ellipse.
cyY coordinate of centre of ellipse.
radxRadius of ellipse along X axis, before rotation. In metres.
radyRadius of ellipse along Y axis, before rotation. In metres. If 0, rady is assumed to be the same as radx.
rotationAngle of rotation of ellipse, about centre.
Returns
NULL on error.

◆ createGeodeticPolygon() [1/2]

TSLGeodeticPolygon * TSLEntitySet::createGeodeticPolygon ( TSLFeatureID featureID,
const TSLCoordSet & coords )

Creates a geodetic polygon with the specified parameters.

A geodetic polygon is a closed, filled feature. It must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.

Once created, the geodetic polygon is added to this entity set and returned for further manipulation.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
coordsCoordinate set describing the geodetic polygon.
Returns
NULL on error.

◆ createGeodeticPolygon() [2/2]

TSLGeodeticPolygon * TSLEntitySet::createGeodeticPolygon ( TSLFeatureID featureID,
TSLCoordSet * coords,
bool keepCoordSet = false )

Creates a geodetic polygon with the specified parameters.

A geodetic polygon is a closed, filled feature. It must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.

Once created, the geodetic polygon is added to this entity set and returned for further manipulation.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
coordsCoordinate set describing the geodetic polygon.
keepCoordSetFlag to indicate whether the geodetic polygon should keep the specified coordinate set, or clone it. Note that if this flag is set, the geodetic polygon assumes control of the coordinate set and invalidates it. The user should not attempt to make further use of the coordinate set.
Returns
NULL on error.

◆ createGeodeticPolyline() [1/2]

TSLGeodeticPolyline * TSLEntitySet::createGeodeticPolyline ( TSLFeatureID featureID,
const TSLCoordSet & coords )

Creates a geodetic polyline with the specified parameters.

Once created, the polyline is added to this entity set and returned for further manipulation.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
coordsCoordinate set describing the polyline.
Returns
NULL on error.

◆ createGeodeticPolyline() [2/2]

TSLGeodeticPolyline * TSLEntitySet::createGeodeticPolyline ( TSLFeatureID featureID,
TSLCoordSet * coords,
bool keepCoordSet = false )

Creates a geodetic polyline with the specified parameters.

Once created, the polyline is added to this entity set and returned for further manipulation.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
coordsCoordinate set describing the polyline.
keepCoordSetFlag to indicate whether the geodetic polyline should keep the specified coordinate set, or clone it. Note that if this flag is set, the geodetic polyline assumes control of the coordinate set and invalidates it. The user should not attempt to make further use of the coordinate set.
Returns
NULL on error.

◆ createGeodeticSymbol()

TSLGeodeticSymbol * TSLEntitySet::createGeodeticSymbol ( TSLFeatureID featureID,
TSLTMC x,
TSLTMC y,
TSLTMC height = 100,
double rotation = 0 )

Creates a geodetic symbol with the specified parameters.

Once created, the geodetic symbol is added to this entity set and returned for further manipulation.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
xX coordinate of symbol position.
yY coordinate of symbol position.
heightSize of symbol in TMC units.
rotationAngle of rotation of symbol. Expressed in radians, +ve anti-clockwise from the +ve X axis.
Returns
NULL on error.

◆ createGeodeticText()

TSLGeodeticText * TSLEntitySet::createGeodeticText ( TSLFeatureID featureID,
TSLTMC x,
TSLTMC y,
const char * value,
TSLTMC height = 100,
TSLHorizontalAlignment xalign = TSLHorizontalAlignmentCentre,
TSLVerticalAlignment yalign = TSLVerticalAlignmentMiddle,
double rotation = 0 )

Creates a geodetic text object with the specified parameters.

Once created, the geodetic text is added to this entity set and returned for further manipulation.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
xX coordinate of text position.
yY coordinate of text position.
valueText string to be displayed.
heightSize of symbol in TMC units.
xalignX alignment of text. This position of the text string is placed at the x coordinate.
yalignY alignment of text. This position of the text string is placed at the y coordinate.
rotationAngle of rotation of text. Expressed in radians, +ve anti-clockwise from the +ve X axis.
Returns
NULL on error.

◆ createPolygon() [1/2]

TSLPolygon * TSLEntitySet::createPolygon ( TSLFeatureID featureID,
const TSLCoordSet & coords )

Creates a polygon with the specified parameters.

A polygon is a closed, filled feature. It must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.

Once created, the polygon is added to this entity set and returned for further manipulation.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
coordsCoordinate set describing polygon.
Returns
NULL on error.

◆ createPolygon() [2/2]

TSLPolygon * TSLEntitySet::createPolygon ( TSLFeatureID featureID,
TSLCoordSet * coords,
bool keepCoordSet = false )

Creates a polygon with the specified parameters.

A polygon is a closed, filled feature. It must be non-complex, ie. edges must not cross. although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.

Once created, the polygon is added to this entity set and returned for further manipulation.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
coordsCoordinate set describing polygon.
keepCoordSetFlag to indicate whether the entity should keep the specified coordinate set, or clone it. Note that if this flag is set, the entity assumes control of the coordinate set and invalidates it. The user should not attempt to make further use of the coordinate set.
Returns
NULL on error.

◆ createPolyline() [1/2]

TSLPolyline * TSLEntitySet::createPolyline ( TSLFeatureID featureID,
const TSLCoordSet & coords )

Creates a polyline with the specified parameters.

Once created, the polyline is added to this entity set and returned for further manipulation.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
coordsCoordinate set describing polyline.
Returns
NULL on error.

◆ createPolyline() [2/2]

TSLPolyline * TSLEntitySet::createPolyline ( TSLFeatureID featureID,
TSLCoordSet * coords,
bool keepCoordSet = false )

Creates a polyline with the specified parameters.

Once created, the polyline is added to this entity set and returned for further manipulation.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
coordsCoordinate set describing polyline.
keepCoordSetFlag to indicate whether the entity should keep the specified coordinate set, or clone it. Note that if this flag is set, the entity assumes control of the coordinate set and invalidates it. The user should not attempt to make further use of the coordinate set.
Returns
NULL on error.

◆ createRectangle()

TSLRectangle * TSLEntitySet::createRectangle ( TSLFeatureID featureID,
const TSLCoord & bottomLeft,
const TSLCoord & topRight,
double rotation = 0 )

Creates a rectangle with the specified parameters. Rectangles are two-dimensional filled entities.

Once created, the rectangle is added to this entity set and returned for further manipulation.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
bottomLeftBottom left coordinate of rectangle, before rotation.
topRightTop right coordinate of rectangle, before rotation.
rotationAngle of rotation of rectangle. Expressed in radians, +ve anti-clockwise from the +ve X axis.
Returns
NULL on error.

◆ createSymbol()

TSLSymbol * TSLEntitySet::createSymbol ( TSLFeatureID featureID,
TSLTMC x,
TSLTMC y,
TSLTMC height = 100,
double rotation = 0 )

Creates a symbol with the specified parameters.

Once created, the symbol is added to this entity set and returned for further manipulation.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
xX coordinate of symbol position.
yY coordinate of symbol position.
heightSize of symbol. If the symbol is a scalable symbol, this height should be in TMC units. If the symbol is a non-scalable symbol, this height should be in pixels.
rotationAngle of rotation of symbol. Expressed in radians, +ve anti-clockwise from the +ve X axis.
Returns
NULL on error.

◆ createText()

TSLText * TSLEntitySet::createText ( TSLFeatureID featureID,
TSLTMC x,
TSLTMC y,
const char * value,
TSLTMC height = 100,
TSLHorizontalAlignment xalign = TSLHorizontalAlignmentCentre,
TSLVerticalAlignment yalign = TSLVerticalAlignmentMiddle,
double rotation = 0 )

Creates a text object with the specified parameters.

Once created, the text is added to this entity set and returned for further manipulation.

Parameters
featureIDID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
xX coordinate of text position.
yY coordinate of text position.
valueText string to be displayed.
heightSize of symbol in TMC units.
xalignX alignment of text. This position of the text string is placed at the x coordinate.
yalignY alignment of text. This position of the text string is placed at the y coordinate.
rotationAngle of rotation of text. Expressed in radians, +ve anti-clockwise from the +ve X axis.
Returns
NULL on error.

◆ createUserGeometry()

TSLUserGeometryEntity * TSLEntitySet::createUserGeometry ( TSLClientUserGeometryEntity * client,
bool takeOwnership = true )

Creates a user geometry object with the callback class provided.

Once created, the user geometry is added to this entity set and returned for further manipulation.

Parameters
clientThe callback class that provides the geometry logic to MapLink on request.
takeOwnershipSpecifies whether MapLink should assume ownership of the client parameter. When there is a mismatch between the compiler version used to build MapLink and the version used to build the calling code, this should always be false.
Returns
NULL on error.

◆ deleteBufferData()

bool TSLEntitySet::deleteBufferData ( unsigned char * buffer) const

Delete the buffer returned from 'saveDataToBuffer'.

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

Parameters
bufferBuffer to be deleted, returned from saveDataToBuffer.

◆ find()

int TSLEntitySet::find ( const TSLEntity * entity) const

Find the position of an entity within this entity set.

Parameters
entityEntity to find.
Returns
index of entity, if it exists in this entity set, or -1 if not found.

◆ insert()

bool TSLEntitySet::insert ( TSLEntity * source,
int index = -1 )

Inserts an entity into this entity set.

The entity is placed at the specified index. If the index is out of the current range, then it is appended to the entity set.

An entity may only exist in one entity set. It is removed from its current entity set before being inserted into a new one.

Parameters
sourceEntity to insert into the set.
indexPosition to place entity. If this is out of range of the current entity set, then it is appended to the set.
Returns
false on error, true otherwise.

◆ isEntitySet() [1/2]

static const TSLEntitySet * TSLEntitySet::isEntitySet ( const TSLEntity * entity)
static

Query whether the entity is an entity set.

If this entity is an entity set, returns an accessor, otherwise returns NULL.

When querying Optimised maps this query may return NULL.

Parameters
entitythe entity to query

◆ isEntitySet() [2/2]

static TSLEntitySet * TSLEntitySet::isEntitySet ( TSLEntity * entity)
static

Query whether the entity is an entity set.

If this entity is an entity set, returns an accessor, otherwise returns NULL.

When querying Optimised maps this query may return NULL.

Parameters
entitythe entity to query

◆ loadData()

bool TSLEntitySet::loadData ( const char * filename)

Loads data from the specified file.

This method allows the user to load data from the given filename into the TSLEntitySet. The TSLEntitySet is cleared first.

Parameters
filenameLoad data file name.
Returns
true on success, or false on error.

◆ loadDataFromBuffer()

bool TSLEntitySet::loadDataFromBuffer ( unsigned char * buffer,
TSLSize length )

Loads data from the specified buffer.

This method allows the user to load data from the given buffer into the TSLEntitySet. The TSLEntitySet is cleared first.

Parameters
bufferBuffer containing data to load.
lengthLength of data in buffer.
Returns
true on success, or false on error.

◆ operator[]() [1/2]

TSLEntity * TSLEntitySet::operator[] ( int index)

Queries the entity at the specified index.

Parameters
indexIndex into set to return
Returns
entity pointer, NULL on error.

◆ operator[]() [2/2]

const TSLEntity * TSLEntitySet::operator[] ( int index) const

Queries the read-only entity at the specified index.

Parameters
indexIndex into set to return
Returns
read-only entity pointer, NULL on error.

◆ removeEntity() [1/2]

bool TSLEntitySet::removeEntity ( Int index)

Removes the entity at index from the entity set and deletes it.

Parameters
indexThe index of the TSLEntity to remove
Returns
true if the entity was removed, or false if the entity isn't part of the set.

◆ removeEntity() [2/2]

bool TSLEntitySet::removeEntity ( TSLEntity * entity)

Removes the given entity from the entity set.

Parameters
entityThe TSLEntity to remove.
Returns
true if the entity was removed, or false if the entity isn't part of the set.

◆ saveData()

bool TSLEntitySet::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 TSLEntitySet 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 * TSLEntitySet::saveDataToBuffer ( TSLSize * length,
TSLMapLinkVersion ver = TSL_CURRENT_MAPLINK_VERSION ) const

Saves data to the specified buffer.

This method allows the user to save the data currently loaded in the TSLEntitySet to a buffer. It is the callers responsibility to free the buffer using the 'deleteBufferData' call.

Parameters
lengthStorage for length of returned buffer.
verMapLink version to save as
Returns
address of the buffer where the data has been saved, NULL on error.

◆ size()

int TSLEntitySet::size ( ) const

Queries the size of the entity set.