CartoType .NET API 8.8-7-gb35e4dc71
for development in C#, Visual Basic and other .NET languages
Public Member Functions | Properties | List of all members
CartoType::MapObject Class Reference

A map object: a point, linear object, polygon object, or array (texture). More...

#include <CartoTypeWrapper.h>

Inheritance diagram for CartoType::MapObject:
CartoType::Path

Public Member Functions

String ^ StringAttribute (String^ aName)
 Returns a string attribute. If aName is empty this function is the same as Label.
 
SortedDictionary< String^, String^> ^ StringAttributes ()
 Returns all the string attributes as key-value pairs; an empty key refers to the label attribute.
 
MapObjectMatchMatch (String^ aText, StringMatchMethod aMatchMethod, String^ aAttributes, bool aPhrase)
 Finds the first string attribute matching aText, using aMatchMethod, and returns information about it. More...
 
virtual int ContourCount ()
 Returns the number of contours in the path. More...
 
virtual int PointCount (int aContourIndex)
 Returns the number of points in a contour. More...
 
virtual PathPointPoint (int aContourIndex, int aPointIndex)
 Returns a point, specifying it by contour index and point index. More...
 
int ContourCount ()
 Returns the number of contours (sub-paths). More...
 
int PointCount (int aContourIndex)
 Returns the number of points in a contour. More...
 
PathPointPoint (int aContourIndex, int aPointIndex)
 Returns a point given its contour and point indexes. More...
 

Properties

String^ Label [get]
 The label or name of the object.
 
FeatureInfoFeatureInfo [get]
 The feature info of the map object.
 
Int64 Id [get]
 The ID of the object.
 
MapObjectType Type [get]
 The type of the object.
 
String^ LayerName [get]
 The object's layer.
 
double Area [get]
 The area of the map object in square meters. Returns 0 if it is a point or a line.
 
double LengthOrPerimeter [get]
 The length or perimeter of the map object in meters. Returns 0 if it is a point.
 
PointCenter [get]
 Returns the center of a map object in map coordinates. More...
 
PointCenterInDegrees [get]
 Returns the center of a map object in degrees. More...
 
RectBoundsInDegrees [get]
 Returns the bounding box of a map object in degrees.
 
GeometryGeometryInDegrees [get]
 Returns the bounding box of a map object in degrees.
 
RectBounds [get]
 Returns the axis-aligned bounding box of a map object, in map coordinates.
 

Detailed Description

A map object: a point, linear object, polygon object, or array (texture).

Member Function Documentation

◆ ContourCount()

virtual int CartoType::MapObject::ContourCount ( )
virtual

Returns the number of contours in the path.

Implements CartoType::Path.

◆ Match()

MapObjectMatch ^ CartoType::MapObject::Match ( String^  aText,
StringMatchMethod  aMatchMethod,
String^  aAttributes,
bool  aPhrase 
)

Finds the first string attribute matching aText, using aMatchMethod, and returns information about it.

If aAttributes is non-null this function examines only attributes in the supplied comma-separated list, otherwise it 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, matches of phrases within the attribute are allowed.

◆ Point()

virtual PathPoint ^ CartoType::MapObject::Point ( int  aContourIndex,
int  aPointIndex 
)
virtual

Returns a point, specifying it by contour index and point index.

Implements CartoType::Path.

◆ PointCount()

virtual int CartoType::MapObject::PointCount ( int  aContourIndex)
virtual

Returns the number of points in a contour.

Implements CartoType::Path.

Property Documentation

◆ Center

Point^ CartoType::MapObject::Center
get

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

Point^ CartoType::MapObject::CenterInDegrees
get

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.


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