CartoType iOS API 8.8-13-g03c6f7017
for development in Swift and Objective C for iOS and Mac OS
Instance Methods | Properties | List of all members
CartoTypeFeatureInfo Class Reference

#import <CartoTypeBase.h>

Inheritance diagram for CartoTypeFeatureInfo:

Instance Methods

(id) - init
 
(id) - initWithType:
 
(id) - initWithTypeAndSubType:subType:
 
(id) - initWithSubType:
 
(void) - reverseOneWayDirection
 
(void) - setVehicleAccess:
 
(id) - initWithRawValue:
 
(uint32_t) - rawValue
 

Properties

CartoTypeFeatureDiscriminator discriminator
 
bool route
 
bool tunnel
 
bool bridge
 
int level
 
CartoTypeFeatureType type
 
bool oneWay
 
bool oneWayForward
 
bool oneWayBackward
 
bool driveOnLeft
 
bool driveOnRight
 
bool roundabout
 
bool toll
 
bool wrongWay
 
int speedLimit
 
int gradient
 
bool pedestrianAccess
 
bool cycleAccess
 
bool motorVehicleAccess
 
bool emergencyVehicleAccess
 
bool otherAccessRestricted
 
bool isPrivate
 
int subType
 

Detailed Description

Feature information for a map object, represented internally as a 32-bit value.

Every map object has a feature info value. Feature info values fall into two categories: route and non-route.

Route values have a feature type in the range 0...31 (FeatureTypeMotorway...FeatureTypeUnknownRoute); it is used as the index into the speed and bonus arrays in a route profile. Route values have other information relevant to routing including the speed limit and access restrictions.

Non-route values have a feature type in the range 32...32767. Non-route feature types, apart from the special values FeatureTypeUnknownNonRoute (32) and FeatureTypeInvalid (32767), may be expressed as three-letter mnemonics, which can be constructed using the FeatureTypeCode function. Non-route values have an 11-bit sub-type that may be used for fine distinctions such as settlement rank or boundary type.

Both route and non-route values have a level in the range -8...7, where 0 represents ground level. The level is used as one of the criteria determining drawing order.

Method Documentation

◆ init

- (id) init

Creates a feature info object of type UnknownNonRoute.

◆ initWithRawValue:

- (id) initWithRawValue: (uint32_t)  aValue

Creates a feature info object from a raw value. For internal use only.

◆ initWithSubType:

- (id) initWithSubType: (int)  aSubType

Creates a non-route feature info object of type UnknownNonRoute and a given sub-type. The sub-type is clamped to the range 0...2047.

◆ initWithType:

- (id) initWithType: (CartoTypeFeatureType aFeatureType

Creates a feature info object from a feature type.

◆ initWithTypeAndSubType:subType:

- (id) initWithTypeAndSubType: (CartoTypeFeatureType aFeatureType
subType: (int)  aSubType 

Creates a feature info object with a given type and sub-type. The sub-type is clamped to the range 0...2047, and is ignored if aType is a route type, because routes do not have sub-types.

◆ rawValue

- (uint32_t) rawValue

Returns the raw value. For internal use only.

◆ reverseOneWayDirection

- (void) reverseOneWayDirection

Reverses the one-way direction if this is a one-way route.

◆ setVehicleAccess:

- (void) setVehicleAccess: (bool)  aValue

Sets or clears the vehicle access flags. Throws an exception if this is not a route.

Property Documentation

◆ bridge

- (bool) bridge
readwritenonatomicassign

True if this is a route that is a bridge. Only route objects can made into bridges.

◆ cycleAccess

- (bool) cycleAccess
readwritenonatomicassign

True if this is a route and cycle access is allowed.

◆ discriminator

- (CartoTypeFeatureDiscriminator) discriminator
readwritenonatomicassign

The feature discriminator.

◆ driveOnLeft

- (bool) driveOnLeft
readwritenonatomicassign

True if this is a two-way route and the rule of the road is to drive on the left. The rule of the road cannot be set for non-route objects.

◆ driveOnRight

- (bool) driveOnRight
readwritenonatomicassign

Returns true if this is a two-way route and the rule of the road is to drive on the right. The rule of the road cannot be set for non-route objects.

◆ emergencyVehicleAccess

- (bool) emergencyVehicleAccess
readwritenonatomicassign

True if this is a route and emergency vehicle access is allowed.

◆ gradient

- (int) gradient
readwritenonatomicassign

The gradient as a number in the range 0...7. Values 0...3 are uphill and 4...7 are downhill. Gradients are stored only in route arcs and not usually in other map objects. This property cannot be set for non-route objects.

◆ isPrivate

- (bool) isPrivate
readwritenonatomicassign

True if this is a route and no normal access is allowed.

◆ level

- (int) level
readwritenonatomicassign

The level, which is in the range -8 ... 7.

◆ motorVehicleAccess

- (bool) motorVehicleAccess
readwritenonatomicassign

True if this is a route and motor vehicle access is allowed. This property cannot be set for non-route objects.

◆ oneWay

- (bool) oneWay
readwritenonatomicassign

True if this is a one-way route. Non-route objects cannot be set as one-way.

◆ oneWayBackward

- (bool) oneWayBackward
readwritenonatomicassign

True if this is a one-way route in the direction opposite to the one in which the route is stored.

◆ oneWayForward

- (bool) oneWayForward
readwritenonatomicassign

True if this is a one-way route in the direction in which the route is stored.

◆ otherAccessRestricted

- (bool) otherAccessRestricted
readwritenonatomicassign

True if this is a route and there are access restrictions other than those specified by the standard flags. This property cannot be set for non-route objects.

◆ pedestrianAccess

- (bool) pedestrianAccess
readwritenonatomicassign

True if this is a route and pedestrian access is allowed. This property cannot be set for non-route objects.

◆ roundabout

- (bool) roundabout
readwritenonatomicassign

True if this is a route that is part of a roundabout. This property cannot be set for non-route objects.

◆ route

- (bool) route
readwritenonatomicassign

True if this is a route.

◆ speedLimit

- (int) speedLimit
readwritenonatomicassign

The speed limit in kph. A value of zero indicates that no speed limit is known. This property cannot be set for non-route objects.

◆ subType

- (int) subType
readwritenonatomicassign

The sub-type. Always 0 if this is a route. This property cannot be set for route objects.

◆ toll

- (bool) toll
readwritenonatomicassign

True if this is a toll route. This property cannot be set for non-route objects.

◆ tunnel

- (bool) tunnel
readwritenonatomicassign

True if this is a route that is a tunnel. Only route objects can made into tunnels.

◆ type

- (CartoTypeFeatureType) type
readwritenonatomicassign

The feature type. Route objects can only be set to route types, and non-route objects to non-route types.

◆ wrongWay

- (bool) wrongWay
readwritenonatomicassign

True if this is a route with a one-way direction opposite to the order of its points. This property cannot be set for non-route objects.


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