CartoType UWP API 8.12-19-g3f49c29ef
for development in C#, VB.NET and C++
Public Member Functions | Properties | List of all members
CartoType::FeatureInfo Class Reference

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

#include <CartoTypeFeatureInfo.h>

Public Member Functions

 FeatureInfo ()
 Creates a feature info object of type UnknownNonRoute.
 
 FeatureInfo (FeatureType aType)
 Creates a feature info object from a feature type.
 
 FeatureInfo (FeatureType aType, int aSubType)
 Creates a feature info object with a given 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.
 
void ReverseOneWayDirection ()
 Reverses the one-way direction if this is a one-way route.
 
void SetVehicleAccess (bool aValue)
 Sets or clears the vehicle access flags. Throws an exception if this is not a route.
 

Properties

FeatureDiscriminator Discriminator [get]
 Returns the feature discriminator.
 
bool Route [get]
 True if this is a route.
 
bool Tunnel [get, set]
 True if this is a route that is a tunnel. Non-route objects cannot be made into tunnels.
 
bool Bridge [get, set]
 True if this is a route that is a bridge. Non-route objects cannot be made into bridges.
 
int Level [get, set]
 The level, which is in the range -8 ... 7.
 
FeatureType Type [get, set]
 The feature type. Route objects can only be set to route types, and non-route objects to non-route types.
 
bool OneWay [get, set]
 True if this is a one-way route. Non-route objects cannot be set as one-way.
 
bool OneWayForward [get]
 True if this is a one-way route in the direction in which the route is stored.
 
bool OneWayBackward [get]
 True if this is a one-way route in the direction opposite to the one in which the route is stored.
 
bool DriveOnLeft [get, set]
 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.
 
bool DriveOnRight [get, set]
 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.
 
bool Roundabout [get, set]
 True if this is a route that is part of a roundabout. This property cannot be set for non-route objects.
 
bool Toll [get, set]
 True if this is a toll route. This property cannot be set for non-route objects.
 
bool WrongWay [get, set]
 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.
 
int SpeedLimit [get, set]
 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.
 
int Gradient [get, set]
 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.
 
bool PedestrianAccess [get, set]
 True if this is a route and pedestrian access is allowed. This property cannot be set for non-route objects.
 
bool CycleAccess [get, set]
 True if this is a route and cycle access is allowed. This property cannot be set for non-route objects.
 
bool MotorVehicleAccess [get, set]
 True if this is a route and motor vehicle access is allowed. This property cannot be set for non-route objects.
 
bool EmergencyVehicleAccess [get, set]
 True if this is a route and emergency vehicle access is allowed. This property cannot be set for non-route objects.
 
bool OtherAccessRestricted [get, set]
 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.
 
bool IsPrivate [get]
 Returns true if this is a route and no normal access is allowed.
 
int SubType [get, set]
 The sub-type. Always 0 if this is a route. This property cannot be set for route objects.
 

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 (Motorway...UnknownRoute); 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 UnknownNonRoute (32) and Invalid (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.


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