CartoType iOS API 8.8-13-g03c6f7017
for development in Swift and Objective C for iOS and Mac OS
|
#import <CartoTypeBase.h>
Instance Methods | |
(id) | - initWithCoordType: |
(id) | - initWithMapObject: |
(id) | - initWithGeometryContour:contourIndex: |
(id) | - initWithRect:coordType: |
(void) | - dealloc |
(CartoTypeCoordType) | - coordType |
(void) | - appendX:andY: |
(void) | - appendX:andY:andPointType: |
(void) | - beginContour |
(int) | - contourCount |
(bool) | - contourIsOuter: |
(int) | - pointCount: |
(CartoTypePathPointFP) | - point:pointIndex: |
(bool) | - isEmpty |
(bool) | - isClosed |
(void) | - setClosed: |
(void) | - reverse |
(CTResult) | - convertLinesToGreatCircles: |
(CartoTypePathIntersectionType) | - intersectionType: |
(CartoTypePathIntersectionInfo *) | - intersectionInfo: |
(NSArray< NSNumber * > *) | - intersectionTypes: |
(NSArray< CartoTypePathIntersectionInfo * > *) | - intersectionInfos: |
(bool) | - intersects: |
(bool) | - contains: |
(bool) | - contained: |
(CartoTypeGeometry *) | - clip:mapObject: |
(NSArray< CartoTypeGeometry * > *) | - clip:mapObjects: |
(id) | - initWithGeometry: |
(void *) | - geometry |
Class Methods | |
(CartoTypeGeometry *) | + envelope:offsetInMeters: |
Geometry: a point, polyline or poly-polygon with a coordinate type.
- (void) appendX: | (double) | aX | |
andY: | (double) | aY | |
Adds a new point.
- (void) appendX: | (double) | aX | |
andY: | (double) | aY | |
andPointType: | (CartoTypePointType) | aPointType | |
Adds a new point, specifying the point type as well as the coordinates.
- (void) beginContour |
Starts a new contour.
- (CartoTypeGeometry *) clip: | (CartoTypeClipOperation) | aClipOperation | |
mapObject: | (CartoTypeMapObject *) | 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.
- (NSArray< CartoTypeGeometry * > *) clip: | (CartoTypeClipOperation) | aClipOperation | |
mapObjects: | (NSArray< CartoTypeMapObjectGroup * > *) | aMapObjectArray | |
Returns the results of clipping an array of map objects 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 the map objects.
The returned geometry objects are in degrees.
- (bool) contained: | (CartoTypeMapObject *) | aMapObject |
Returns true if this geometry is contained by the map object aMapObject.
- (bool) contains: | (CartoTypeMapObject *) | aMapObject |
Returns true if this geometry contains the map object aMapObject.
- (int) contourCount |
Returns the number of contours.
- (bool) contourIsOuter: | (int) | aContourIndex |
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.
- (CTResult) 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.
- (CartoTypeCoordType) coordType |
Returns the coordinate type.
- (void) dealloc |
Destroys the geometry object.
+ (CartoTypeGeometry *) envelope: | (CartoTypeMapObject *) | aMapObject | |
offsetInMeters: | (double) | aOffsetInMeters | |
Returns a geometry that is the envelope of a map object, 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.
- (void *) geometry |
(for internal use) Gets a pointer to the underlying C++ geometry object.
- (id) initWithCoordType: | (CartoTypeCoordType) | aCoordType |
Initializes the geometry object with the coordinate type to be used when adding points.
- (id) initWithGeometry: | (void *) | aGeometry |
(for internal use) Initializes the geometry object with an underlying C++ geometry object.
- (id) initWithGeometryContour: | (CartoTypeGeometry *) | aGeometry | |
contourIndex: | (int) | aContourIndex | |
Creates a geometry object from a single contour of another geometry object.
- (id) initWithMapObject: | (CartoTypeMapObject *) | aMapObject |
Creates a geometry object from a map object.
- (id) initWithRect: | (CartoTypeRect) | aRect | |
coordType: | (CartoTypeCoordType) | aCoordType | |
Creates a geometry object from a rectangle.
- (CartoTypePathIntersectionInfo *) intersectionInfo: | (CartoTypeMapObject *) | 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.
- (NSArray< CartoTypePathIntersectionInfo * > *) intersectionInfos: | (NSArray< CartoTypeMapObjectGroup * > *) | aMapObjectArray |
Returns information about the intersection of this geometry with a sequence of map objects returned by a function. The nearest positions are in degrees (X = longitude, Y = latitude) and the the distances are in meters.
- (CartoTypePathIntersectionType) intersectionType: | (CartoTypeMapObject *) | aMapObject |
Returns the intersection type of this geometry with a map object.
- (NSArray< NSNumber * > *) intersectionTypes: | (NSArray< CartoTypeMapObjectGroup * > *) | aMapObjectArray |
Returns the intersection types of this geometry with an array of map objects. The types are returned as integers because of the difficulty of returning an array of enumeration values in Objective C.
- (bool) intersects: | (CartoTypeMapObject *) | aMapObject |
Returns true if this geometry intersects, contains or is contained by the map object aMapObject.
- (bool) isClosed |
Returns true if the geometry is made from closed paths.
- (bool) isEmpty |
Returns true if the geometry has no points.
- (CartoTypePathPointFP) point: | (int) | aContourIndex | |
pointIndex: | (int) | aPointIndex | |
Returns a point, given a contour index and a point index.
- (int) pointCount: | (int) | aContourIndex |
Returns the number of points in a contour.
- (void) reverse |
Reverses the order of the points in each contour.
- (void) setClosed: | (bool) | aClosed |
Sets the closed state.