CartoType C++ API 7.8.2, 2022-03-25
for Windows, Linux, Qt and other platforms supporting C++ development
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CartoType::CMapObject Class Referenceabstract

#include <cartotype_map_object.h>

Inheritance diagram for CartoType::CMapObject:
CartoType::MPath

Classes

class  CMatch
 
union  TUserData
 

Public Types

enum class  TMatchType {
  None , Substring , Fuzzy , Phrase ,
  Full
}
 

Public Member Functions

virtual std::unique_ptr< CMapObjectCopy (TResult &aError) const
 
virtual TText StringAttributes () const =0
 
virtual TText Label () const =0
 
virtual TWritableContour WritableContour (size_t aIndex)=0
 
virtual MStringWritableStringAttributes ()
 
virtual const TBitmapBitmap () const
 
virtual const TTransformBitmapTransform () const
 
virtual void Normalize ()
 
virtual void Simplify (int32_t aResolution)
 
void Split (size_t aMaxPoints, CMapObjectArray &aExtraObjectArray)
 
virtual TAttribSet * AttribSet ()
 
const TAttribSet * AttribSet () const
 
virtual std::shared_ptr< CProjection > Projection () const
 
TText GetStringAttribute (const MString &aName) const
 
TText GetStringAttribute (const CString &aName) const
 
TText GetStringAttributeForLocale (const MString &aName, const char *aLocale) const
 
TText GetStringAttributeForLocale (const CString &aName, const char *aLocale) const
 
bool GetStringAttributeUsingPath (const MString &aPath, const MString &aDefault, TText &aValue) const
 
std::map< CString, CStringGetStringAttributes () const
 
uint64_t Id () const
 
TMapObjectType Type () const
 
uint32_t IntAttribute () const
 
const MStringLayerName () const
 
CRefCountedString LayerRef () const
 
CString GenericName (const char *aLocale=nullptr) const
 
std::string Description () const
 
std::string VerboseDescription () const
 
TPointFP Center () const
 
TPointFP CenterInDegrees (TResult &aError) const
 
TRectFP BoundsInDegrees (TResult &aError) const
 
CGeometry GeometryInDegrees (TResult &aError) const
 
bool GetHeight (TPoint aPoint, bool aHaveMetres, const TTransform *aInverseTransform, int32_t &aHeight) const
 
TGeoCodeType GetGeoCodeType () const
 
void GetGeoCodeItem (CGeoCodeItem &aGeoCodeItem, const char *aLocale) const
 
double MaxSpeed () const
 
double Top () const
 
double Bottom () const
 
double DimensionAttribute (const MString &aKey) const
 
bool NextStringAttribute (size_t &aPos, TText &aName, TText &aValue) const
 
bool Mergeable (const CMapObject &aOther) const
 
void Project (const TMapTransform &aProjection)
 
void Project (const CProjection &aProjection)
 
void Smooth ()
 
void Offset (int32_t aDx, int32_t aDy)
 
bool Clip (const TRect &aClip, std::unique_ptr< CMapObject > &aClippedObject, CMapObjectArray *aExtraClippedObjectArray=nullptr, bool aLinesMustBeSingleContours=false) const
 
bool Clip (const TClipRegion &aClip, std::unique_ptr< CMapObject > &aClippedObject, CMapObjectArray *aExtraClippedObjectArray=nullptr, bool aLinesMustBeSingleContours=false) const
 
std::unique_ptr< CMapObjectFlatten (double aDistance) const
 
std::unique_ptr< CMapObjectInterpolate (int32_t aGranularity) const
 
void SetType (TMapObjectType aType)
 
TResult Write (TDataOutputStream &aOutput, const CProjection *aProjectionFromLatLong=nullptr) const
 
double Area (TResult &aError) const
 
double LengthOrPerimeter (TResult &aError) const
 
void SetId (uint64_t aId)
 
void SetIntAttribute (uint32_t aValue)
 
void SetLayer (CRefCountedString aLayer)
 
TResult GetMatch (CMatch &aMatch, const MString &aText, TStringMatchMethod aMatchMethod, const MString *aAttributes=nullptr, bool aPhrase=true) const
 
TMatchType MatchType (const MString &aText) const
 
void SetUserData (int64_t aData)
 
int64_t UserData () const
 
void SetUserDataToPointer (void *aData)
 
void * UserDataAsPointer () const
 
void SetUserDataToUnion (TUserData aUserData)
 
TUserData UserDataAsUnion () const
 
COutline Clip (TClipOperation aClipOperation, const MPath &aClip) const
 
- Public Member Functions inherited from CartoType::MPath
virtual ~MPath ()
 
virtual size_t Contours () const =0
 
virtual TContour Contour (size_t aIndex) const =0
 
virtual bool MayHaveCurves () const =0
 
template<class MPathTraverser >
void Traverse (MPathTraverser &aTraverser, const TRect &aClip) const
 
template<class MPathTraverser >
void Traverse (MPathTraverser &aTraverser, const TRect *aClip=nullptr) const
 
bool operator== (const MPath &aOther) const
 
TRect CBox () const
 
bool CBoxBiggerThan (int32_t aSize) const
 
bool IsContainedIn (const TRect &aRect) const
 
bool Contains (double aX, double aY) const
 
bool Contains (const TPoint &aPoint) const
 
bool Contains (const TPointFP &aPoint) const
 
bool MayIntersect (const TRect &aRect) const
 
bool MayIntersect (const TRect &aRect, int32_t aBorder) const
 
bool Intersects (const TRect &aRect) const
 
bool Intersects (const MPath &aPath, const TRect *aBounds=nullptr) const
 
int32_t MaxDistanceFromOrigin () const
 
TPathIntersectionType IntersectionType (const MPath &aOther, double *aDistance=nullptr, TPointFP *aNearest1=nullptr, TPointFP *aNearest2=nullptr) const
 
TPathIntersectionInfo IntersectionInfo (const MPath &aOther) const
 
double DistanceFrom (const MPath &aOther, TPointFP *aNearest1=nullptr, TPointFP *aNearest2=nullptr, TPathIntersectionType *aType=nullptr) const
 
double DistanceFromPoint (const TPointFP &aPoint, TPointFP *aNearest=nullptr, size_t *aContourIndex=nullptr, size_t *aLineIndex=nullptr, double *aFractionaLineIndex=nullptr, bool aTreatAsOpen=false) const
 
bool IsClippingNeeded (const TRect &aClip) const
 
COutline Copy () const
 
COutline ClippedPath (const TRect &aClip) const
 
COutline ClippedPath (const MPath &aClip) const
 
COutline ClippedPath (const TClipRegion &aClip) const
 
COutline Clip (TClipOperation aClipOperation, const MPath &aClip) const
 
COutline Envelope (double aOffset) const
 
bool IsSmoothingNeeded () const
 
COutline SmoothPath () const
 
COutline FlatPath (double aMaxDistance) const
 
COutline TruncatedPath (double aStart, double aEnd) const
 
COutline OffsetPath (double aOffset) const
 
COutline TransformedPath (const TTransform &aTransform) const
 
COutline TransformedPath (TDrawResult &aError, MPointTransformer &aTransformer, int32_t aFractionalBits) const
 
std::array< TLine, 3 > GetHorizontalPaths (int32_t aPathLength, int32_t aLabelHeight, const TPointFP &aUpVector, const TRect *aBounds, const TRect *aClip) const
 
TPointFP CenterOfGravity () const
 
void GetCenterOfGravity (TPoint &aCenter) const
 
double Length () const
 
double Area () const
 
TPointFP PointAtLength (double aPos) const
 
std::pair< TPoint, bool > End () const
 
void Write (TDataOutputStream &aOutput) const
 
bool IsEmpty () const
 
bool IsPoint () const
 
bool IsGridOrientedRectangle (TRect *aRect=nullptr) const
 
void GetSphericalAreaAndLength (const CProjection &aProjection, double *aArea, double *aLength) const
 
TClipType ClipType (const TRect &aRect) const
 
bool HasCurves () const
 
ConstIter begin () const
 
ConstIter end () const
 

Protected Member Functions

 CMapObject (CRefCountedString aLayer, TMapObjectType aType)
 
 CMapObject (CRefCountedString aLayer, TMapObjectType aType, TUserData aUserData)
 
 CMapObject (const CMapObject &aOther)=default
 
CMapObjectoperator= (const CMapObject &aOther)=default
 

Protected Attributes

CRefCountedString iLayer
 
uint64_t iId = 0
 
TMapObjectType iType
 
uint32_t iIntAttribute = 0
 
TUserData iUserData
 

Detailed Description

The abstract base map object class. A map object is a path that also possesses cartographic attributes.

Member Enumeration Documentation

◆ TMatchType

A type for different qualities of text match.

Enumerator
None 

No match.

Substring 

A substring of the text matches, but the substring is not aligned to token boundaries.

Fuzzy 

There is a fuzzy match: a small number of extra characters, missing characters, or transpositions.

Phrase 

There is a phrase match: a substring match aligned to token boundaries.

Full 

A full match, ignoring letter case and accents.

Constructor & Destructor Documentation

◆ CMapObject() [1/3]

CartoType::CMapObject::CMapObject ( CRefCountedString  aLayer,
TMapObjectType  aType 
)
inlineprotected

Creates a map object with a specified layer and type.

◆ CMapObject() [2/3]

CartoType::CMapObject::CMapObject ( CRefCountedString  aLayer,
TMapObjectType  aType,
TUserData  aUserData 
)
inlineprotected

Creates a map object with a specified layer, type and user data.

◆ CMapObject() [3/3]

CartoType::CMapObject::CMapObject ( const CMapObject aOther)
protecteddefault

Creates a map object by copying another one.

Member Function Documentation

◆ Area()

double CartoType::CMapObject::Area ( TResult aError) const

Calculates the area of a map object in square meters, using the projection stored in the map object. Returns 0 if the object is a point or line object.

◆ AttribSet() [1/2]

virtual TAttribSet * CartoType::CMapObject::AttribSet ( )
inlinevirtual

Returns a pointer to a TAttribSet if possible; used by makemap.

◆ AttribSet() [2/2]

const TAttribSet * CartoType::CMapObject::AttribSet ( ) const
inline

Returns a constant pointer to a TAttribSet if possible; used by makemap.

◆ Bitmap()

virtual const TBitmap * CartoType::CMapObject::Bitmap ( ) const
virtual

If the object contains array data that can be represented as a bitmap, returns a pointer to the bitmap. The base implementation returns null.

◆ BitmapTransform()

virtual const TTransform * CartoType::CMapObject::BitmapTransform ( ) const
virtual

If the object contains array data that can be represented as a bitmap, returns a transform to convert from the bitmap bounds to the extent in map coordinates. The base implementation returns null.

◆ Bottom()

double CartoType::CMapObject::Bottom ( ) const

Gets the bottom of an object in metres by reading it from the _b attribute. Return 0 if no bottom is specified. The _b attribute is a copy of the OpenStreetMap 'min_height' attribute.

◆ BoundsInDegrees()

TRectFP CartoType::CMapObject::BoundsInDegrees ( TResult aError) const

Returns the bounding box of a map object in degrees.

◆ Center()

TPointFP CartoType::CMapObject::Center ( ) const

Returns the center of a map object in map coordinates. The center is defined as the center of gravity for polygons and arrays, a point half way along the path for lines, and the point itself for points.

◆ CenterInDegrees()

TPointFP CartoType::CMapObject::CenterInDegrees ( TResult aError) const

Returns the center of a map object in degrees. The center is defined as the center of gravity for polygons and arrays, a point half way along the path for lines, and the point itself for points. Because the center is calculated using map coordinates then converted to degrees, it depends on the map projection used by the map object.

◆ Clip() [1/3]

bool CartoType::CMapObject::Clip ( const TClipRegion aClip,
std::unique_ptr< CMapObject > &  aClippedObject,
CMapObjectArray aExtraClippedObjectArray = nullptr,
bool  aLinesMustBeSingleContours = false 
) const

Clips a map object to the clip region aClip.

If the object was clipped the function returns true and puts the clipped object, which may be null, in aClippedObject.

If aExtraClippedObjectArray is non-null, line objects with a single contour may be clipped into multiple objects to preserve their single-line nature, in which case the extra objects are appended to aExtraClippedObjectArray. All other objects are clipped to a single object.

If aLinesMustBeSingleContours is true, line objects are never converted to multiple contours, even if aExtraClippedObjectArray is non-null. They are not clipped if that is necessary.

If the object was not clipped (i.e., it was entirely contained in aClip) the function returns false.

◆ Clip() [2/3]

bool CartoType::CMapObject::Clip ( const TRect aClip,
std::unique_ptr< CMapObject > &  aClippedObject,
CMapObjectArray aExtraClippedObjectArray = nullptr,
bool  aLinesMustBeSingleContours = false 
) const

Clips a map object to the rectangle aClip.

If the object was clipped the function returns true and puts the clipped object, which may be null, in aClippedObject.

If aExtraClippedObjectArray is non-null, line objects with a single contour may be clipped into multiple objects to preserve their single-line nature, in which case the extra objects are appended to aExtraClippedObjectArray. All other objects are clipped to a single object.

If aLinesMustBeSingleContours is true, line objects are never converted to multiple contours, even if aExtraClippedObjectArray is non-null. They are not clipped if that is necessary.

If the object was not clipped (i.e., it was entirely contained in aClip) the function returns false.

◆ Clip() [3/3]

COutline CartoType::MPath::Clip ( TClipOperation  aClipOperation,
const MPath aClip 
) const

Performs a general clip operation, which is one of clip, union, difference and exclusive or, on this path using aClip as the clip path, and returns the resulting path. The clipping path (aClip) must be made from closed contours only.

◆ Copy()

virtual std::unique_ptr< CMapObject > CartoType::CMapObject::Copy ( TResult aError) const
virtual

Creates a copy of a map object. The base implementation works for all types of map object except array map objects.

◆ Description()

std::string CartoType::CMapObject::Description ( ) const

Creates a UTF-8 string describing a map object; used for debugging. The string consists of the object's string attributes, separated by | characters, then the layer, OSM type and object type in square brackets. The object type is encoded as a single character: . - @ # for point, line, polygon and array.

◆ DimensionAttribute()

double CartoType::CMapObject::DimensionAttribute ( const MString aKey) const

Gets the value of a OpenStreetMap dimension attribute in meters.

◆ Flatten()

std::unique_ptr< CMapObject > CartoType::CMapObject::Flatten ( double  aDistance) const

Returns a version of a map object with all curved line segments flattened by being replaced by short straight line segments. Returns null if no flattening is needed.

◆ GenericName()

CString CartoType::CMapObject::GenericName ( const char *  aLocale = nullptr) const

Creates a generic name for a map object, using the supplied locale if possible. For example "restaurant", "fuel station" or "minor road".

Note: locales are not yet implemented. All category names are in English.

◆ GeometryInDegrees()

CGeometry CartoType::CMapObject::GeometryInDegrees ( TResult aError) const

Returns the geometry of a map object in degrees.

◆ GetGeoCodeItem()

void CartoType::CMapObject::GetGeoCodeItem ( CGeoCodeItem aGeoCodeItem,
const char *  aLocale 
) const

Gets information used when geocoding a map object.

◆ GetGeoCodeType()

TGeoCodeType CartoType::CMapObject::GetGeoCodeType ( ) const

Returns the geocode type of a map object.

◆ GetHeight()

bool CartoType::CMapObject::GetHeight ( TPoint  aPoint,
bool  aHaveMetres,
const TTransform aInverseTransform,
int32_t &  aHeight 
) const

Gets the height of a point in metres if this map object contains terrain heights. The argument aPoint is in map coordinates. The return value is true if a height is successfully obtained.

There is no check for the validity or sanity of the data. The argument aHaveMetres indicates whether the object contains 16-bit metre values, or bytes encoding feet.

Feet are encoded as follows: 0 for unknown heights (sea or unspecified); 1...15 for -1400ft to sea level in intervals of 100ft; 16...195 for 100ft to 18,000ft in intervals of 100ft; and 196...255 for 18,200ft to 30,000ft in intervals of 200ft.

If aInverseTransform is supplied, it is the inverse of the transform used to convert from bitmap coordinates to map coordinates. If it is not supplied, it is calculated from the bitmap.

◆ GetMatch()

TResult CartoType::CMapObject::GetMatch ( CMatch aMatch,
const MString aText,
TStringMatchMethod  aMatchMethod,
const MString aAttributes = nullptr,
bool  aPhrase = true 
) const

Finds the first string attribute matching aText, using aMatchMethod, and returns information about it in aMatch. If aAttributes is non-null, examines only attributes in the supplied comma-separated list, otherwise examines all attributes except those starting with an underscore, which by convention are non-textual. Attribute names may contain the wild cards ? and *. If aPhrase is true (the default), allows matches of phrases within the attribute.

◆ GetStringAttribute() [1/2]

TText CartoType::CMapObject::GetStringAttribute ( const CString aName) const
inline

Gets the value of the string attribute with name aName.

◆ GetStringAttribute() [2/2]

TText CartoType::CMapObject::GetStringAttribute ( const MString aName) const
inline

Gets the value of the string attribute with name aName.

◆ GetStringAttributeForLocale() [1/2]

TText CartoType::CMapObject::GetStringAttributeForLocale ( const CString aName,
const char *  aLocale 
) const
inline

Gets a string attribute for a given locale by appending a colon then the locale to aName. If no such attribute is available use the locale truncated to two letters if it was longer, then try the plain name. The empty attribute name is changed to 'name' if a locale is added.

◆ GetStringAttributeForLocale() [2/2]

TText CartoType::CMapObject::GetStringAttributeForLocale ( const MString aName,
const char *  aLocale 
) const

Gets a string attribute for a given locale by appending a colon then the locale to aName. If no such attribute is available use the locale truncated to two letters if it was longer, then try the plain name. The empty attribute name is changed to 'name' if a locale is added.

◆ GetStringAttributes()

std::map< CString, CString > CartoType::CMapObject::GetStringAttributes ( ) const

Gets all the string attributes as a std::map from names to values.

◆ GetStringAttributeUsingPath()

bool CartoType::CMapObject::GetStringAttributeUsingPath ( const MString aPath,
const MString aDefault,
TText aValue 
) const

Gets a string attribute from a list of semi-colon-separated names in aPath. Replaces empty names with aDefault (as for example if aPath is empty and aDefault is 'name:es'). Returns the first non-empty result.

Returns true if the returned attribute is a name attribute, defined as the empty attribute, or 'name', or any attribute starting with 'name:'.

◆ Id()

uint64_t CartoType::CMapObject::Id ( ) const
inline

Returns the identifier of this object. Identifiers are opaque 64-bit numbers that are specific to a database. The value zero is reserved and means 'no identifier'.

◆ IntAttribute()

uint32_t CartoType::CMapObject::IntAttribute ( ) const
inline

Returns the integer attribute.

◆ Interpolate()

std::unique_ptr< CMapObject > CartoType::CMapObject::Interpolate ( int32_t  aGranularity) const

Creates a new map object, interpolating extra points so that the maximum difference between coordinates doesn't exceed aGranularity. Chooses the points to be interpolated using the coordinate modulo aGranularity, so that adjacent polygons have the same interpolated points and thus meet without gaps.

◆ Label()

virtual TText CartoType::CMapObject::Label ( ) const
pure virtual

Returns the default label or name of the object: the first, unnamed, string attribute.

◆ LayerName()

const MString & CartoType::CMapObject::LayerName ( ) const
inline

Returns the name of the layer this object belongs to.

◆ LayerRef()

CRefCountedString CartoType::CMapObject::LayerRef ( ) const
inline

Returns the reference-counted name of the layer.

◆ LengthOrPerimeter()

double CartoType::CMapObject::LengthOrPerimeter ( TResult aError) const

Calculates the length or perimeter of a map object in meters, using the projection stored in the map object. Returns 0 if the object is a point object.

◆ MatchType()

TMatchType CartoType::CMapObject::MatchType ( const MString aText) const

Finds out whether a map object is a partial or full match for some text.

If the text matches the whole of a name attribute, or the whole of a sub-part of a name attribute (using spaces, hyphens, single quotes, colons, semicolons and slashes as separators) ignoring case and accents, it's a phrase match or a fuzzy match.

If it matches part of the attribute it's a phrase match.

◆ MaxSpeed()

double CartoType::CMapObject::MaxSpeed ( ) const

If the string attribute '_s' exists, treats it as a maximum speed represented according to OpenStreetMap conventions and returns the value in kilometres per hour.

The speed limit is stored as either a plain number denoting kph, a number followed by 'mph' denoting miles per hour, or a country code followed by a category as defined in http://wiki.openstreetmap.org/wiki/Speed_limits.

◆ Mergeable()

bool CartoType::CMapObject::Mergeable ( const CMapObject aOther) const

Returns true if this map object can be merged with aOther.

◆ NextStringAttribute()

bool CartoType::CMapObject::NextStringAttribute ( size_t &  aPos,
TText aName,
TText aValue 
) const

Gets the next string attribute, starting at character position aPos in the string attributes, and updates aPos. Returns true if an attribute is found.

This function can be used to enumerate string attributes by passing 0 as aPos and repeating until a value of false is returned.

◆ Normalize()

virtual void CartoType::CMapObject::Normalize ( )
virtual

Normalizes a map object if possible by removing point contours with no points, polygon contours with fewer than 3 points, and line contours with fewer than 2 points. The base implementation does nothing.

◆ Offset()

void CartoType::CMapObject::Offset ( int32_t  aDx,
int32_t  aDy 
)

Offsets all points in the map object by the specified amounts.

◆ operator=()

CMapObject & CartoType::CMapObject::operator= ( const CMapObject aOther)
protecteddefault

The assignment operator.

◆ Project() [1/2]

void CartoType::CMapObject::Project ( const CProjection &  aProjection)

Projects all the points in a map object using the specified projection.

◆ Project() [2/2]

void CartoType::CMapObject::Project ( const TMapTransform &  aProjection)

Projects all the points in a map object to 64ths of pixels using the specified projection.

◆ Projection()

virtual std::shared_ptr< CProjection > CartoType::CMapObject::Projection ( ) const
inlinevirtual

Returns the projection used to convert from degrees of latitude and longitude to the map units used by this object, or null if the projection is not known.

◆ SetId()

void CartoType::CMapObject::SetId ( uint64_t  aId)
inline

Sets the ID.

◆ SetIntAttribute()

void CartoType::CMapObject::SetIntAttribute ( uint32_t  aValue)
inline

Sets the 32-bit integer attribute, which contains the road type if the object is a road.

◆ SetLayer()

void CartoType::CMapObject::SetLayer ( CRefCountedString  aLayer)
inline

Sets the layer.

◆ SetType()

void CartoType::CMapObject::SetType ( TMapObjectType  aType)
inline

Sets the map object type.

◆ SetUserData()

void CartoType::CMapObject::SetUserData ( int64_t  aData)
inline

Sets the user data to a 64-bit integer.

◆ SetUserDataToPointer()

void CartoType::CMapObject::SetUserDataToPointer ( void *  aData)
inline

Sets the user data to a pointer.

◆ SetUserDataToUnion()

void CartoType::CMapObject::SetUserDataToUnion ( TUserData  aUserData)
inline

Sets the user data to a union

◆ Simplify()

virtual void CartoType::CMapObject::Simplify ( int32_t  aResolution)
virtual

Simplifies a map object, if possible, by re-sampling it at a specified resolution. The base implementation does nothing.

◆ Smooth()

void CartoType::CMapObject::Smooth ( )

Smooths a map object by converting sequences of straight lines to curves.

◆ Split()

void CartoType::CMapObject::Split ( size_t  aMaxPoints,
CMapObjectArray aExtraObjectArray 
)

Splits a line object into objects with no more than aMaxPoints points each. Puts any extra objects created into aExtraObjectArray.

◆ StringAttributes()

virtual TText CartoType::CMapObject::StringAttributes ( ) const
pure virtual

Returns all the string attributes, null-separated, as key-value pairs separated by an equals sign. The first key must be empty, and means the label or name.

◆ Top()

double CartoType::CMapObject::Top ( ) const

Gets the top of an object in metres by reading it from the _t attribute. Return 0 if no top is specified. The _t attribute is a copy of the OpenStreetMap 'height' attribute.

◆ Type()

TMapObjectType CartoType::CMapObject::Type ( ) const
inline

Returns the type of the object.

◆ UserData()

int64_t CartoType::CMapObject::UserData ( ) const
inline

Returns the user data as a 64-bit integer.

◆ UserDataAsPointer()

void * CartoType::CMapObject::UserDataAsPointer ( ) const
inline

Returns the user data as a pointer.

◆ UserDataAsUnion()

TUserData CartoType::CMapObject::UserDataAsUnion ( ) const
inline

Returns the user data as a union.

◆ VerboseDescription()

std::string CartoType::CMapObject::VerboseDescription ( ) const

Creates a verbose English-language description of a map object as a UTF-8 string.

◆ WritableContour()

virtual TWritableContour CartoType::CMapObject::WritableContour ( size_t  aIndex)
pure virtual

Returns a writable interface to the contour indexed by aIndex.

◆ WritableStringAttributes()

virtual MString * CartoType::CMapObject::WritableStringAttributes ( )
inlinevirtual

Returns a pointer to writable string attributes if possible; used by makemap.

◆ Write()

TResult CartoType::CMapObject::Write ( TDataOutputStream aOutput,
const CProjection *  aProjectionFromLatLong = nullptr 
) const

Writes a map object to an output stream in serialized form. Writes the geometry as degrees lat/long. (For internal use only : if the map object doesn't store its projection, which is true of stack-allocated CTM1 objects, the projection must be supplied.)

Member Data Documentation

◆ iId

uint64_t CartoType::CMapObject::iId = 0
protected

The object's identifier.

◆ iIntAttribute

uint32_t CartoType::CMapObject::iIntAttribute = 0
protected

The integer attribute, used for road types, routing flags, or sub-types of layers.

◆ iLayer

CRefCountedString CartoType::CMapObject::iLayer
protected

The layer this object belongs to.

◆ iType

TMapObjectType CartoType::CMapObject::iType
protected

The type of the object: point, line, polygon, etc.

◆ iUserData

TUserData CartoType::CMapObject::iUserData
protected

User data; can hold an integer or a pointer; can be used to associate any value with a map object.


The documentation for this class was generated from the following file: