CartoType iOS API 7.8.2, 2022-03-25
for development in Swift and Objective C for iOS and Mac OS
Classes | Enumerations
CartoTypeRouter.h File Reference

Go to the source code of this file.

Classes

class  CartoTypeRouteProfile
 
class  CartoTypeTurn
 
class  CartoTypeNearestRoadInfo
 
class  CartoTypeLocationMatchParam
 
class  CartoTypeRoutePoint
 
class  CartoTypeRouteCoordSet
 
class  CartoTypePointSet
 
struct  CartoTypeNavigationData
 
struct  CartoTypeNearestSegmentinfo
 
class  CartoTypeRouteSegment
 
class  CartoTypeRoute
 
struct  CartoTypeTrafficInfo
 
struct  CartoTypeLocationRef
 
class  CartoTypeNavigatorParam
 
class  CartoTypeTimeAndDistanceMatrix
 

Enumerations

enum  CartoTypeRouteProfileType { CarProfile , WalkingProfile , BicycleProfile , HikingProfile }
 
enum  CartoTypeRouterType {
  RouterTypeDefault , RouterTypeStandardAStar , RouterTypeTurnExpandedAStar , RouterTypeStandardContractionHierarchy ,
  RouterTypeTECH
}
 
enum  CartoTypeTurnType {
  TurnTypeNone , TurnTypeAhead , TurnTypeBearRight , TurnTypeRight ,
  TurnTypeSharpRight , TurnTypeAround , TurnTypeSharpLeft , TurnTypeLeft ,
  TurnTypeBearLeft
}
 
enum  CartoTypeRoundaboutState { RoundaboutStateNone , RoundaboutStateEnter , RoundaboutStateContinue , RoundaboutStateExit }
 
enum  CartoTypeRoadType {
  RoadRoutingMask = 0x3E , RoadTypeMask = 0xFC0 , MajorRoadTypeMask = 0xF00 , RoadLevelMask = 0xF000 ,
  TunnelRoadTypeFlag = 1 , BridgeRoadTypeFlag = 0x10000 , RoadLevelShift = 12 , RampRoadTypeFlag = 64 ,
  LinkRoadTypeFlag = RampRoadTypeFlag , LowerGradeRoadTypeFlag = 128 , UnknownMajorRoadType = 0 , PrimaryLimitedAccessRoadType = 0x100 ,
  PrimaryUnlimitedAccessRoadType = 0x200 , SecondaryRoadType = 0x300 , MinorRoadType = 0x400 , BywayRoadType = 0x500 ,
  AccessRampType = 0x600 , ServiceRoadType = 0x700 , VehicularFerryRoadType = 0x800 , PassengerFerryRoadType = 0x900 ,
  PathRoadType = 0xA00 , StairwayRoadType = 0xB00 , CyclePathRoadType = 0xC00 , FootPathRoadType = 0xD00 ,
  OtherRoadType0 = 0xE00 , OtherRoadType1 = 0xE00 | LowerGradeRoadTypeFlag , OtherRoadType2 = 0xE00 | LinkRoadTypeFlag , OtherRoadType3 = 0xE00 | LowerGradeRoadTypeFlag | LinkRoadTypeFlag ,
  OtherRoadType4 = 0xF00 , OtherRoadType5 = 0xF00 | LowerGradeRoadTypeFlag , OtherRoadType6 = 0xF00 | LinkRoadTypeFlag , OtherRoadType7 = 0xF00 | LowerGradeRoadTypeFlag | LinkRoadTypeFlag ,
  TollRoadTypeFlag = 2 , RoundaboutRoadTypeFlag = 4 , RestrictionRoadTypeFlag = 8 , OneWayForwardRoadTypeFlag = 16 ,
  OneWayBackwardRoadTypeFlag = 32 , FirstOverRoadLevel = 0x1000 , FirstUnderRoadLevel = 0xF000 , SecondUnderRoadLevel = 0xE000 ,
  RoadAccessMask = 0xFFFE0000 , BicycleRoadAccessFlag = 0x20000 , MotorCycleRoadAccessFlag = 0x40000 , MotorCarRoadAccessFlag = 0x80000 ,
  HighOccupancyRoadAccessFlag = 0x100000 , GoodsRoadAccessFlag = 0x200000 , HeavyGoodsRoadAccessFlag = 0x400000 , BusRoadAccessFlag = 0x800000 ,
  TaxiRoadAccessFlag = 0x1000000 , PedestrianRoadAccessFlag = 0x2000000 , AgriculturalRoadAccessFlag = 0x4000000 , ForestryRoadAccessFlag = 0x8000000 ,
  EmergencyRoadAccessFlag = 0x10000000 , HazardousRoadAccessFlag = 0x20000000 , WheelChairRoadAccessFlag = 0x40000000 , DisabledRoadAccessFlag = 0x80000000 ,
  MotorVehicleRoadAccessMask = 0xFFFE0000 & ~(BicycleRoadAccessFlag | WheelChairRoadAccessFlag) , PublicServiceVehicleRoadAccessMask = BusRoadAccessFlag | TaxiRoadAccessFlag , Motorway = PrimaryLimitedAccessRoadType , MotorwayLink = PrimaryLimitedAccessRoadType | LinkRoadTypeFlag ,
  TrunkRoad = PrimaryUnlimitedAccessRoadType , TrunkRoadLink = PrimaryUnlimitedAccessRoadType | LinkRoadTypeFlag , PrimaryRoad = PrimaryUnlimitedAccessRoadType | LowerGradeRoadTypeFlag , PrimaryRoadLink = PrimaryUnlimitedAccessRoadType | LowerGradeRoadTypeFlag | LinkRoadTypeFlag ,
  SecondaryRoad = SecondaryRoadType , SecondaryRoadLink = SecondaryRoadType | LinkRoadTypeFlag , TertiaryRoad = SecondaryRoadType | LowerGradeRoadTypeFlag , TertiaryRoadLink = SecondaryRoadType | LowerGradeRoadTypeFlag | LinkRoadTypeFlag ,
  UnclassifiedRoad = MinorRoadType , ResidentialRoad = MinorRoadType | LowerGradeRoadTypeFlag , Track = BywayRoadType , ServiceRoad = ServiceRoadType ,
  PedestrianRoad = PathRoadType , VehicularFerry = VehicularFerryRoadType , PassengerFerry = PassengerFerryRoadType
}
 
enum  CartoTypeNavigationState {
  NoNavigationState , NoPositionNavigationState , TurnNavigationState , OffRouteNavigationState ,
  ReRouteNeededNavigationState , ReRouteDoneNavigationState , TurnRoundNavigationState , ArrivalNavigationState
}
 
enum  CartoTypeFollowMode {
  FollowModeNone = 0 , FollowModeLocation = KFollowFlagLocation , FollowModeLocationHeading = KFollowFlagLocation | KFollowFlagHeading , FollowModeLocationZoom = KFollowFlagLocation | KFollowFlagZoom ,
  FollowModeLocationHeadingZoom = KFollowFlagLocation | KFollowFlagHeading | KFollowFlagZoom
}
 
enum  CartoTypeSideOfRoad { SideOfRoadNone , SideOfRoadRight , SideOfRoadLeft , SideOfRoadBoth }
 
enum  CartoTypeRoadOrientation { RoadOrientationNone , RoadOrientationForwards , RoadOrientationBackwards , RoadOrientationBoth }
 
enum  CartoTypeLocationRefType {
  LocationRefLine , LocationRefGeoCoordinate , LocationRefPointAlongLine , LocationRefPointWithAccessPoint ,
  LocationRefCircle , LocationRefRectangle , LocationRefPolygon , LocationRefClosedLine
}
 
enum  CartoTypeRouteAccess { RouteAccessUnknown , RouteAccessAccessible , RouteAccessIsolated , RouteAccessNoRoad }
 

Detailed Description

Constants, types and interfaces used by routing and navigation.

Enumeration Type Documentation

◆ CartoTypeFollowMode

Flags controlling the way the map follows the user location and heading and automatically zooms.

Enumerator
FollowModeNone 

The map does not follow the user's location or heading.

FollowModeLocation 

The map is centred on the user's location.

FollowModeLocationHeading 

The map is centred on the user's location and rotated to the user's heading.

FollowModeLocationZoom 

The map is centred on the user's location and zoomed to a suitable level for the user's speed.

FollowModeLocationHeadingZoom 

The map is centred on the user's location, rotated to the user's heading, and zoomed to a suitable level for the user's speed.

◆ CartoTypeLocationRefType

The type of a location reference used for traffic information.

Enumerator
LocationRefLine 

A line in the route network.

LocationRefGeoCoordinate 

A point on the earth's surface.

LocationRefPointAlongLine 

A point on a line in the route network.

LocationRefPointWithAccessPoint 

A point on the route network providing access to a nearby POI: the first point is the point on the line, the second is the POI.

LocationRefCircle 

A circle defined as a point and a radius.

LocationRefRectangle 

A rectangle aligned to the grid of latitude and longitude: it is defined using two points at opposite corners.

LocationRefPolygon 

A polygon defined using a set of points.

LocationRefClosedLine 

A closed line in the route network.

◆ CartoTypeNavigationState

States of the navigation system.

Enumerator
NoNavigationState 

No route has been created, or navigation is disabled.

NoPositionNavigationState 

There is a route but no position has been supplied.

TurnNavigationState 

There is a turn ahead.

OffRouteNavigationState 

The current position is off the route.

ReRouteNeededNavigationState 

Re-routing is needed. This state is used only when automatic re-routing is turned off, for instance when using a slower routing algorithm.

ReRouteDoneNavigationState 

A new route has been calculated after a period off route.

TurnRoundNavigationState 

The latest position is on the route but a U-turn is needed.

ArrivalNavigationState 

The latest position is on the route and very close to the destination.

◆ CartoTypeRoadOrientation

The orientation of a path along a road: used in traffic information.

◆ CartoTypeRoadType

Road types used in route segments, etc.

Enumerator
RoadRoutingMask 

The toll, roundabout, restriction and direction flags are held in bits 1...5.

RoadTypeMask 

The road type is held in bits 6...11.

MajorRoadTypeMask 

The major road type is held in bits 8...11; bits 7 and 6 are used for finer distinctions.

RoadLevelMask 

The level (0 = surface, positive = above surface, negative = below surface) is held as a signed nybble in bits 12...15. Levels above 0 are not necessarily bridges; they can be embankments or other raised structures, and levels below 0 are not necessarily tunnels. There are separate bits to mark bridges and tunnels: BridgeRoadTypeFlag and TunnelRoadTypeFlag.

The level mask is also used for levels in the 'Type' attribute of non-road objects.

TunnelRoadTypeFlag 

A bit flag to identify tunnels.

BridgeRoadTypeFlag 

A bit flag to identify bridges.

RoadLevelShift 

The amount by which road levels are shifted.

RampRoadTypeFlag 

A bit flag to allow access ramps to be marked as sub-types of a major road type.

LinkRoadTypeFlag 

A synonym for RampRoadTypeFlag.

LowerGradeRoadTypeFlag 

A bit flag to allow a distinction to be made between grades of road, within the major road type. It allows OSM data to distinguish trunk roads from primary roads in a backward-compatible way.

UnknownMajorRoadType 

Roads of unknown type.

PrimaryLimitedAccessRoadType 

Primary road with limited access (motorway, freeway, etc.).

PrimaryUnlimitedAccessRoadType 

Primary road without limited access: UK 'A' road.

SecondaryRoadType 

Secondary road: UK 'B' road.

MinorRoadType 

Local road or town or city street.

BywayRoadType 

Byway: road or track open to motor vehicles.

AccessRampType 

Access ramp to limited access road.

ServiceRoadType 

Service road or access road.

VehicularFerryRoadType 

Vehicular Ferry route.

PassengerFerryRoadType 

Passenger-only Ferry route.

PathRoadType 

Path or walkway for pedestrians.

StairwayRoadType 

Stairway or escalator for pedestrians.

CyclePathRoadType 

Cycle path.

FootPathRoadType 

Footpath.

OtherRoadType0 

User-defined road types.

TollRoadTypeFlag 

A toll must be paid to use this road. More details may be available in the string attributes of a map object.

RoundaboutRoadTypeFlag 

A bit flag indicating that the road is part of a roundabout.

RestrictionRoadTypeFlag 

A bit flag indicating that the road has one or more restrictions (e.g., right turn only). The details of the restrictions are stored in string attributes.

OneWayForwardRoadTypeFlag 

A bit flag indicating that the road is one-way in the direction in which it is defined.

OneWayBackwardRoadTypeFlag 

A bit flag indicating that the road is one-way in the reverse direction to that in which it is defined.

FirstOverRoadLevel 

The first raised level: the default level for a bridge or overpass.

FirstUnderRoadLevel 

The first sub-surface level: the default value for an underpass.

SecondUnderRoadLevel 

The second sub-surface level: the default value for a tunnel.

RoadAccessMask 

Access rules. These flags occupy the bits used for the OSM type in non-road layers, so may be used only where an OSM type is not used. Each flag forbids access to a certain type of vehicle.

BicycleRoadAccessFlag 

Access is forbidden to bicycles.

MotorCycleRoadAccessFlag 

Access is forbidden to motorcycles.

MotorCarRoadAccessFlag 

Access is forbidden to motor cars.

HighOccupancyRoadAccessFlag 

Access is forbidden to high-occupancy vehicles.

GoodsRoadAccessFlag 

Access is forbidden to light goods vehicles.

HeavyGoodsRoadAccessFlag 

Access is forbidden to heavy goods vehicles.

BusRoadAccessFlag 

Access is forbidden to buses.

TaxiRoadAccessFlag 

Access is forbidden to taxis.

PedestrianRoadAccessFlag 

Access is forbidden to pedestrians.

AgriculturalRoadAccessFlag 

Access is forbidden to agricultural vehicles.

ForestryRoadAccessFlag 

Access is forbidden to forestry vehicles.

EmergencyRoadAccessFlag 

Access is forbidden to emergency vehicles.

HazardousRoadAccessFlag 

Access is forbidden to vehicles carrying hazardous materials.

WheelChairRoadAccessFlag 

Access is forbidden to wheelchairs.

DisabledRoadAccessFlag 

Access is forbidden to vehicles with disabled persons' permits.

◆ CartoTypeRoundaboutState

Turns involving roundabouts are marked as such so that exit numbers can be counted

Enumerator
RoundaboutStateNone 

This junction does not involve a roundabout.

RoundaboutStateEnter 

This junction enters a roundabout.

RoundaboutStateContinue 

This junction continues around a roundabout.

RoundaboutStateExit 

This junction exits a roundabout.

◆ CartoTypeRouteAccess

The accessibility of a point for routing purposes. The framework's routeAccess method, if implemented for the current router, returns a value of this type.

A point is defined as accessible if it is connected to at least 1000 other route segments; thus accessibility is not defined correctly for very small maps.

Enumerator
RouteAccessUnknown 

The accessibility of the point is unknown.

RouteAccessAccessible 

The point is accessible for outward routing.

RouteAccessIsolated 

Routes cannot leave the point. The usual cause is an error in the map data like a one-way road that is a dead end.

RouteAccessNoRoad 

There are no routable roads or tracks near the point.

◆ CartoTypeRouteProfileType

Constants used to select frequently-used route profiles.

Enumerator
CarProfile 

A profile type for private car navigation.

WalkingProfile 

A profile type for walking.

BicycleProfile 

A profile type for cycling.

HikingProfile 

A profile type for walking, preferring off-road paths.

◆ CartoTypeRouterType

Types of router; used when selecting a router type.

Enumerator
RouterTypeDefault 

This router type causes the default router to be selected: the one for which serialized data is available in the map file, or, failing that, RouterTypeStandardAStar.

RouterTypeStandardAStar 

The A* router, which gives fast performance but takes a lot of memory and cannot create a route going twice through the same junction.

RouterTypeTurnExpandedAStar 

A version of the A* router with road nodes and turn arcs; slower than RouterTypeStandardAStar, and uses more memory, but can generate routes going twice through the same junction, for more flexible routing.

RouterTypeStandardContractionHierarchy 

The contraction hierarchy router is intended where less RAM is available: for example with large maps on mobile devices. It gives the same routes as RouterTypeStandardAStar, but is a little slower and does not support custom route profiles; the route profile is decided at the time of creating the CTM1 file.

RouterTypeTECH 

Turn-expanded contraction hierarchy.

◆ CartoTypeSideOfRoad

The side of the road: used in traffic information.

◆ CartoTypeTurnType

Turn types on a route. Turns at junctions are classified by dividing the full circle into 45-degree segments, except for sharp turns left and right, which encompass everything up to an actual U-turn, and left and right forks, for which there are special rules to avoid classifying them as ahead.

The actual turn angle is also given in the CartoTypeTurn class.

Enumerator
TurnTypeNone 

No turn exists or is needed. This turn type is used at the start of a route.

TurnTypeAhead 

A turn of less than 22.5 degrees left or right, unless this is a fork with two choices, in which case the turn will be bear right or bear left.

TurnTypeBearRight 

A turn between 22.5 degrees and 67.5 degrees right or a turn through a smaller angle which is the rightmost of a fork with two choices.

TurnTypeRight 

A turn between 67.5 degrees and 112.5 degrees right.

TurnTypeSharpRight 

A turn between 112.5 degrees and 180 degrees right.

TurnTypeAround 

This turn type is use for U-turns: turns back along the same road.

TurnTypeSharpLeft 

A turn between 112.5 degrees and 180 degrees left.

TurnTypeLeft 

A turn between 67.5 degrees and 112.5 degrees left.

TurnTypeBearLeft 

A turn between 22.5 degrees and 67.5 degrees left. or a turn through a smaller angle which is the leftmost of a fork with two choices.