CartoType iOS API 8.12-19-g3f49c29ef
for development in Swift and Objective C for iOS and Mac OS
|
#import <Foundation/Foundation.h>
#import <CoreGraphics/CGImage.h>
#import <CoreGraphics/CGGeometry.h>
#import <UIKit/UIImage.h>
#import <CartoType/CartoTypeResultCode.h>
Go to the source code of this file.
Classes | |
struct | CtPathPoint |
struct | CtPathPointFP |
struct | CtPoint |
struct | CtRect |
struct | CtPointAndResult |
struct | CtRectAndResult |
class | CtGeometryAndResult |
struct | CtIdAndResult |
struct | CtAreaLengthAndResult |
class | CtBlendStyle |
class | CtAddress |
protocol | <CtPath> |
protocol | <CartoTypePath> |
class | CtMatch |
class | CtFeatureInfo |
class | CtMapObject |
class | CtMapObjectGroup |
class | CtPathIntersectionInfo |
class | CtGeometry |
class | CtFindParam |
class | CtNoticePosition |
class | CtPositionedBitmap |
class | CtPerspectiveParam |
class | CtViewState |
class | CtMapMetaData |
class | CtMapObjectParam |
Macros | |
#define | MakeFeatureTypeCode(A, B, C) ((((A)-'a'+1) << 10) | (((B)-'a'+1) << 5) | ((C)-'a'+1)) |
Functions | |
typedef | NS_OPTIONS (NSUInteger, CtFontStyle) |
typedef | NS_OPTIONS (NSUInteger, CtStringMatch) |
typedef | NS_ENUM (NSInteger, CtFileType) |
typedef | NS_ENUM (NSInteger, CtMapObjectType) |
typedef | NS_ENUM (NSInteger, CtPointType) |
typedef | NS_ENUM (NSInteger, CtAlign) |
typedef | NS_ENUM (NSInteger, CtCoordType) |
typedef | NS_ENUM (NSUInteger, CtFeatureType) |
typedef | NS_ENUM (NSUInteger, CtFeatureDiscriminator) |
typedef | NS_ENUM (NSInteger, CtPathIntersectionType) |
typedef | NS_ENUM (NSInteger, CtClipOperation) |
typedef | NS_ENUM (NSInteger, CtWritableMapType) |
typedef | NS_ENUM (NSInteger, CtNoticeAnchor) |
typedef | NS_ENUM (NSInteger, CtLetterCase) |
typedef | NS_ENUM (NSInteger, CtPointFormat) |
Variables | |
compatibility_alias CartoTypeGeometryAndResult | CtGeometryAndResult |
CtColor const | CtColorBlack = 0xFF000000 |
CtColor const | CtColorDarkGray = 0xFF555555 |
CtColor const | CtColorDarkRed = 0xFF000080 |
CtColor const | CtColorDarkGreen = 0xFF008000 |
CtColor const | CtColorDarkYellow = 0xFF00808 |
CtColor const | CtColorDarkBlue = 0xFF800000 |
CtColor const | CtColorDarkMagenta = 0xFF800080 |
CtColor const | CtColorDarkCyan = 0xFF808000 |
CtColor const | CtColorRed = 0xFF0000FF |
CtColor const | CtColorGreen = 0xFF00FF00 |
CtColor const | CtColorYellow = 0xFF00FFFF |
CtColor const | CtColorBlue = 0xFFFF0000 |
CtColor const | CtColorMagenta = 0xFFFF00FF |
CtColor const | CtColorCyan = 0xFFFFFF00 |
CtColor const | CtColorGray = 0xFFAAAAAA |
CtColor const | CtColorWhite = 0xFFFFFFFF |
CtColor const | CtColorTransparentBlack = 0x00000000 |
compatibility_alias CartoTypeBlendStyle | CtBlendStyle |
compatibility_alias CartoTypeAddress | CtAddress |
compatibility_alias CartoTypeMatch | CtMatch |
compatibility_alias CartoTypeFeatureInfo | CtFeatureInfo |
CtRouteAccess const | CtRouteAccessShift = 26 |
CtRouteAccess const | CtRouteAccessMask = 63U << CtRouteAccessShift |
CtRouteAccess const | CtRouteAccessWrongWayFlag = 1 << 26 |
CtRouteAccess const | CtRouteAccessPedestrianFlag = 1 << 27 |
CtRouteAccess const | CtRouteAccessCycleFlag = 1 << 28 |
CtRouteAccess const | CtRouteAccessMotorVehicleFlag = 1 << 29 |
CtRouteAccess const | CtRouteAccessEmergencyVehicleFlag = 1 << 30 |
CtRouteAccess const | CtRouteAccessOtherFlag = 1U << 31 |
CtRouteAccess const | CtRouteAccessVehicle = CtRouteAccessCycleFlag | CtRouteAccessMotorVehicleFlag | CtRouteAccessEmergencyVehicleFlag |
CtRouteAccess const | CtRouteAccessNormal = CtRouteAccessCycleFlag | CtRouteAccessMotorVehicleFlag | CtRouteAccessPedestrianFlag |
compatibility_alias CartoTypeMapObject | CtMapObject |
compatibility_alias CartoTypeMapObjectGroup | CtMapObjectGroup |
compatibility_alias CartoTypePathIntersectionInfo | CtPathIntersectionInfo |
compatibility_alias CartoTypeGeometry | CtGeometry |
compatibility_alias CartoTypeFindParam | CtFindParam |
compatibility_alias CartoTypeNoticePosition | CtNoticePosition |
compatibility_alias CartoTypePositionedBitmap | CtPositionedBitmap |
compatibility_alias CartoTypePerspectiveParam | CtPerspectiveParam |
compatibility_alias CartoTypeViewState | CtViewState |
CtMapTableId const | CtMapTableIdGlobal = 0 |
CtMapTableId const | CtMapTableIdLayer = 1 |
CtMapTableId const | CtMapTableIdProjection = 4 |
CtMapTableId const | CtMapTableIdString = 5 |
CtMapTableId const | CtMapTableIdLowResolutionLayer = 6 |
CtMapTableId const | CtMapTableIdPalette = 7 |
CtMapTableId const | CtMapTableIdTextIndex = 8 |
CtMapTableId const | CtMapTableIdRouteAStar = 10 |
CtMapTableId const | CtMapTableIdRouteCH = 11 |
CtMapTableId const | CtMapTableIdRouteExtra = 12 |
CtMapTableId const | CtMapTableIdRouteTurnExpanded = 13 |
CtMapTableId const | CtMapTableIdRouteCHStandAlone = 14 |
CtMapTableId const | CtMapTableIdRouteTECH = 15 |
CtMapTableId const | CtMapTableIdRouteCHTiled = 16 |
CtMapTableId const | CtMapTableIdRouteTECHTiled = 17 |
CtMapTableId const | CtMapTableIdRouteTurnExpandedCompact = 18 |
CtMapTableId const | CtMapTableIdNone = UINT16_MAX |
compatibility_alias CartoTypeMapMetaData | CtMapMetaData |
compatibility_alias CartoTypeMapObjectParam | CtMapObjectParam |
Base types for use with the CartoType Objective C class CartoTypeFramework and others.
#define MakeFeatureTypeCode | ( | A, | |
B, | |||
C | |||
) | ((((A)-'a'+1) << 10) | (((B)-'a'+1) << 5) | ((C)-'a'+1)) |
Constructs a 15-bit feature type code from 3 lower-case letters.
typedef CtAlign CartoTypeAlign |
A synonym of CtAlign.
A synonym of CtAreaLengthAndResult.
typedef CtClipOperation CartoTypeClipOperation |
A synonym of CtClipOperation.
typedef CtColor CartoTypeColor |
A synonym of CtColor.
typedef CtCoordType CartoTypeCoordType |
A synonym of CtCoordType.
typedef CtFeatureDiscriminator CartoTypeFeatureDiscriminator |
A synonym of CtFeatureDiscriminator.
typedef CtFeatureType CartoTypeFeatureType |
A synonym of CtFeatureType.
typedef CtFileType CartoTypeFileType |
A synonym of CtFileType.
typedef CtFontStyle CartoTypeFontStyle |
A synonym of CtFontStyle.
typedef CtIdAndResult CartoTypeIdAndResult |
A synonym of CtIdAndResult.
typedef CtLetterCase CartoTypeLetterCase |
A synonym of CtLetterCase.
typedef CtMapObjectType CartoTypeMapObjectType |
A synonym of CtMapObjectType.
typedef CtNoticeAnchor CartoTypeNoticeAnchor |
A synonym of CtNoticeAnchor.
typedef CtPathIntersectionType CartoTypePathIntersectionType |
A synonym of CtPathIntersectionType.
typedef CtPathPoint CartoTypePathPoint |
A synonym of CtPathPoint.
typedef CtPathPointFP CartoTypePathPointFP |
A synonym of CtPathPointFP.
typedef CtPoint CartoTypePoint |
A synonym of CtPoint.
A synonym of CtPointAndResult.
typedef CtPointFormat CartoTypePointFormat |
A synonym of CtPointFormat.
typedef CtPointType CartoTypePointType |
A synonym of CtPointType.
typedef CtRect CartoTypeRect |
A synonym of CtRect.
A synonym of CtRectAndResult.
typedef CtStringMatch CartoTypeStringMatch |
A synonym of CtStringMatch.
typedef CtWritableMapType CartoTypeWritableMapType |
A synonym of CtWritableMapType.
typedef uint16_t CtMapTableId NS_TYPED_ENUM |
Colors are represented as 32-bit integers holding 8 bits each for the read, green, blue and alpha values.
A type for flags controlling route access.
Identifiers of tables in CtM1 map files.
typedef NS_ENUM | ( | NSInteger | , |
CtAlign | |||
) |
Alignments used for multi-line text.
Center the text.
Align to the left for left-to-right text, to the right for right-to-left text.
Align to the right for left-to-right text, to the left for right-to-left text.
Align to the left and leave space on the right.
Align to the right and leave space on the left.
typedef NS_ENUM | ( | NSInteger | , |
CtClipOperation | |||
) |
Types of clipping done by the Clip functions of the Geometry class.
Returns the intersection of two paths; commutative.
Returns the union of two paths; commutative.
Returns the difference of two paths; non-commutative.
Returns the exclusive-or of the two paths; that is, any regions which are in neither path; commutative.
typedef NS_ENUM | ( | NSInteger | , |
CtCoordType | |||
) |
Coordinate types used for positions on a map.
Longitude (X) and latitude (Y) in degrees. X increases to the east and Y increases to the north.
Pixels on the display: X increases to the right and Y increases downwards.
A synonym for Display. Pixels on the display: X increases to the right and Y increases downwards.
Map coordinates: 32nds of projected meters. X increases to the east and Y increases to the north.
Map meters: projected meters. X increases to the east and Y increases to the north.
typedef NS_ENUM | ( | NSInteger | , |
CtFileType | |||
) |
File types of interest to CartoType.
PNG (Portable Network Graphics) image files.
JPEG (Joint Photographic Expert Group) image files.
TIFF (Tagged Image File Format) image files.
CTM1 (CartoType Map Data Type 1) map data files.
CTMS (CartoType Map Data, Serialized) map data files.
KML (Keyhole Markup Language) map data files.
CTSQL (CartoType SQLite format) map data files.
CTROUTE (CartoType XML route) files.
GPX (GPS Exchange) files.
typedef NS_ENUM | ( | NSInteger | , |
CtLetterCase | |||
) |
The case of letters and strings in Latin, Greek, Cyrillic and other alphabetic scripts.
A code used when the letter case is to be left as it is, or is irrelevant.
The case of the letters 'a', 'b', c', etc.
The case of the letters 'A', 'B', 'C, etc.
The case of letters like U+01C8 'Lj' and a few others; also indicates that the first letter of each word should be changed to titlecase.
typedef NS_ENUM | ( | NSInteger | , |
CtMapObjectType | |||
) |
Map object types.
A point in two-dimensional space.
A line in two-dimensional space, consisting of one or more open contours.
A polygon in two-dimensional space, consisting of one or more closed contours.
Information arranged as an array of values, such as an image or height data.
The total number of map object types. This is not an actual type.
A value to use where a null type is needed.
typedef NS_ENUM | ( | NSInteger | , |
CtNoticeAnchor | |||
) |
Anchor positions for notices like the legend or scale bar.
The top left corner of the display.
The top right corner of the display.
The bottom left corner of the display.
The bottom right corner of the display.
The center of the top edge of the display.
The center of the right side of the display.
The center of the left side of the display.
The center of the bottom edge of the display.
The center of the display.
typedef NS_ENUM | ( | NSInteger | , |
CtPathIntersectionType | |||
) |
The ways two paths can intersect.
The intersection type is unknown.
The paths do not intersect.
The paths intersect or are identical.
The first path contains the second.
The second path contains the first.
typedef NS_ENUM | ( | NSInteger | , |
CtPointFormat | |||
) |
The format used for points in CTM1 data. These numbers must fit into 8 bits for the moment because of the way they are stored in the CTM1 file. The values are discontinuous because several obsolete values have been discarded.
An arbitrary or unknown point format.
Units are projected map meters.
Units are degrees as 11.21 fixed-point numbers. That is, there are 2^21 (2097152) units to a degree. This format is used only by the makemap tool, for representing unprojected map data.
Units are 32nds of projected map meters. This is the default format for CTM1 data.
typedef NS_ENUM | ( | NSInteger | , |
CtPointType | |||
) |
The type of a CtPathPoint.
The point is on the curve.
The point is a control point for a quadratic (conic) Bezier spline.
The point is a control point for a cubic Bezier spline.
typedef NS_ENUM | ( | NSInteger | , |
CtWritableMapType | |||
) |
Types of writable map.
A writable map stored in memory.
A writable map stored in an SQLite database.
typedef NS_ENUM | ( | NSUInteger | , |
CtFeatureDiscriminator | |||
) |
The feature discriminator stored in a FeatureInfo object.
Not a route.
A route that is a bridge.
A route that is a tunnel.
A route that is neither a tunnel nor a bridge.
typedef NS_ENUM | ( | NSUInteger | , |
CtFeatureType | |||
) |
Every map object has a feature type. The first 32 feature types are used for routable objects and their values are indexes into tables of speeds and weights in route profiles. Other feature types are constructed from three-letter codes.
All feature type values must fit into 15 bits, and therefore must be in the range 0...32767.
typedef NS_OPTIONS | ( | NSUInteger | , |
CtFontStyle | |||
) |
Bit flags used for font styles.
The bit flag used to select bold face.
The bit flag used to select italics.
The bit flag used to select a serif font.
The bit flag used to select a cursive font.
The bit flag used to select a 'fantasy' font.
The bit flag used to select a monospace font.
typedef NS_OPTIONS | ( | NSUInteger | , |
CtStringMatch | |||
) |
Flags and constants to tell text searching how to match search terms with found strings.
A flag to match all strings for which the search term is a perfect match or a prefix.
A flag to ignore all characters that are not letters, digits or whitespace when matching.
A flag to match accented and unaccented letters.
A flag to allow imperfect matches with a small number of omitted, incorrect or extra characters.
A flag to fold letter case.
A flag to ignore whitespace.
Strings must match exactly.
Fold case when matching strings.
The search term must be an exact match or a prefix of the found string.
Ignore characters that are not letters, digits or whitespace.
Loose matching: ignore non-alphanumerics and fold accents and case.
Allow fuzzy matches: ignore non-alphanumerics, fold accents and allow imperfect matches.
compatibility_alias CartoTypeBlendStyle CtBlendStyle |
A synonym of CtBlendStyle.
CtColor const CtColorBlack = 0xFF000000 |
A value for the color black.
CtColor const CtColorBlue = 0xFFFF0000 |
A value for the color blue.
CtColor const CtColorCyan = 0xFFFFFF00 |
A value for the color cyan.
CtColor const CtColorDarkBlue = 0xFF800000 |
A value for the color dark blue.
CtColor const CtColorDarkCyan = 0xFF808000 |
A value for the color dark cyan.
CtColor const CtColorDarkGray = 0xFF555555 |
A value for the color dark gray.
CtColor const CtColorDarkGreen = 0xFF008000 |
A value for the color dark green.
CtColor const CtColorDarkMagenta = 0xFF800080 |
A value for the color dark magenta.
CtColor const CtColorDarkRed = 0xFF000080 |
A value for the color dark red.
CtColor const CtColorDarkYellow = 0xFF00808 |
A value for the color dark yellow.
CtColor const CtColorGray = 0xFFAAAAAA |
A value for the color gray.
CtColor const CtColorGreen = 0xFF00FF00 |
A value for the color green.
CtColor const CtColorMagenta = 0xFFFF00FF |
A value for the color magenta.
CtColor const CtColorRed = 0xFF0000FF |
A value for the color red.
CtColor const CtColorTransparentBlack = 0x00000000 |
A value for the 'null color' transparent black.
CtColor const CtColorWhite = 0xFFFFFFFF |
A value for the color white.
CtColor const CtColorYellow = 0xFF00FFFF |
A value for the color yellow.
compatibility_alias CartoTypeFeatureInfo CtFeatureInfo |
A synonym of CtFeatureInfo.
compatibility_alias CartoTypeFindParam CtFindParam |
A synonym of CtFindParam.
compatibility_alias CartoTypeGeometry CtGeometry |
A synonym of CtGeometry.
compatibility_alias CartoTypeGeometryAndResult CtGeometryAndResult |
A synonym of CtGeometryAndResult.
compatibility_alias CartoTypeMapMetaData CtMapMetaData |
A synonym of CtMapMetaData.
compatibility_alias CartoTypeMapObject CtMapObject |
A synonym of CtMapObject.
compatibility_alias CartoTypeMapObjectGroup CtMapObjectGroup |
A synonym of CtMapObjectGroup.
compatibility_alias CartoTypeMapObjectParam CtMapObjectParam |
A synonym of CtMapObjectParam.
CtMapTableId const CtMapTableIdGlobal = 0 |
The ID of the global information table.
CtMapTableId const CtMapTableIdLayer = 1 |
The ID of the table containing the layers containing the map objects; see also KLowResolutionLayerTable.
CtMapTableId const CtMapTableIdLowResolutionLayer = 6 |
The ID of the table containing layer data containing map objects at lower resolutions, simplified for display at smaller scales; see also KLayerTable.
CtMapTableId const CtMapTableIdNone = UINT16_MAX |
An ID used when no table exists or the table type is unknown.
CtMapTableId const CtMapTableIdPalette = 7 |
The ID of the table containing color palettes for raster image objects.
CtMapTableId const CtMapTableIdProjection = 4 |
The ID of the the table containing the map projection.
CtMapTableId const CtMapTableIdRouteAStar = 10 |
The ID of the A-star routing data table.
CtMapTableId const CtMapTableIdRouteCH = 11 |
The ID of the contraction hierarchy routing data table.
CtMapTableId const CtMapTableIdRouteCHStandAlone = 14 |
The ID of the table containing contraction hierarchy routing data that can optionally be used stand-alone, in combination with other map files.
CtMapTableId const CtMapTableIdRouteCHTiled = 16 |
The ID of the table containing contraction hierarchy routing data that is a tile that can be used with other tiles from the same data set.
CtMapTableId const CtMapTableIdRouteExtra = 12 |
The ID of the table containing extra information used for A-star routing.
CtMapTableId const CtMapTableIdRouteTECH = 15 |
The ID of the turn-expanded contraction hierarchy routing data table.
CtMapTableId const CtMapTableIdRouteTECHTiled = 17 |
The ID of the table containing turn-expanded contraction hierarchy routing data that is a tile that can be used with other tiles from the same data set.
CtMapTableId const CtMapTableIdRouteTurnExpanded = 13 |
The ID of the turn-expanded routing data table.
CtMapTableId const CtMapTableIdRouteTurnExpandedCompact = 18 |
The ID of the table containing compact turn-expanded routing data, which uses less run-time RAM.
CtMapTableId const CtMapTableIdString = 5 |
The ID of the table of compressed strings referenced by the map objects.
CtMapTableId const CtMapTableIdTextIndex = 8 |
The ID of the table containing the text index used when searching for string attributes.
compatibility_alias CartoTypeNoticePosition CtNoticePosition |
A synonym of CtNoticePosition.
compatibility_alias CartoTypePathIntersectionInfo CtPathIntersectionInfo |
A synonym of CtPathIntersectionInfo.
compatibility_alias CartoTypePerspectiveParam CtPerspectiveParam |
A synonym of CtPerspectiveParam.
compatibility_alias CartoTypePositionedBitmap CtPositionedBitmap |
A synonym of CtPositionedBitmap.
CtRouteAccess const CtRouteAccessCycleFlag = 1 << 28 |
A flag to forbid cycle access in a feature info object, or, in a vehicle type, to indicate a cyclist.
CtRouteAccess const CtRouteAccessEmergencyVehicleFlag = 1 << 30 |
A flag to forbid emergency vehicle access in a feature info object, or, in a vehicle type, to indicate an emergency vehicle.
CtRouteAccess const CtRouteAccessMask = 63U << CtRouteAccessShift |
A mask to select the route access flags.
CtRouteAccess const CtRouteAccessMotorVehicleFlag = 1 << 29 |
A flag to forbid motor vehicle access in a feature info object, or, in a vehicle type, to indicate a motor vehicle.
CtRouteAccess const CtRouteAccessNormal = CtRouteAccessCycleFlag | CtRouteAccessMotorVehicleFlag | CtRouteAccessPedestrianFlag |
A set of flags indicating normal access: that is, access for pedestrians, cyclists and motor vehicles.
CtRouteAccess const CtRouteAccessOtherFlag = 1U << 31 |
A flag to indicate the presence of other access restrictions in a feature info object, or, in a vehicle type, to indicate a type of vehicle not covered by the other flags.
CtRouteAccess const CtRouteAccessPedestrianFlag = 1 << 27 |
A flag to forbid pedestrian access in a feature info object, or, in a vehicle type, to indicate a pedestrian.
CtRouteAccess const CtRouteAccessShift = 26 |
The amount by which the route access flags are shifted.
CtRouteAccess const CtRouteAccessVehicle = CtRouteAccessCycleFlag | CtRouteAccessMotorVehicleFlag | CtRouteAccessEmergencyVehicleFlag |
A set of flags covering all vehicles.
CtRouteAccess const CtRouteAccessWrongWayFlag = 1 << 26 |
A flag indicating that this route is one-way but is stored in the opposite direction to the allowed direction of travel.
compatibility_alias CartoTypeViewState CtViewState |
A synonym of CtViewState.