Skip to content

Commit

Permalink
feat: [routing] add API for experimental flyover and narrow road poly…
Browse files Browse the repository at this point in the history
…line details (#5865)

* feat: add API for experimental flyover and narrow road polyline details

PiperOrigin-RevId: 703138506

Source-Link: googleapis/googleapis@a3211f3

Source-Link: googleapis/googleapis-gen@7616de9
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcm91dGluZy8uT3dsQm90LnlhbWwiLCJoIjoiNzYxNmRlOWM5YjhlNWU0YWJjZGYyNWY5MDY5ZWJlM2UzMjdmNTFlYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: d-goog <[email protected]>
  • Loading branch information
3 people authored Dec 9, 2024
1 parent ad679d1 commit 24d7341
Show file tree
Hide file tree
Showing 7 changed files with 2,532 additions and 806 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.maps.routing.v2;

import "google/api/field_behavior.proto";

option csharp_namespace = "Google.Maps.Routing.V2";
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
option java_multiple_files = true;
option java_outer_classname = "PolylineDetailsProto";
option java_package = "com.google.maps.routing.v2";
option objc_class_prefix = "GMRV2";
option php_namespace = "Google\\Maps\\Routing\\V2";
option ruby_package = "Google::Maps::Routing::V2";

// Details corresponding to a given index or contiguous segment of a polyline.
// Given a polyline with points P_0, P_1, ... , P_N (zero-based index), the
// `PolylineDetails` defines an interval and associated metadata.
message PolylineDetails {
// Encapsulates the start and end indexes for a polyline detail.
// For instances where the data corresponds to a single point, `start_index`
// and `end_index` will be equal.
message PolylinePointIndex {
// The start index of this detail in the polyline.
optional int32 start_index = 1;

// The end index of this detail in the polyline.
optional int32 end_index = 2;
}

// Encapsulates the states of road features along a stretch of polyline.
enum RoadFeatureState {
// The road feature's state was not computed (default value).
ROAD_FEATURE_STATE_UNSPECIFIED = 0;

// The road feature exists.
EXISTS = 1;

// The road feature does not exist.
DOES_NOT_EXIST = 2;
}

// Encapsulates information about flyovers along the polyline.
message FlyoverInfo {
// Output only. Denotes whether a flyover exists for a given stretch of the
// polyline.
RoadFeatureState flyover_presence = 1
[(google.api.field_behavior) = OUTPUT_ONLY];

// The location of flyover related information along the polyline.
PolylinePointIndex polyline_point_index = 2;
}

// Encapsulates information about narrow roads along the polyline.
message NarrowRoadInfo {
// Output only. Denotes whether a narrow road exists for a given stretch of
// the polyline.
RoadFeatureState narrow_road_presence = 1
[(google.api.field_behavior) = OUTPUT_ONLY];

// The location of narrow road related information along the polyline.
PolylinePointIndex polyline_point_index = 2;
}

// Flyover details along the polyline.
repeated FlyoverInfo flyover_info = 12;

// Narrow road details along the polyline.
repeated NarrowRoadInfo narrow_road_info = 13;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import "google/maps/routing/v2/localized_time.proto";
import "google/maps/routing/v2/location.proto";
import "google/maps/routing/v2/navigation_instruction.proto";
import "google/maps/routing/v2/polyline.proto";
import "google/maps/routing/v2/polyline_details.proto";
import "google/maps/routing/v2/route_label.proto";
import "google/maps/routing/v2/route_travel_mode.proto";
import "google/maps/routing/v2/speed_reading_interval.proto";
Expand Down Expand Up @@ -131,6 +132,9 @@ message Route {
// `TRAFFIC_AWARE_OPTIMAL`. `Route.route_token` is not supported for requests
// that have Via waypoints.
string route_token = 12;

// Contains information about details along the polyline.
PolylineDetails polyline_details = 14;
}

// Contains the additional information that the user should be informed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,20 @@ message ComputeRoutesRequest {
// is meant to be read as-is. This content is for display only.
// Do not programmatically parse it.
HTML_FORMATTED_NAVIGATION_INSTRUCTIONS = 4;

// Flyover information for the route(s). The
// `routes.polyline_details.flyover_info` fieldmask must be specified to
// return this information. This data will only currently be populated for
// certain metros in India. This feature is experimental, and the
// SKU/charge is subject to change.
FLYOVER_INFO_ON_POLYLINE = 7;

// Narrow road information for the route(s). The
// `routes.polyline_details.narrow_road_info` fieldmask must be specified
// to return this information. This data will only currently be populated
// for certain metros in India. This feature is experimental, and the
// SKU/charge is subject to change.
NARROW_ROAD_INFO_ON_POLYLINE = 8;
}

// Required. Origin waypoint.
Expand Down
Loading

0 comments on commit 24d7341

Please sign in to comment.