Skip to content

Commit cf53eee

Browse files
Merge pull request #4979 from ibi-group/car-hailing-uber
Uber ride hailing
2 parents c069622 + b534346 commit cf53eee

File tree

97 files changed

+1951
-123
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1951
-123
lines changed

doc-templates/RideHailing.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Ride hailing services
2+
3+
This sandbox feature allows you to use ride hailing services like Uber.
4+
5+
## Contact Info
6+
7+
- Leonard Ehrenfried, [[email protected]](mailto:[email protected])
8+
9+
## Configuration
10+
11+
In order enable this feature, add a new section `rideHailingServices` in `router-config.json`.
12+
13+
The supported ride-hailing providers are listed below.
14+
15+
### Uber
16+
17+
<!-- INSERT: uber-car-hailing -->

docs/RouteRequest.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ The unit is cost unit per second of time difference.
587587

588588
**Since version:** `2.1`**Type:** `enum map of duration`**Cardinality:** `Optional`
589589
**Path:** /routingDefaults
590-
**Enum keys:** `not-set` | `walk` | `bike` | `bike-to-park` | `bike-rental` | `scooter-rental` | `car` | `car-to-park` | `car-pickup` | `car-rental` | `flexible`
590+
**Enum keys:** `not-set` | `walk` | `bike` | `bike-to-park` | `bike-rental` | `scooter-rental` | `car` | `car-to-park` | `car-pickup` | `car-rental` | `car-hailing` | `flexible`
591591

592592
Limit access/egress per street mode.
593593

@@ -599,7 +599,7 @@ done because some street modes searches are much more resource intensive than ot
599599

600600
**Since version:** `2.2`**Type:** `enum map of duration`**Cardinality:** `Optional`
601601
**Path:** /routingDefaults
602-
**Enum keys:** `not-set` | `walk` | `bike` | `bike-to-park` | `bike-rental` | `scooter-rental` | `car` | `car-to-park` | `car-pickup` | `car-rental` | `flexible`
602+
**Enum keys:** `not-set` | `walk` | `bike` | `bike-to-park` | `bike-rental` | `scooter-rental` | `car` | `car-to-park` | `car-pickup` | `car-rental` | `car-hailing` | `flexible`
603603

604604
Limit direct route duration per street mode.
605605

docs/RouterConfiguration.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ A full list of them can be found in the [RouteRequest](RouteRequest.md).
3535
|-------------------------------------------------------------------------------------------|:---------------------:|---------------------------------------------------------------------------------------------------|:----------:|---------------|:-----:|
3636
| [configVersion](#configVersion) | `string` | Deployment version of the *router-config.json*. | *Optional* | | 2.1 |
3737
| [requestLogFile](#requestLogFile) | `string` | The path of the log file for the requests. | *Optional* | | 2.0 |
38-
| [streetRoutingTimeout](#streetRoutingTimeout) | `duration` | The maximum time a street routing request is allowed to take before returning a timeout. | *Optional* | `"PT5S"` | na |
38+
| [streetRoutingTimeout](#streetRoutingTimeout) | `duration` | The maximum time a street routing request is allowed to take before returning a timeout. | *Optional* | `"PT5S"` | 2.2 |
3939
| [flex](sandbox/Flex.md) | `object` | Configuration for flex routing. | *Optional* | | 2.1 |
40+
| [rideHailingServices](sandbox/RideHailing.md) | `object[]` | Configuration for interfaces to external ride hailing services like Uber. | *Optional* | | 2.3 |
4041
| [routingDefaults](RouteRequest.md) | `object` | The default parameters for the routing query. | *Optional* | | 2.0 |
4142
| timetableUpdates | `object` | Global configuration for timetable updaters. | *Optional* | | 2.2 |
4243
| [transit](#transit) | `object` | Configuration for transit searches with RAPTOR. | *Optional* | | na |
@@ -54,7 +55,7 @@ A full list of them can be found in the [RouteRequest](RouteRequest.md).
5455
|    [pagingSearchWindowAdjustments](#transit_pagingSearchWindowAdjustments) | `duration[]` | The provided array of durations is used to increase the search-window for the next/previous page. | *Optional* | | na |
5556
|    [stopTransferCost](#transit_stopTransferCost) | `enum map of integer` | Use this to set a stop transfer cost for the given transfer priority | *Optional* | | 2.0 |
5657
|    [transferCacheRequests](#transit_transferCacheRequests) | `object[]` | Routing requests to use for pre-filling the stop-to-stop transfer cache. | *Optional* | | 2.3 |
57-
| transmodelApi | `object` | Configuration for the Transmodel GraphQL API. | *Optional* | | na |
58+
| transmodelApi | `object` | Configuration for the Transmodel GraphQL API. | *Optional* | | 2.1 |
5859
|    [hideFeedId](#transmodelApi_hideFeedId) | `boolean` | Hide the FeedId in all API output, and add it to input. | *Optional* | `false` | na |
5960
|    [tracingHeaderTags](#transmodelApi_tracingHeaderTags) | `string[]` | Used to group requests when monitoring OTP. | *Optional* | | na |
6061
| [updaters](UpdaterConfig.md) | `object[]` | Configuration for the updaters that import various types of data into OTP. | *Optional* | | 1.5 |
@@ -127,7 +128,7 @@ number of transit vehicles used in that itinerary.
127128

128129
<h3 id="streetRoutingTimeout">streetRoutingTimeout</h3>
129130

130-
**Since version:** `na`**Type:** `duration`**Cardinality:** `Optional`**Default value:** `"PT5S"`
131+
**Since version:** `2.2`**Type:** `duration`**Cardinality:** `Optional`**Default value:** `"PT5S"`
131132
**Path:** /
132133

133134
The maximum time a street routing request is allowed to take before returning a timeout.
@@ -703,6 +704,14 @@ HTTP headers to add to the request. Any header key, value can be inserted.
703704
"timeout" : 300000
704705
}
705706
}
707+
],
708+
"rideHailingServices" : [
709+
{
710+
"type" : "uber-car-hailing",
711+
"clientId" : "secret-id",
712+
"clientSecret" : "very-secret",
713+
"wheelchairAccessibleRideType" : "car"
714+
}
706715
]
707716
}
708717
```

docs/SandboxExtension.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ nearby stops generated by routing via OSM data.
2929
- [Travel Time (Isochrone & Surface) API](sandbox/TravelTime.md) - Travel Time API
3030
- [IBI accessibility score](sandbox/IBIAccessibilityScore.md) - IBI accessibility score
3131
- [Fares](sandbox/Fares.md) - Fare calculation
32+
- [Ride hailing](sandbox/RideHailing.md) - Ride hailing services like Uber
3233

3334

3435
## Terminology
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"otpFeatures" : {
3+
"SandboxAPILegacyGraphQLApi": true,
4+
"VehicleToStopHeuristics": true
5+
}
6+
}

docs/examples/ibi/portland/router-config.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"geoidElevation": true
1313
},
1414
"transit": {
15-
"maxNumberOfTransfers" : 4
15+
"maxNumberOfTransfers": 4
1616
},
1717
"updaters": [
1818
{
@@ -56,5 +56,13 @@
5656
"sourceType": "gbfs",
5757
"url": "https://gbfs.spin.pm/api/gbfs/v2/portland"
5858
}
59+
],
60+
"rideHailingServices": [
61+
{
62+
"type": "uber-car-hailing",
63+
"clientId": "${UBER_CLIENT_ID}",
64+
"clientSecret": "${UBER_CLIENT_SECRET}",
65+
"wheelchairAccessibleRideType": "970ed376-bd33-4ad1-81c5-d2928a347a06"
66+
}
5967
]
6068
}

docs/sandbox/RideHailing.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Ride hailing services
2+
3+
This sandbox feature allows you to use ride hailing services like Uber.
4+
5+
## Contact Info
6+
7+
- Leonard Ehrenfried, [[email protected]](mailto:[email protected])
8+
9+
## Configuration
10+
11+
In order enable this feature, add a new section `rideHailingServices` in `router-config.json`.
12+
13+
The supported ride-hailing providers are listed below.
14+
15+
### Uber
16+
17+
<!-- uber-car-hailing BEGIN -->
18+
<!-- NOTE! This section is auto-generated. Do not change, change doc in code instead. -->
19+
20+
| Config Parameter | Type | Summary | Req./Opt. | Default Value | Since |
21+
|------------------------------|:--------:|----------------------------------------------------------|:----------:|---------------|:-----:|
22+
| type = "uber-car-hailing" | `enum` | The type of the service. | *Required* | | 2.3 |
23+
| clientId | `string` | OAuth client id to access the API. | *Required* | | 2.3 |
24+
| clientSecret | `string` | OAuth client secret to access the API. | *Required* | | 2.3 |
25+
| wheelchairAccessibleRideType | `string` | The id of the requested wheelchair accessible ride type. | *Required* | | 2.3 |
26+
27+
28+
##### Example configuration
29+
30+
```JSON
31+
// router-config.json
32+
{
33+
"rideHailingServices" : [
34+
{
35+
"type" : "uber-car-hailing",
36+
"clientId" : "secret-id",
37+
"clientSecret" : "very-secret",
38+
"wheelchairAccessibleRideType" : "car"
39+
}
40+
]
41+
}
42+
```
43+
44+
<!-- uber-car-hailing END -->

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,4 @@ nav:
105105
- Travel Time Isochrones: 'sandbox/TravelTime.md'
106106
- IBI Accessibility Score: 'sandbox/IBIAccessibilityScore.md'
107107
- Fares: 'sandbox/Fares.md'
108+
- Ride Hailing: 'sandbox/RideHailing.md'

pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@
311311
</argLine>
312312
<!-- Jenkins needs XML test reports to determine whether the build is stable. -->
313313
<disableXmlReport>true</disableXmlReport>
314-
<trimStackTrace>false</trimStackTrace>
315314
</configuration>
316315
</plugin>
317316
<!-- code coverage report -->

src/client/js/otp/config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,5 +350,6 @@ otp.config.modes = {
350350
"FLEX_ACCESS,FLEX_EGRESS,TRANSIT" : _tr('Transit with flex access and egress'),
351351
//TRANSLATORS: Travel by: mode of transport (Used in selection in Travel Options widgets)
352352
"FLEX_DIRECT" : _tr('Direct flex search'),
353-
"CARPOOL,WALK" : _tr("Carpool")
353+
"CARPOOL,WALK" : _tr("Carpool"),
354+
"CAR_HAIL,TRANSIT,WALK" : _tr("Car hailing and transit")
354355
};

0 commit comments

Comments
 (0)