CartoType Android API 8.8-7-gb35e4dc71
for Java development on Android
|
Public Member Functions | |
FeatureInfo () | |
FeatureInfo (int aFeatureType) | |
FeatureInfo (int aFeatureType, int aSubType) | |
FeatureDiscriminator | discriminator () |
boolean | route () |
boolean | tunnel () |
int | setTunnel (boolean aValue) |
boolean | bridge () |
int | setBridge (boolean aValue) |
int | level () |
void | setLevel (int aLevel) |
int | type () |
int | setType (int aType) |
boolean | oneWay () |
boolean | oneWayForward () |
boolean | oneWayBackward () |
boolean | driveOnLeft () |
boolean | driveOnRight () |
int | setDriveOnLeft (boolean aValue) |
void | reverseOneWayDirection () |
boolean | roundabout () |
int | setRoundabout (boolean aValue) |
boolean | toll () |
int | setToll (boolean aValue) |
boolean | wrongWay () |
int | setWrongWay (boolean aValue) |
int | speedLimit () |
int | setSpeedLimit (int aValue) |
int | gradient () |
int | setGradient (int aValue) |
int | setVehicleAccess (boolean aValue) |
boolean | pedestrianAccess () |
int | setPedestrianAccess (boolean aValue) |
boolean | cycleAccess () |
int | setCycleAccess (boolean aValue) |
boolean | motorVehicleAccess () |
int | setMotorVehicleAccess (boolean aValue) |
boolean | emergencyVehicleAccess () |
int | setEmergencyVehicleAccess (boolean aValue) |
boolean | otherAccessRestricted () |
int | setOtherAccessRestricted (boolean aValue) |
boolean | isPrivate () |
int | subType () |
int | setSubType (int aValue) |
Static Public Attributes | |
static final int | KRouteTypeCount = 32 |
static final int | KGradientCount = 8 |
static final int | KMaxSubType = 2047 |
static final int | KRouteAccessShift = 26 |
static final int | KRouteAccessMask = 63 << KRouteAccessShift |
static final int | KRouteAccessWrongWayFlag = 1 << 26 |
static final int | KRouteAccessPedestrianFlag = 1 << 27 |
static final int | KRouteAccessCycleFlag = 1 << 28 |
static final int | KRouteAccessMotorVehicleFlag = 1 << 29 |
static final int | KRouteAccessEmergencyVehicleFlag = 1 << 30 |
static final int | KRouteAccessOtherFlag = 1 << 31 |
static final int | KRouteAccessVehicle = KRouteAccessCycleFlag | KRouteAccessMotorVehicleFlag | KRouteAccessEmergencyVehicleFlag |
static final int | KRouteAccessNormal = KRouteAccessCycleFlag | KRouteAccessMotorVehicleFlag | KRouteAccessPedestrianFlag |
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.
com.cartotype.FeatureInfo.FeatureInfo | ( | ) |
Creates a feature info object of type UnknownNonRoute.
com.cartotype.FeatureInfo.FeatureInfo | ( | int | aFeatureType | ) |
Creates a feature info object from a feature type.
com.cartotype.FeatureInfo.FeatureInfo | ( | int | aFeatureType, |
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.
boolean com.cartotype.FeatureInfo.bridge | ( | ) |
Returns true if this is a route that is a bridge.
boolean com.cartotype.FeatureInfo.cycleAccess | ( | ) |
Returns true if this is a route and cycle access is allowed.
FeatureDiscriminator com.cartotype.FeatureInfo.discriminator | ( | ) |
Returns the feature discriminator.
boolean com.cartotype.FeatureInfo.driveOnLeft | ( | ) |
Returns true if this is a two-way route and the rule of the road is to drive on the left.
boolean com.cartotype.FeatureInfo.driveOnRight | ( | ) |
Returns true if this is a two-way route and the rule of the road is to drive on the right.
boolean com.cartotype.FeatureInfo.emergencyVehicleAccess | ( | ) |
Returns true if this is a route and emergency vehicle access is allowed.
int com.cartotype.FeatureInfo.gradient | ( | ) |
Returns 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.
boolean com.cartotype.FeatureInfo.isPrivate | ( | ) |
Returns true if this is a route and no normal access is allowed.
int com.cartotype.FeatureInfo.level | ( | ) |
Returns the level, which is in the range -8 ... 7.
boolean com.cartotype.FeatureInfo.motorVehicleAccess | ( | ) |
Returns true if this is a route and motor vehicle access is allowed.
boolean com.cartotype.FeatureInfo.oneWay | ( | ) |
Returns true if this is a one-way route.
boolean com.cartotype.FeatureInfo.oneWayBackward | ( | ) |
Returns true if this is a one-way route in the direction opposite to the one in which the route is stored.
boolean com.cartotype.FeatureInfo.oneWayForward | ( | ) |
Returns true if this is a one-way route in the direction in which the route is stored.
boolean com.cartotype.FeatureInfo.otherAccessRestricted | ( | ) |
Returns true if this is a route and there are access restrictions other than those specified by the standard flags.
boolean com.cartotype.FeatureInfo.pedestrianAccess | ( | ) |
Returns true if this is a route and pedestrian access is allowed.
void com.cartotype.FeatureInfo.reverseOneWayDirection | ( | ) |
Reverses the one-way direction if this is a one-way route.
boolean com.cartotype.FeatureInfo.roundabout | ( | ) |
Returns true if this is a route that is part of a roundabout.
boolean com.cartotype.FeatureInfo.route | ( | ) |
Returns true if this is a route.
int com.cartotype.FeatureInfo.setBridge | ( | boolean | aValue | ) |
Sets whether this route is a bridge or an ordinary route. Does nothing and returns an error code if this is not a route.
int com.cartotype.FeatureInfo.setCycleAccess | ( | boolean | aValue | ) |
Allows or forbids cycle access. Does nothing and returns an error if this is not a route.
int com.cartotype.FeatureInfo.setDriveOnLeft | ( | boolean | aValue | ) |
Sets the rule of the road. Does nothing and returns an error if this is not a route.
int com.cartotype.FeatureInfo.setEmergencyVehicleAccess | ( | boolean | aValue | ) |
Allows or forbids emergency vehicle access. Does nothing and returns an error if this is not a route.
int com.cartotype.FeatureInfo.setGradient | ( | int | aValue | ) |
Sets the gradient. Does nothing and returns an error if this is not a route. Gradients are stored only in route arcs and not usually in other map objects.
void com.cartotype.FeatureInfo.setLevel | ( | int | aLevel | ) |
Sets the level, clamping it to the range -8 ... 7.
int com.cartotype.FeatureInfo.setMotorVehicleAccess | ( | boolean | aValue | ) |
Allows or forbids motor vehicle access. Does nothing and returns an error if this is not a route.
int com.cartotype.FeatureInfo.setOtherAccessRestricted | ( | boolean | aValue | ) |
Sets or clears the flag indicating that there are other access restrictions. Does nothing and returns an error if this is not a route.
int com.cartotype.FeatureInfo.setPedestrianAccess | ( | boolean | aValue | ) |
Allows or forbids pedestrian access. Does nothing and returns an error if this is not a route.
int com.cartotype.FeatureInfo.setRoundabout | ( | boolean | aValue | ) |
Sets whether this route is part of a roundabout. Does nothing and returns an error if this is not a route.
int com.cartotype.FeatureInfo.setSpeedLimit | ( | int | aValue | ) |
Sets the speed limit in kph. A value of zero indicates that no speed limit is known. Does nothing and returns an error if this is not a route.
int com.cartotype.FeatureInfo.setSubType | ( | int | aValue | ) |
Sets the sub-type. Does nothing and returns an error if this is a route.
int com.cartotype.FeatureInfo.setToll | ( | boolean | aValue | ) |
Sets whether this route is a toll route. Does nothing and returns an error if this is not a route.
int com.cartotype.FeatureInfo.setTunnel | ( | boolean | aValue | ) |
Sets whether this route is a tunnel or an ordinary route. Does nothing and returns an error code if this is not a route.
int com.cartotype.FeatureInfo.setType | ( | int | aType | ) |
Sets the type. Does nothing and returns an error if this is a route and the new type is a non-route type, or vice versa.
int com.cartotype.FeatureInfo.setVehicleAccess | ( | boolean | aValue | ) |
Sets or clears the vehicle access flags. Does nothing and returns an error if this is not a route.
int com.cartotype.FeatureInfo.setWrongWay | ( | boolean | aValue | ) |
Sets whether this is a directed route arc going the wrong way along a one-way route. Does nothing and returns an error if this is not a route. Useful only in route calculation.
int com.cartotype.FeatureInfo.speedLimit | ( | ) |
Returns the speed limit in kph. A value of zero indicates that no speed limit is known.
int com.cartotype.FeatureInfo.subType | ( | ) |
Returns the sub-type. Returns 0 if this is a route.
boolean com.cartotype.FeatureInfo.toll | ( | ) |
Returns true if this is a toll route.
boolean com.cartotype.FeatureInfo.tunnel | ( | ) |
Returns true if this is a route that is a tunnel.
int com.cartotype.FeatureInfo.type | ( | ) |
Returns the feature type.
boolean com.cartotype.FeatureInfo.wrongWay | ( | ) |
Returns true if this is a directed route arc going the wrong way along a one-way route. Useful only in route calculation.
|
static |
The number of gradients.
|
static |
The maximum value for the sub-type of a non-route object.
|
static |
A flag to forbid cycle access in a feature info object, or, in a vehicle type, to indicate a cyclist.
|
static |
A flag to forbid emergency vehicle access in a feature info object, or, in a vehicle type, to indicate an emergency vehicle.
|
static |
A mask to select the route access flags.
|
static |
A flag to forbid motor vehicle access in a feature info object, or, in a vehicle type, to indicate a motor vehicle.
|
static |
A set of flags indicating normal access: that is, access for pedestrians, cyclists and motor vehicles.
|
static |
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.
|
static |
A flag to forbid pedestrian access in a feature info object, or, in a vehicle type, to indicate a pedestrian.
|
static |
The amount by which the route access flags are shifted.
|
static |
A set of flags covering all vehicles.
|
static |
A flag indicating that this route is one-way but is stored in the opposite direction to the allowed direction of travel.
|
static |
The number of feature types that are used for routes. These values are also indexes into the speed and bonus arrays in route profiles.