CartoType .NET API 8.8-7-gb35e4dc71
for development in C#, Visual Basic and other .NET languages
|
A geometry class for creating map objects and specifying view areas. There are also functions for the determining distance and intersection type between a geometry object and map objects. More...
#include <CartoTypeGeometry.h>
Public Member Functions | |
Geometry (CoordType aCoordType, bool aClosed) | |
Creates a geometry object using the specified coordinate type. | |
Geometry (MapObject^ aMapObject) | |
Creates a geometry object containing the geometry of a map object. | |
Geometry (Rect^ aRect, CoordType aCoordType) | |
Creates a geometry object from a grid-aligned rectangle. | |
Geometry (Geometry^ aOther, int aContourIndex) | |
Creates a geometry object representing a contour selected by its index. | |
bool | ContourIsOuter (int aIndex) |
Returns true if a contour is an outer contour, defined as being anti-clockwise, that is, having a positive area when treating all points as on-curve. Useful only for closed geometries. | |
void | Clear () |
Deletes all points but retains the coordinate type and open/closed state. | |
void | AppendPoint (Point^ aPoint) |
Appends a point to the current contour. | |
void | AppendPoint (PathPoint^ aPoint) |
Appends a point to the current contour. | |
void | AppendPoint (double aX, double aY) |
Appends a point to the current contour. | |
void | AppendPoint (double aX, double aY, PointType aPointType) |
Appends a point to the current contour. | |
void | BeginContour () |
Begins a new contour. Use this function when creating a geometry object with more than one contour. | |
virtual int | ContourCount () |
Returns the number of contours (separate lines or closed curves). More... | |
virtual int | PointCount (int aContourIndex) |
Returns the number of points in a contour. More... | |
virtual PathPoint ^ | Point (int aContourIndex, int aPointIndex) |
Returns a certain point. More... | |
void | SetClosed (bool aClosed) |
Sets whether the Geometry object is made of closed contours. More... | |
void | Reverse () |
Reverses the order of the contours and the order of the points in each contour. | |
PathIntersectionType | IntersectionType (MapObject^ aMapObject) |
Returns the intersection type of this geometry with a map object. | |
PathIntersectionInfo ^ | IntersectionInfo (MapObject^ aMapObject) |
Returns information about the intersection of this geometry with a map object. The nearest positions are in degrees (X = longitude, Y = latitude) and the the distance is in meters. | |
PathIntersectionTypeList ^ | IntersectionType (MapObjectList^ aMapObjectList) |
Returns the intersection types of this geometry with a list of map objects. | |
PathIntersectionInfoList ^ | IntersectionInfo (MapObjectList^ aMapObjectList) |
Returns information about the intersection of this geometry with an array of map objects. The nearest positions are in degrees (X = longitude, Y = latitude) and the the distances are in meters. | |
bool | Intersects (MapObject^ aMapObject) |
Returns true if this geometry intersects, contains or is contained by the map object aMapObject. | |
bool | Contains (MapObject^ aMapObject) |
Returns true if this geometry contains the map object aMapObject. | |
bool | Contained (MapObject^ aMapObject) |
Returns true if this geometry is contained by the map object aMapObject. | |
Geometry ^ | Clip (ClipOperation aClipOperation, MapObject^ aMapObject) |
Returns the result of clipping a map object using this geometry, which must be closed. More... | |
GeometryList ^ | Clip (ClipOperation aClipOperation, MapObjectList^ aMapObjectList) |
Returns the results of clipping a sequence of map objects returned by a function using this geometry, which must be closed. More... | |
Result | ConvertLinesToGreatCircles (double aMaxDistanceInMeters) |
Interpolates points at a maximum distance apart to convert lines to great circles. Works only with degree coordinates, and with on-curve points. | |
int | ContourCount () |
Returns the number of contours (sub-paths). More... | |
int | PointCount (int aContourIndex) |
Returns the number of points in a contour. More... | |
PathPoint ^ | Point (int aContourIndex, int aPointIndex) |
Returns a point given its contour and point indexes. More... | |
Static Public Member Functions | |
static Geometry ^ | Envelope (MapObject^ aMapObject, double aOffsetInMeters) |
Returns a geometry that is the envelope of a map object. More... | |
Properties | |
CoordType | CoordType [get] |
Returns the coordinate type. | |
bool | IsEmpty [get] |
Returns true if the Geometry object has no points. | |
bool | IsClosed [get] |
Returns true if the Geometry object is made of closed contours. More... | |
A geometry class for creating map objects and specifying view areas. There are also functions for the determining distance and intersection type between a geometry object and map objects.
The intersection functions do not work with geometry objects in display coordinates, or map objects with no known projection, for which they give a path intersection type of Unknown. If the geometry is in map units or map meters the caller is responsible for ensuring that the units are the same as those of the map object or objects.
Geometry ^ CartoType::Geometry::Clip | ( | ClipOperation | aClipOperation, |
MapObject^ | aMapObject | ||
) |
Returns the result of clipping a map object using this geometry, which must be closed.
Supports intersection, union, difference and exclusive-or operations. All operations except difference are commutative. The difference operation subtracts this geometry from aMapObject. The returned geometry object is in degrees.
GeometryList ^ CartoType::Geometry::Clip | ( | ClipOperation | aClipOperation, |
MapObjectList^ | aMapObjectList | ||
) |
Returns the results of clipping a sequence of map objects returned by a function using this geometry, which must be closed.
Returns an empty array if this geometry is not closed. Supports intersection, union, difference and exclusive-or operations. All operations except difference are commutative. The difference operation subtracts this geometry from the map objects. The returned geometry objects are in degrees.
|
virtual |
Returns the number of contours (separate lines or closed curves).
Implements CartoType::Path.
|
static |
Returns a geometry that is the envelope of a map object.
The geometry is created by offsetting the path by aOffset. The offset may be negative if the subject path is made of polygons only. The returned geometry object is in degrees.
|
virtual |
Returns a certain point.
Implements CartoType::Path.
|
virtual |
Returns the number of points in a contour.
Implements CartoType::Path.
void CartoType::Geometry::SetClosed | ( | bool | aClosed | ) |
Sets whether the Geometry object is made of closed contours.
*/
|
get |
Returns true if the Geometry object is made of closed contours.
*/