valhalla-proto 3.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- valhalla_proto-3.7.0/.gitignore +4 -0
- valhalla_proto-3.7.0/COPYING +22 -0
- valhalla_proto-3.7.0/PKG-INFO +120 -0
- valhalla_proto-3.7.0/README.md +108 -0
- valhalla_proto-3.7.0/descriptors/api.proto +30 -0
- valhalla_proto-3.7.0/descriptors/common.proto +424 -0
- valhalla_proto-3.7.0/descriptors/directions.proto +155 -0
- valhalla_proto-3.7.0/descriptors/expansion.proto +35 -0
- valhalla_proto-3.7.0/descriptors/incidents.proto +86 -0
- valhalla_proto-3.7.0/descriptors/info.proto +35 -0
- valhalla_proto-3.7.0/descriptors/isochrone.proto +28 -0
- valhalla_proto-3.7.0/descriptors/matrix.proto +29 -0
- valhalla_proto-3.7.0/descriptors/options.proto +548 -0
- valhalla_proto-3.7.0/descriptors/sign.proto +24 -0
- valhalla_proto-3.7.0/descriptors/status.proto +31 -0
- valhalla_proto-3.7.0/descriptors/transit.proto +83 -0
- valhalla_proto-3.7.0/descriptors/transit_fetch.proto +77 -0
- valhalla_proto-3.7.0/descriptors/trip.proto +415 -0
- valhalla_proto-3.7.0/pyproject.toml +37 -0
- valhalla_proto-3.7.0/setup.cfg +4 -0
- valhalla_proto-3.7.0/setup.py +67 -0
- valhalla_proto-3.7.0/src/__init__.py +0 -0
- valhalla_proto-3.7.0/src/__version__.py +24 -0
- valhalla_proto-3.7.0/src/_upstream.py +1 -0
- valhalla_proto-3.7.0/src/message_pool.py +3 -0
- valhalla_proto-3.7.0/src/py.typed +0 -0
- valhalla_proto-3.7.0/src/valhalla/__init__.py +4454 -0
- valhalla_proto-3.7.0/src/valhalla/mjolnir/__init__.py +346 -0
- valhalla_proto-3.7.0/valhalla_proto.egg-info/PKG-INFO +120 -0
- valhalla_proto-3.7.0/valhalla_proto.egg-info/SOURCES.txt +31 -0
- valhalla_proto-3.7.0/valhalla_proto.egg-info/dependency_links.txt +1 -0
- valhalla_proto-3.7.0/valhalla_proto.egg-info/requires.txt +1 -0
- valhalla_proto-3.7.0/valhalla_proto.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 Valhalla contributors
|
|
4
|
+
Copyright (c) 2015-2017 Mapillary AB, Mapzen
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: valhalla-proto
|
|
3
|
+
Version: 3.7.0
|
|
4
|
+
Summary: Generated Python code for the Valhalla protobuf API
|
|
5
|
+
Author-email: Christian Beiwinkel <chrstn@bwnkl.de>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: COPYING
|
|
10
|
+
Requires-Dist: betterproto2
|
|
11
|
+
Dynamic: license-file
|
|
12
|
+
|
|
13
|
+
# Valhalla Proto
|
|
14
|
+
|
|
15
|
+
Generated protocol buffers code for the Valhalla routing engine.
|
|
16
|
+
|
|
17
|
+
A small and handy Python package that contains generated code from Valhalla's protobuf definitions that can be used to communicate with either the HTTP server or the Actor directly via Valhalla's Python bindings.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
Installation is as easy as:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install valhalla-proto
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Note that this package uses [python-betterproto2](https://github.com/betterproto/python-betterproto2), which gives a much smoother developer Experience than Google's protobuf compiler.
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from typing import List, Tuple
|
|
34
|
+
|
|
35
|
+
import requests
|
|
36
|
+
|
|
37
|
+
from valhalla_proto.valhalla import (
|
|
38
|
+
Api,
|
|
39
|
+
DirectionsType,
|
|
40
|
+
LatLng,
|
|
41
|
+
OptionsAction,
|
|
42
|
+
Options,
|
|
43
|
+
CostingType,
|
|
44
|
+
OptionsFormat,
|
|
45
|
+
Location,
|
|
46
|
+
CostingOptions,
|
|
47
|
+
Costing,
|
|
48
|
+
)
|
|
49
|
+
from valhalla_proto._upstream import VALHALLA_COMMIT
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def make_options(
|
|
53
|
+
coords: List[Tuple[float, float]],
|
|
54
|
+
action: OptionsAction = OptionsAction.route,
|
|
55
|
+
costing_type: CostingType = CostingType.auto_,
|
|
56
|
+
format: OptionsFormat = OptionsFormat.pbf,
|
|
57
|
+
) -> Options:
|
|
58
|
+
costing = Costing(options=CostingOptions())
|
|
59
|
+
|
|
60
|
+
locs: List[Location] = []
|
|
61
|
+
for lon, lat in coords:
|
|
62
|
+
locs.append(Location(ll=LatLng(lat=lat, lng=lon)))
|
|
63
|
+
|
|
64
|
+
return Options(
|
|
65
|
+
action=action,
|
|
66
|
+
costing_type=costing_type,
|
|
67
|
+
format=format,
|
|
68
|
+
locations=locs,
|
|
69
|
+
costings={costing_type: costing},
|
|
70
|
+
directions_type=DirectionsType.maneuvers,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def process_directions(api: Api):
|
|
75
|
+
if not api.directions:
|
|
76
|
+
print("Error: no directions found")
|
|
77
|
+
return
|
|
78
|
+
|
|
79
|
+
if not api.directions.routes:
|
|
80
|
+
print("Error: no route found")
|
|
81
|
+
return
|
|
82
|
+
|
|
83
|
+
if not api.directions.routes[0].legs:
|
|
84
|
+
print("Error: no leg found")
|
|
85
|
+
return
|
|
86
|
+
|
|
87
|
+
leg = api.directions.routes[0].legs[0]
|
|
88
|
+
|
|
89
|
+
if leg.shape:
|
|
90
|
+
print(f"Route shape: {leg.shape}")
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def main():
|
|
94
|
+
print(f"Using protobuf code generated from Valhalla commit {VALHALLA_COMMIT}")
|
|
95
|
+
|
|
96
|
+
coords = [
|
|
97
|
+
(11.119188, 52.862036),
|
|
98
|
+
(11.118704, 52.862658),
|
|
99
|
+
]
|
|
100
|
+
|
|
101
|
+
options = make_options(
|
|
102
|
+
action=OptionsAction.route,
|
|
103
|
+
coords=coords,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
api_request = Api(options=options)
|
|
107
|
+
|
|
108
|
+
resp = requests.post(
|
|
109
|
+
"https://valhalla1.openstreetmap.de/trace_attributes",
|
|
110
|
+
data=api_request.SerializeToString(),
|
|
111
|
+
headers={"Content-Type": "application/x-protobuf"},
|
|
112
|
+
)
|
|
113
|
+
api_response = Api.FromString(resp.content)
|
|
114
|
+
|
|
115
|
+
process_directions(api_response)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
if __name__ == "__main__":
|
|
119
|
+
main()
|
|
120
|
+
```
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Valhalla Proto
|
|
2
|
+
|
|
3
|
+
Generated protocol buffers code for the Valhalla routing engine.
|
|
4
|
+
|
|
5
|
+
A small and handy Python package that contains generated code from Valhalla's protobuf definitions that can be used to communicate with either the HTTP server or the Actor directly via Valhalla's Python bindings.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
Installation is as easy as:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install valhalla-proto
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Note that this package uses [python-betterproto2](https://github.com/betterproto/python-betterproto2), which gives a much smoother developer Experience than Google's protobuf compiler.
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```python
|
|
21
|
+
from typing import List, Tuple
|
|
22
|
+
|
|
23
|
+
import requests
|
|
24
|
+
|
|
25
|
+
from valhalla_proto.valhalla import (
|
|
26
|
+
Api,
|
|
27
|
+
DirectionsType,
|
|
28
|
+
LatLng,
|
|
29
|
+
OptionsAction,
|
|
30
|
+
Options,
|
|
31
|
+
CostingType,
|
|
32
|
+
OptionsFormat,
|
|
33
|
+
Location,
|
|
34
|
+
CostingOptions,
|
|
35
|
+
Costing,
|
|
36
|
+
)
|
|
37
|
+
from valhalla_proto._upstream import VALHALLA_COMMIT
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def make_options(
|
|
41
|
+
coords: List[Tuple[float, float]],
|
|
42
|
+
action: OptionsAction = OptionsAction.route,
|
|
43
|
+
costing_type: CostingType = CostingType.auto_,
|
|
44
|
+
format: OptionsFormat = OptionsFormat.pbf,
|
|
45
|
+
) -> Options:
|
|
46
|
+
costing = Costing(options=CostingOptions())
|
|
47
|
+
|
|
48
|
+
locs: List[Location] = []
|
|
49
|
+
for lon, lat in coords:
|
|
50
|
+
locs.append(Location(ll=LatLng(lat=lat, lng=lon)))
|
|
51
|
+
|
|
52
|
+
return Options(
|
|
53
|
+
action=action,
|
|
54
|
+
costing_type=costing_type,
|
|
55
|
+
format=format,
|
|
56
|
+
locations=locs,
|
|
57
|
+
costings={costing_type: costing},
|
|
58
|
+
directions_type=DirectionsType.maneuvers,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def process_directions(api: Api):
|
|
63
|
+
if not api.directions:
|
|
64
|
+
print("Error: no directions found")
|
|
65
|
+
return
|
|
66
|
+
|
|
67
|
+
if not api.directions.routes:
|
|
68
|
+
print("Error: no route found")
|
|
69
|
+
return
|
|
70
|
+
|
|
71
|
+
if not api.directions.routes[0].legs:
|
|
72
|
+
print("Error: no leg found")
|
|
73
|
+
return
|
|
74
|
+
|
|
75
|
+
leg = api.directions.routes[0].legs[0]
|
|
76
|
+
|
|
77
|
+
if leg.shape:
|
|
78
|
+
print(f"Route shape: {leg.shape}")
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def main():
|
|
82
|
+
print(f"Using protobuf code generated from Valhalla commit {VALHALLA_COMMIT}")
|
|
83
|
+
|
|
84
|
+
coords = [
|
|
85
|
+
(11.119188, 52.862036),
|
|
86
|
+
(11.118704, 52.862658),
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
options = make_options(
|
|
90
|
+
action=OptionsAction.route,
|
|
91
|
+
coords=coords,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
api_request = Api(options=options)
|
|
95
|
+
|
|
96
|
+
resp = requests.post(
|
|
97
|
+
"https://valhalla1.openstreetmap.de/trace_attributes",
|
|
98
|
+
data=api_request.SerializeToString(),
|
|
99
|
+
headers={"Content-Type": "application/x-protobuf"},
|
|
100
|
+
)
|
|
101
|
+
api_response = Api.FromString(resp.content)
|
|
102
|
+
|
|
103
|
+
process_directions(api_response)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
if __name__ == "__main__":
|
|
107
|
+
main()
|
|
108
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
option optimize_for = LITE_RUNTIME;
|
|
3
|
+
package valhalla;
|
|
4
|
+
|
|
5
|
+
import public "options.proto"; // the request, filled out by loki
|
|
6
|
+
import public "trip.proto"; // the paths, filled out by thor
|
|
7
|
+
import public "directions.proto"; // the directions, filled out by odin
|
|
8
|
+
import public "info.proto"; // statistics about the request, filled out by loki/thor/odin
|
|
9
|
+
import public "status.proto"; // info for status endpoint
|
|
10
|
+
import public "matrix.proto"; // the matrix results
|
|
11
|
+
import public "isochrone.proto"; // the isochrone results
|
|
12
|
+
import public "expansion.proto"; // the expansion results
|
|
13
|
+
|
|
14
|
+
message Api {
|
|
15
|
+
// this is the request to the api
|
|
16
|
+
Options options = 1;
|
|
17
|
+
|
|
18
|
+
// these are different responses based on the type of request you make
|
|
19
|
+
Trip trip = 2; // trace_attributes
|
|
20
|
+
Directions directions = 3; // route, optimized_route, trace_route, centroid
|
|
21
|
+
Status status = 4; // status
|
|
22
|
+
Matrix matrix = 5; // sources_to_targets
|
|
23
|
+
Isochrone isochrone = 6; // isochrone
|
|
24
|
+
Expansion expansion = 7; // expansion
|
|
25
|
+
//TODO: locate;
|
|
26
|
+
//TODO: height;
|
|
27
|
+
|
|
28
|
+
// here we store a bit of info about what happened during request processing (stats/errors/warnings)
|
|
29
|
+
Info info = 20;
|
|
30
|
+
}
|
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
option optimize_for = LITE_RUNTIME;
|
|
3
|
+
package valhalla;
|
|
4
|
+
|
|
5
|
+
message LatLng {
|
|
6
|
+
oneof has_lat {
|
|
7
|
+
double lat = 1;
|
|
8
|
+
}
|
|
9
|
+
oneof has_lng {
|
|
10
|
+
double lng = 2;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message RouteLandmark {
|
|
15
|
+
enum Type {
|
|
16
|
+
kUnused = 0;
|
|
17
|
+
kFuel = 1;
|
|
18
|
+
kPostOffice = 2;
|
|
19
|
+
kPolice = 3;
|
|
20
|
+
kFireStation = 4;
|
|
21
|
+
kCarWash = 5;
|
|
22
|
+
kRestaurant = 6;
|
|
23
|
+
kFastFood = 7;
|
|
24
|
+
kCafe = 8;
|
|
25
|
+
kBank = 9;
|
|
26
|
+
kPharmacy = 10;
|
|
27
|
+
kKindergarten = 11;
|
|
28
|
+
kBar = 12;
|
|
29
|
+
kHospital = 13;
|
|
30
|
+
kPub = 14;
|
|
31
|
+
kClinic = 15;
|
|
32
|
+
kTheatre = 16;
|
|
33
|
+
kCinema = 17;
|
|
34
|
+
kCasino = 18;
|
|
35
|
+
}
|
|
36
|
+
string name = 1;
|
|
37
|
+
Type type = 2;
|
|
38
|
+
LatLng lat_lng = 3;
|
|
39
|
+
double distance = 4; // landmark's distance along the trip edge. in maneuvers it's landmark's distance to the maneuver
|
|
40
|
+
bool right = 5; // landmark is to the right of the route that comes before the maneuver
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
message BoundingBox {
|
|
44
|
+
LatLng min_ll = 1;
|
|
45
|
+
LatLng max_ll = 2;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message SearchFilter {
|
|
49
|
+
// frc
|
|
50
|
+
oneof has_min_road_class {
|
|
51
|
+
RoadClass min_road_class = 1; // lowest road class to allow in loki results [default = kServiceOther]
|
|
52
|
+
}
|
|
53
|
+
oneof has_max_road_class {
|
|
54
|
+
RoadClass max_road_class = 2; // highest road class to allow in loki results [default = kMotorway]
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// form of way
|
|
58
|
+
bool exclude_tunnel = 3; // whether to exclude tunnels from loki results [default = false]
|
|
59
|
+
bool exclude_bridge = 4; // whether to exclude bridges from loki results [default = false]
|
|
60
|
+
bool exclude_ramp = 5; // whether to exclude roads with ramp use from loki results [default = false]
|
|
61
|
+
oneof has_exclude_closures {
|
|
62
|
+
bool exclude_closures = 6;// whether to exclude roads marked as closed due to traffic [default = true]
|
|
63
|
+
}
|
|
64
|
+
bool exclude_toll = 7; // whether to exclude toll routes from loki results [default = false]
|
|
65
|
+
bool exclude_ferry = 8; // whether to exclude ferry routes from loki results [default = false]
|
|
66
|
+
|
|
67
|
+
oneof has_level {
|
|
68
|
+
float level = 9; // level to filter edges by
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
message PathEdge {
|
|
73
|
+
uint64 graph_id = 1;
|
|
74
|
+
double percent_along = 2;
|
|
75
|
+
LatLng ll = 3;
|
|
76
|
+
Location.SideOfStreet side_of_street = 4;
|
|
77
|
+
double distance = 5;
|
|
78
|
+
bool begin_node = 7;
|
|
79
|
+
bool end_node = 8;
|
|
80
|
+
repeated string names = 10;
|
|
81
|
+
int32 outbound_reach = 11;
|
|
82
|
+
int32 inbound_reach = 12;
|
|
83
|
+
float heading = 13;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Output information about how the location object below is correlated to the graph or to the route etc
|
|
87
|
+
message Correlation {
|
|
88
|
+
repeated PathEdge edges = 1;
|
|
89
|
+
repeated PathEdge filtered_edges = 2;
|
|
90
|
+
uint32 original_index = 3;
|
|
91
|
+
LatLng projected_ll = 4;
|
|
92
|
+
uint32 leg_shape_index = 5;
|
|
93
|
+
double distance_from_leg_origin = 6;
|
|
94
|
+
uint32 route_index = 7; // primarily for matchings index in osrm map matching
|
|
95
|
+
uint32 waypoint_index = 8; // primarily for matched point index in osrm map matching
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
message Location {
|
|
99
|
+
enum Type {
|
|
100
|
+
kBreak = 0;
|
|
101
|
+
kThrough = 1;
|
|
102
|
+
kVia = 2;
|
|
103
|
+
kBreakThrough = 3;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
enum PreferredSide {
|
|
107
|
+
either = 0;
|
|
108
|
+
same = 1;
|
|
109
|
+
opposite = 2;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
enum SideOfStreet {
|
|
113
|
+
kNone = 0;
|
|
114
|
+
kLeft = 1;
|
|
115
|
+
kRight = 2;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
LatLng ll = 1;
|
|
119
|
+
Type type = 2; // [default = kBreak]
|
|
120
|
+
oneof has_heading {
|
|
121
|
+
uint32 heading = 3; // 0-359
|
|
122
|
+
}
|
|
123
|
+
string name = 4;
|
|
124
|
+
string street = 5;
|
|
125
|
+
string date_time = 12;
|
|
126
|
+
SideOfStreet side_of_street = 13;
|
|
127
|
+
oneof has_heading_tolerance {
|
|
128
|
+
uint32 heading_tolerance = 14;
|
|
129
|
+
}
|
|
130
|
+
oneof has_node_snap_tolerance {
|
|
131
|
+
uint32 node_snap_tolerance = 15;
|
|
132
|
+
}
|
|
133
|
+
oneof has_minimum_reachability {
|
|
134
|
+
uint32 minimum_reachability = 17;
|
|
135
|
+
}
|
|
136
|
+
oneof has_radius {
|
|
137
|
+
uint32 radius = 18;
|
|
138
|
+
}
|
|
139
|
+
oneof has_accuracy {
|
|
140
|
+
uint32 accuracy = 19;
|
|
141
|
+
}
|
|
142
|
+
oneof has_time {
|
|
143
|
+
double time = 20;
|
|
144
|
+
}
|
|
145
|
+
bool skip_ranking_candidates = 21;
|
|
146
|
+
PreferredSide preferred_side = 22;
|
|
147
|
+
LatLng display_ll = 23;
|
|
148
|
+
oneof has_search_cutoff {
|
|
149
|
+
uint32 search_cutoff = 24;
|
|
150
|
+
}
|
|
151
|
+
oneof has_street_side_tolerance {
|
|
152
|
+
uint32 street_side_tolerance = 25;
|
|
153
|
+
}
|
|
154
|
+
SearchFilter search_filter = 26;
|
|
155
|
+
oneof has_street_side_max_distance {
|
|
156
|
+
uint32 street_side_max_distance = 27;
|
|
157
|
+
}
|
|
158
|
+
oneof has_preferred_layer {
|
|
159
|
+
int32 preferred_layer = 28;
|
|
160
|
+
}
|
|
161
|
+
float waiting_secs = 29; // waiting period before a new leg starts, e.g. for servicing/loading goods
|
|
162
|
+
oneof has_street_side_cutoff {
|
|
163
|
+
RoadClass street_side_cutoff = 30;
|
|
164
|
+
}
|
|
165
|
+
oneof has_minimum_inbound_reachability {
|
|
166
|
+
uint32 minimum_inbound_reachability = 31;
|
|
167
|
+
}
|
|
168
|
+
oneof has_minimum_outbound_reachability {
|
|
169
|
+
uint32 minimum_outbound_reachability = 32;
|
|
170
|
+
}
|
|
171
|
+
// This information will be ignored if provided in the request. Instead it will be filled in as the request is handled
|
|
172
|
+
Correlation correlation = 90;
|
|
173
|
+
string time_zone_offset = 91;
|
|
174
|
+
string time_zone_name = 92;
|
|
175
|
+
bool transit_available = 93;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
message TransitEgressInfo {
|
|
179
|
+
string onestop_id = 1; // Unique ID
|
|
180
|
+
string name = 2; // The name of the egress
|
|
181
|
+
LatLng ll = 3; // Latitude, longitude of the egress
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
message TransitStationInfo {
|
|
185
|
+
string onestop_id = 1; // Unique ID
|
|
186
|
+
string name = 2; // The name of the station
|
|
187
|
+
LatLng ll = 3; // Latitude, longitude of the station
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
message BikeShareStationInfo {
|
|
191
|
+
string name = 1;
|
|
192
|
+
string ref = 2;
|
|
193
|
+
uint32 capacity = 3;
|
|
194
|
+
string network = 4;
|
|
195
|
+
string operator = 5;
|
|
196
|
+
float rent_cost = 6;
|
|
197
|
+
float return_cost = 7;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
message TransitPlatformInfo {
|
|
201
|
+
enum Type {
|
|
202
|
+
kStop = 0;
|
|
203
|
+
kStation = 1;
|
|
204
|
+
}
|
|
205
|
+
Type type = 1; // The type of stop (station or simple stop)
|
|
206
|
+
string onestop_id = 2; // Unique ID
|
|
207
|
+
string name = 3; // The name of the platform
|
|
208
|
+
string arrival_date_time = 4; // ISO 8601 arrival date/time YYYY-MM-DDThh:mm
|
|
209
|
+
string departure_date_time = 5; // ISO 8601 departure date/time YYYY-MM-DDThh:mm
|
|
210
|
+
bool assumed_schedule = 6; // true if the times are based on an assumed schedule
|
|
211
|
+
LatLng ll = 7; // Latitude, longitude of the transit stop
|
|
212
|
+
string station_onestop_id = 8; // Unique station ID
|
|
213
|
+
string station_name = 9; // The station name of the platform
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
message TransitRouteInfo {
|
|
217
|
+
string onestop_id = 1;
|
|
218
|
+
uint32 block_id = 2;
|
|
219
|
+
uint32 trip_id = 3;
|
|
220
|
+
string short_name = 4;
|
|
221
|
+
string long_name = 5;
|
|
222
|
+
string headsign = 6;
|
|
223
|
+
uint32 color = 7;
|
|
224
|
+
uint32 text_color = 8;
|
|
225
|
+
string description = 9;
|
|
226
|
+
string operator_onestop_id = 10;
|
|
227
|
+
string operator_name = 11;
|
|
228
|
+
string operator_url = 12;
|
|
229
|
+
repeated TransitPlatformInfo transit_stops = 13;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
message Pronunciation {
|
|
233
|
+
enum Alphabet {
|
|
234
|
+
kNone = 0;
|
|
235
|
+
kIpa = 1;
|
|
236
|
+
kKatakana = 2;
|
|
237
|
+
kJeita = 3;
|
|
238
|
+
kNtSampa = 4;
|
|
239
|
+
}
|
|
240
|
+
Alphabet alphabet = 1;
|
|
241
|
+
string value = 2;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
enum LanguageTag {
|
|
245
|
+
kUnspecified = 0;
|
|
246
|
+
kAb = 1;
|
|
247
|
+
kAm = 2;
|
|
248
|
+
kAr = 3;
|
|
249
|
+
kAz = 4;
|
|
250
|
+
kBe = 5;
|
|
251
|
+
kBg = 6;
|
|
252
|
+
kBn = 7;
|
|
253
|
+
kBs = 8;
|
|
254
|
+
kCa = 9;
|
|
255
|
+
kCkb = 10;
|
|
256
|
+
kCs = 11;
|
|
257
|
+
kDa = 12;
|
|
258
|
+
kDe = 13;
|
|
259
|
+
kDv = 14;
|
|
260
|
+
kDz = 15;
|
|
261
|
+
kEl = 16;
|
|
262
|
+
kEn = 17;
|
|
263
|
+
kEs = 18;
|
|
264
|
+
kEt = 19;
|
|
265
|
+
kFa = 20;
|
|
266
|
+
kFi = 21;
|
|
267
|
+
kFr = 22;
|
|
268
|
+
kFy = 23;
|
|
269
|
+
kGl = 24;
|
|
270
|
+
kHe = 25;
|
|
271
|
+
kHr = 26;
|
|
272
|
+
kHu = 27;
|
|
273
|
+
kHy = 28;
|
|
274
|
+
kId = 29;
|
|
275
|
+
kIs = 30;
|
|
276
|
+
kIt = 31;
|
|
277
|
+
kJa = 32;
|
|
278
|
+
kKa = 33;
|
|
279
|
+
kKl = 34;
|
|
280
|
+
kKm = 35;
|
|
281
|
+
kKo = 36;
|
|
282
|
+
kLo = 37;
|
|
283
|
+
kLt = 38;
|
|
284
|
+
kLv = 39;
|
|
285
|
+
kMg = 40;
|
|
286
|
+
kMk = 41;
|
|
287
|
+
kMn = 42;
|
|
288
|
+
kMo = 43;
|
|
289
|
+
kMt = 44;
|
|
290
|
+
kMy = 45;
|
|
291
|
+
kNe = 46;
|
|
292
|
+
kNl = 47;
|
|
293
|
+
kNo = 48;
|
|
294
|
+
kOc = 49;
|
|
295
|
+
kPap = 50;
|
|
296
|
+
kPl = 51;
|
|
297
|
+
kPs = 52;
|
|
298
|
+
kPt = 53;
|
|
299
|
+
kRm = 54;
|
|
300
|
+
kRo = 55;
|
|
301
|
+
kRu = 56;
|
|
302
|
+
kSk = 57;
|
|
303
|
+
kSl = 58;
|
|
304
|
+
kSq = 59;
|
|
305
|
+
kSr = 60;
|
|
306
|
+
kSrLatn = 61;
|
|
307
|
+
kSv = 62;
|
|
308
|
+
kTg = 63;
|
|
309
|
+
kTh = 64;
|
|
310
|
+
kTk = 65;
|
|
311
|
+
kTr = 66;
|
|
312
|
+
kUk = 67;
|
|
313
|
+
kUr = 68;
|
|
314
|
+
kUz = 69;
|
|
315
|
+
kVi = 70;
|
|
316
|
+
kZh = 71;
|
|
317
|
+
kCy = 72;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
message StreetName {
|
|
321
|
+
string value = 1; // The actual street name value, examples: I 95 North or Derry Street
|
|
322
|
+
bool is_route_number = 2; // true if the street name is a reference route number such as: I 81 South or US 322 West
|
|
323
|
+
Pronunciation pronunciation = 3; // The pronunciation associated with this street name
|
|
324
|
+
LanguageTag language_tag = 4;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
message TurnLane {
|
|
328
|
+
enum State {
|
|
329
|
+
kInvalid = 0;
|
|
330
|
+
kValid = 1;
|
|
331
|
+
kActive = 2;
|
|
332
|
+
}
|
|
333
|
+
uint32 directions_mask = 1;
|
|
334
|
+
State state = 2;
|
|
335
|
+
uint32 active_direction = 3;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
enum RoadClass {
|
|
339
|
+
kMotorway = 0;
|
|
340
|
+
kTrunk = 1;
|
|
341
|
+
kPrimary = 2;
|
|
342
|
+
kSecondary = 3;
|
|
343
|
+
kTertiary = 4;
|
|
344
|
+
kUnclassified = 5;
|
|
345
|
+
kResidential = 6;
|
|
346
|
+
kServiceOther = 7;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
message TaggedValue {
|
|
350
|
+
// dont renumber these they match the c++ definitions
|
|
351
|
+
enum Type {
|
|
352
|
+
kNone = 0;
|
|
353
|
+
kLayer = 1;
|
|
354
|
+
kPronunciation = 2;
|
|
355
|
+
kBssInfo = 3;
|
|
356
|
+
kLevel = 4;
|
|
357
|
+
kLevelRef = 5;
|
|
358
|
+
kLandmark = 6;
|
|
359
|
+
kConditionalSpeedLimits = 7;
|
|
360
|
+
kLevels = 8;
|
|
361
|
+
kTunnel = 49;
|
|
362
|
+
kBridge = 50;
|
|
363
|
+
}
|
|
364
|
+
bytes value = 1; // The actual tagged name value, examples: Ted Williams Tunnel
|
|
365
|
+
Type type = 2; // The type of tagged name (tunnel or bridge)
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
enum TravelMode {
|
|
369
|
+
kDrive = 0;
|
|
370
|
+
kPedestrian = 1;
|
|
371
|
+
kBicycle = 2;
|
|
372
|
+
kTransit = 3;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
// TODO: review and update as needed
|
|
376
|
+
enum VehicleType {
|
|
377
|
+
kCar = 0;
|
|
378
|
+
kMotorcycle = 1;
|
|
379
|
+
kAutoBus = 2;
|
|
380
|
+
kTruck = 3;
|
|
381
|
+
kMotorScooter = 4;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// TODO: review and update as needed
|
|
385
|
+
enum PedestrianType {
|
|
386
|
+
kFoot = 0;
|
|
387
|
+
kWheelchair = 1;
|
|
388
|
+
kBlind = 2;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
enum BicycleType {
|
|
392
|
+
kRoad = 0;
|
|
393
|
+
kCross = 1;
|
|
394
|
+
kHybrid = 2;
|
|
395
|
+
kMountain = 3;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
enum TransitType {
|
|
399
|
+
kTram = 0;
|
|
400
|
+
kMetro = 1;
|
|
401
|
+
kRail = 2;
|
|
402
|
+
kBus = 3;
|
|
403
|
+
kFerry = 4;
|
|
404
|
+
kCableCar = 5;
|
|
405
|
+
kGondola = 6;
|
|
406
|
+
kFunicular = 7;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
message Summary {
|
|
410
|
+
float length = 1; // kilometers or miles based on units
|
|
411
|
+
double time = 2; // seconds
|
|
412
|
+
BoundingBox bbox = 3; // Bounding box of the shape
|
|
413
|
+
bool has_time_restrictions = 4; // Does the route contain any time restrictions?
|
|
414
|
+
bool has_toll = 5;
|
|
415
|
+
bool has_ferry = 6;
|
|
416
|
+
bool has_highway = 7;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
message LevelChange {
|
|
420
|
+
uint32 shape_index = 1;
|
|
421
|
+
float level = 2;
|
|
422
|
+
uint32 precision = 3;
|
|
423
|
+
}
|
|
424
|
+
|