类 StepIntersection

java.lang.Object
ai.nextbillion.kits.directions.models.DirectionsJsonObject
ai.nextbillion.kits.directions.models.StepIntersection
所有已实现的接口:
Serializable

public abstract class StepIntersection extends DirectionsJsonObject
Object representing an intersection along the step.
另请参阅:
  • 构造器详细资料

    • StepIntersection

      public StepIntersection()
  • 方法详细资料

    • builder

      public static StepIntersection.Builder builder()
      Create a new instance of this class by using the StepIntersection.Builder class.
      返回:
      this classes StepIntersection.Builder for creating a new instance
    • location

      @NonNull public ai.nextbillion.kits.geojson.Point location()
      A Point representing this intersection location.
      返回:
      GeoJson Point representing this intersection location
    • rawLocation

      @NonNull @SerializedName("location") protected abstract double[] rawLocation()
      A Point representing this intersection location. Since the rawLocation isn't public, it's okay to be mutable as long as nothing in this SDK changes values.
      返回:
      GeoJson Point representing this intersection location
    • bearings

      @Nullable public abstract List<Integer> bearings()
      An integer list of bearing values available at the step intersection.
      返回:
      An array of bearing values (for example [0,90,180,270]) that are available at the intersection. The bearings describe all available roads at the intersection.
    • classes

      @Nullable public abstract List<String> classes()
      A list of strings signifying the classes of the road exiting the intersection. Possible values:
      • toll: the road continues on a toll road
      • ferry: the road continues on a ferry
      • restricted: the road continues on with access restrictions
      • motorway: the road continues on a motorway
      • tunnel: the road continues on a tunnel
      返回:
      a string list containing the classes of the road exiting the intersection
    • entry

      @Nullable public abstract List<Boolean> entry()
      A list of entry flags, corresponding in a 1:1 relationship to the bearings. A value of true indicates that the respective road could be entered on a valid route. false indicates that the turn onto the respective road would violate a restriction.
      返回:
      a list of entry flags, corresponding in a 1:1 relationship to the bearings
    • in

      @Nullable public abstract Integer in()
      Index into bearings/entry array. Used to calculate the bearing before the turn. Namely, the clockwise angle from true north to the direction of travel before the maneuver/passing the intersection. To get the bearing in the direction of driving, the bearing has to be rotated by a value of 180. The value is not supplied for departure maneuvers.
      返回:
      index into bearings/entry array
    • out

      @Nullable public abstract Integer out()
      Index out of the bearings/entry array. Used to extract the bearing after the turn. Namely, The clockwise angle from true north to the direction of travel after the maneuver/passing the intersection. The value is not supplied for arrive maneuvers.
      返回:
      index out of the bearings/entry array
    • lanes

      @Nullable public abstract List<IntersectionLanes> lanes()
      Array of lane objects that represent the available turn lanes at the intersection. If no lane information is available for an intersection, the lanes property will not be present. Lanes are provided in their order on the street, from left to right.
      返回:
      array of lane objects that represent the available turn lanes at the intersection
    • geometryIndex

      @Nullable @SerializedName("geometry_index") public abstract Integer geometryIndex()
      The zero-based index for the intersection. This value can be used to apply the duration annotation that corresponds with the intersection. Only available on the driving profile.
      返回:
      index for the intersection
    • isUrban

      @Nullable @SerializedName("is_urban") public abstract Boolean isUrban()
      A boolean indicating whether the road exiting the intersection is considered to be in an urban area. This value is determined by the density of the surrounding road network. Only available on the DirectionsCriteria.PROFILE_DRIVING profile.
      返回:
      a value indicating whether the road exiting the intersection is in an urban area
    • adminIndex

      @Nullable @SerializedName("admin_index") public abstract Integer adminIndex()
      The zero-based index into the admin list on the route leg for this intersection. Use this field to look up the ISO-3166-1 country code for this point on the route. Only available on the `driving` profile.
      返回:
      a zero-based index into the admin list on the route leg.
      另请参阅:
    • restStop

      @Nullable @SerializedName("rest_stop") public abstract RestStop restStop()
      An object containing information about passing rest stops along the route. Only available on the `driving` profile.
      返回:
      an object containing information about passing rest stops along the route.
    • tollCollection

      @Nullable @SerializedName("toll_collection") public abstract TollCollection tollCollection()
      An object containing information about a toll collection point along the route. This is a payment booth or overhead electronic gantry payment booth or overhead electronic gantry where toll charge is collected. Only available on the DirectionsCriteria.PROFILE_DRIVING profile.
      返回:
      an object containing information about a toll collection point along the route.
    • tunnelName

      @Nullable @SerializedName("tunnel_name") public abstract String tunnelName()
      Name of the tunnel. Value may be present if classes() contains "tunnel".
      返回:
      name of the tunnel
    • toBuilder

      public abstract StepIntersection.Builder toBuilder()
      Convert the current StepIntersection to its builder holding the currently assigned values. This allows you to modify a single property and then rebuild the object resulting in an updated and modified StepIntersection.
      返回:
      a StepIntersection.Builder with the same values set to match the ones defined in this StepIntersection
    • typeAdapter

      public static com.google.gson.TypeAdapter<StepIntersection> typeAdapter(com.google.gson.Gson gson)
      Gson type adapter for parsing Gson to this class.
      参数:
      gson - the built Gson object
      返回:
      the type adapter for this class
    • fromJson

      public static StepIntersection fromJson(String json)
      Create a new instance of this class by passing in a formatted valid JSON String.
      参数:
      json - a formatted valid JSON string defining a StepIntersection
      返回:
      a new instance of this class defined by the values passed inside this static factory method