View Source GoogleApi.ContentWarehouse.V1.Model.GeostoreRestrictionProto (google_api_content_warehouse v0.3.0)

A restriction is an expression that limits when an action can be taken. Each restriction has a set of conditions. If all of the conditions are true, then the restriction applies and the action cannot be taken. For example, the restriction "no turns 3-5pm except buses" would have two conditions: "time is 3-5pm" and "vehicle is not a bus". If both of these conditions apply, the restriction is true, and the turn is prohibited. Multiple restrictions may apply to the same action. Clients handle this by always declaring RestrictionProto as a "repeated" element. The semantics of having multiple restrictions are that if any restriction applies, then the action cannot be taken. In other words, restrictions are OR-ed together. Putting all of this together, a set of RestrictionProtos can be interpreted as an bool expression in disjunctive normal form: (A and B) or (D and E and F) or (G and H) The action is prohibited if this expression is true. Note that a restriction with no conditions is always true, i.e. its action is always prohibited. NOTE: RestrictionProtos are often compared against one another (e.g. to check for duplicate/redundant restrictions) by canonicalizing them via GetCanonicalRestriction() in google3/geostore/base/internal/restriction.cc. Any fields that don't contribute to the definition of a restriction in the real world should be bundled with the annotative fields near the bottom and excluded in GetCanonicalRestriction(). LINT.IfChange

Attributes

  • autonomousDrivingProducts (type: list(String.t), default: nil) - The restriction only applies in these specific autonomous driving product scenarios. NOTE: This should only be set on restrictions with TRAVEL_AUTONOMOUS_VEHICLE travel mode.
  • intersectionGroup (type: GoogleApi.ContentWarehouse.V1.Model.GeostoreFeatureIdProto.t, default: nil) - Actually required if style=STYLE_IN_OUT, otherwise forbidden. Typically the intersection group type is artifact, but either artifact or logical groups can be used for STYLE_IN_OUT restrictions.
  • metadata (type: GoogleApi.ContentWarehouse.V1.Model.GeostoreFieldMetadataProto.t, default: nil) - Field-level metadata for this restriction.
  • restrictionGroup (type: GoogleApi.ContentWarehouse.V1.Model.GeostoreFeatureIdProto.t, default: nil) - Restriction group this restriction belongs to.
  • restrictionToken (type: String.t, default: nil) - A token that can be used to identify the version of the data about this restriction.
  • schedule (type: GoogleApi.ContentWarehouse.V1.Model.GeostoreTimeScheduleProto.t, default: nil) - When specified, restriction applies only at particular times (operating hours or times of the year: reversing lanes, seasonal roads, no left turns from 3-5pm Mon-Fri except holidays). Otherwise, restriction is in effect at all times.
  • scope (type: String.t, default: nil) - The scope that the restriction applies to. - SCOPE_DIRECTION means the segment/sibling pair is restricted in the direction of the segment that contains this RestrictionProto. For segment/sibling pairs with pedestrian facilities (and thus side-of-road routing) the RestrictionProto restricts both facilities in the direction of the segment (assuming that the restriction applies to travel mode TRAVEL_PEDESTRIAN). - SCOPE_SIDE means the RestrictionProto applies only to the side of road that the containing segment represents. That sibling's pedestrian facility is restricted in both directions. Schema constraints: - SCOPE_SIDE must be set if and only if travel_mode == [TRAVEL_PEDESTRIAN] and the segment containing the restriction has the pedestrian_facility field set and is not set to PEDESTRIAN_FACILITY_UNKNOWN. Such restrictions must have no subpath. - All other restrictions must have this field set to SCOPE_DIRECTION (whether explicitly or implicitly). This distinction is necessary for cases such as pedestrian facility on one-way segment/sibling roads.
  • style (type: String.t, default: nil) - Restriction Style defines the semantics of the subpath field, as defined above in the documentation of subpath.
  • subpath (type: list(GoogleApi.ContentWarehouse.V1.Model.GeostoreFeatureIdProto.t), default: nil) - "subpath" specifies the GeoStore segments that this restriction applies to, according to the restriction_style field below. Segments that are referenced by this subpath field also refer to this feature back via the same subpath field. For all styles of restriction, all segments in the subpath must have identical copies of the restriction. In other words, restrictions are duplicated along every segment in the subpath. Note that subpaths of length 1 do not have any purpose and are disallowed. Note that it is possible to represent restrictions either using STYLE_CONTIGUOUS, or depending on the length of the subpath, one of the more specific STYLE_SINGLE, STYLE_TURN, or STYLE_IN_OUT. New code should use the more specific alternatives if possible, as they support instant updates. For restriction_style == STYLE_CONTIGUOUS (the default): "subpath" can either be empty, for a single-segment restriction, or it specifies exactly the sequence of segments which this restriction applies to. The subpath may be used to specify a turn restriction (a subpath of length 2) or to prohibit more complex maneuvers. For example, when merging onto a road from the right-hand side it may not be possible to make an immediate left turn due to insufficient time to cross the intervening lanes or the presence of a physical barrier. This would be indicated by a subpath restriction of length 3 or more. For restriction_style == STYLE_SINGLE: The subpath field of the Restriction must be empty. The restriction applies only to the segment it is attached to. There must not be an intersection group specified. For restriction_style == STYLE_TURN: The subpath field of the Restriction must contain exactly two segments. The first is called the "in_segment", the second is the "out_segment". They must be contiguous, i.e. the end intersection of the in_segment is the start intersection of the out_segment. The restriction applies only to a direct maneuver from the in_segment to the out_segment. Other paths from the in_segment to the out_segment are not restricted. There must not be an intersection group specified. For restriction_style == STYLE_IN_OUT: The subpath field of the Restriction must contain exactly two segments. The first is called the "in_segment", the second is the "out_segment". Note that the two segments define paths, but may not actually be one. The end intersection of the in_segment must be in an intersection group which also contains the start intersection of the out_segment. The in- and out-segments are not required to be adjacent, but may be. Either way, the restriction applies to any path from the in_segment to the out_segment through the intersection group, not just direct turns. The intersection_group must be specified. Note that clients which read restrictions and need to know which paths are restricted by a given IN_OUT restriction must expand the IN_OUT restriction by finding all paths through the intersection group from the in_segment to the out_segment.
  • temporaryData (type: GoogleApi.ContentWarehouse.V1.Model.Proto2BridgeMessageSet.t, default: nil) - A place for clients to attach arbitrary data to a restriction. Never set in MapFacts.
  • travelMode (type: list(String.t), default: nil) - Restriction applies only to the given travel modes. This field should always be set, but may be missing in old data. WARNING: Restrictions with no travel modes are DEPRECATED. Historically, no travel modes has meant "all travel modes", except they didn't really even mean that, because Pathfinder would use a complex set of heuristics to interpret the "correct" travel modes. Pathfinder currently (last updated August 2013) has heuristics to cope with incomplete data that reduce or extend application of the specified restrictions to pedestrians or bicycles. We are actively working to remove these heuristics and replace them with explicit, correct travel modes in the data. See b/8746491.
  • type (type: String.t, default: nil) - LINT.ThenChange(//depot/google3/google/geo/entities/v1/fields/segment.proto) clang-format on The type of restriction. This is not a condition, but rather tells you what kind of restriction it is. This field should always be set.
  • vehicleAttributeFilter (type: GoogleApi.ContentWarehouse.V1.Model.GeostoreVehicleAttributeFilterProto.t, default: nil) - The restriction only applies to vehicles that meet all of the attributes defined here. If this is empty, it does not affect the scope of the restriction.

Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Types

@type t() :: %GoogleApi.ContentWarehouse.V1.Model.GeostoreRestrictionProto{
  autonomousDrivingProducts: [String.t()] | nil,
  intersectionGroup:
    GoogleApi.ContentWarehouse.V1.Model.GeostoreFeatureIdProto.t() | nil,
  metadata:
    GoogleApi.ContentWarehouse.V1.Model.GeostoreFieldMetadataProto.t() | nil,
  restrictionGroup:
    GoogleApi.ContentWarehouse.V1.Model.GeostoreFeatureIdProto.t() | nil,
  restrictionToken: String.t() | nil,
  schedule:
    GoogleApi.ContentWarehouse.V1.Model.GeostoreTimeScheduleProto.t() | nil,
  scope: String.t() | nil,
  style: String.t() | nil,
  subpath:
    [GoogleApi.ContentWarehouse.V1.Model.GeostoreFeatureIdProto.t()] | nil,
  temporaryData:
    GoogleApi.ContentWarehouse.V1.Model.Proto2BridgeMessageSet.t() | nil,
  travelMode: [String.t()] | nil,
  type: String.t() | nil,
  vehicleAttributeFilter:
    GoogleApi.ContentWarehouse.V1.Model.GeostoreVehicleAttributeFilterProto.t()
    | nil
}

Functions

@spec decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.