Java SDK for 2D
 All Classes Namespaces Functions Variables Pages
RoadInfo Class Reference

RoadInfo class is providing information about road type. More...

Classes

class  RoadClass
 Enum of the road class as it is used for computing. More...
 

Public Member Functions

 RoadInfo ()
 Class constructor. More...
 
 RoadInfo (int roadOffset, int roadFlags, String isoCode, int onroadPosX, int onroadPosY, int offroadDistance)
 
String getIsoCode ()
 
Position getOnroadPos ()
 
int getOffroadDistance ()
 
int getRoadOffset ()
 
boolean isFerry ()
 
boolean isProhibited ()
 
int roadClass ()
 
byte speedCategory ()
 
boolean isTollRoad ()
 
boolean isPaved ()
 
boolean isCongestionCharge ()
 
boolean isUrban ()
 
boolean isTunnel ()
 
int speedRestriction ()
 
String toString ()
 

Static Public Member Functions

static Bundle writeBundle (RoadInfo info)
 
static RoadInfo readBundle (Bundle b)
 

Detailed Description

RoadInfo class is providing information about road type.

This is retrieved from the ApiLocation#getLocationRoadInfo(Position, int) function.

Constructor & Destructor Documentation

RoadInfo ( )

Class constructor.

Referenced by RoadInfo.readBundle().

RoadInfo ( int  roadOffset,
int  roadFlags,
String  isoCode,
int  onroadPosX,
int  onroadPosY,
int  offroadDistance 
)

Member Function Documentation

String getIsoCode ( )
Returns
Iso code string of the map, where the road is located.

Referenced by RoadInfo.writeBundle().

int getOffroadDistance ( )
Returns
the distance between the original position and the calculated on-road (map matched) position

Referenced by RoadInfo.writeBundle().

Position getOnroadPos ( )
Returns
the closest on-road (map matched) position

Referenced by RoadInfo.writeBundle().

int getRoadOffset ( )
Returns
A unique identifier of the road in map. This identifier is used for special routing.

Referenced by RoadInfo.writeBundle().

boolean isCongestionCharge ( )
Returns
True if it is a road with congestion charge.

Referenced by RoadInfo.isTollRoad().

boolean isFerry ( )
Returns
True if the road is ferry.
boolean isPaved ( )
Returns
True if the road is paved.
boolean isProhibited ( )
Returns
True if the road is prohibited to drive on.
boolean isTollRoad ( )
Returns
True if it is a toll road.

References RoadInfo.isCongestionCharge(), RoadInfo.RoadClass.RC1, and RoadInfo.roadClass().

boolean isTunnel ( )
Returns
True if the road is tunnel.
boolean isUrban ( )
Returns
True if the road is in urban area.
static RoadInfo readBundle ( Bundle  b)
static
int roadClass ( )
Returns
the road class.

Referenced by RoadInfo.isTollRoad().

byte speedCategory ( )
Returns
the speed category of the road.
int speedRestriction ( )
Returns
the speed restriction for that road.
String toString ( )

References Position.getX(), and Position.getY().