Compare commits

...

13 Commits

Author SHA1 Message Date
Daniel Patterson eeff4be544 Enable builds on 5.10 release branch. 2017-08-03 13:05:54 -07:00
Daniel Patterson 7fdc544229 Set version to 5.10 2017-08-03 12:57:09 -07:00
Moritz Kobitzsch 52691af7ba Add regression test for interaction between via-way and via-node 2017-08-03 12:52:04 -07:00
Moritz Kobitzsch 19c57771a1 move babel to dev dependencies, update releasing docs to reflect scripts in package.json 2017-08-03 12:52:00 -07:00
Daniel J. Hofmann 77141d1088 Updates our node osrm docs and re-runs docs generation, resolves #4043 2017-08-03 12:51:54 -07:00
Daniel J. Hofmann 57955cd0d6 Adds babel transformation needed for node osrm docs 2017-08-03 12:51:48 -07:00
Michael Krasnyk 2e91874104 Fix gcc5 internal compilation error 2017-08-03 12:51:40 -07:00
Moritz Kobitzsch 84ce97a31e Bump version to v5.10.0-rc.2 2017-08-01 12:30:31 +02:00
Moritz Kobitzsch 7e0c9f7340 remove accidental addition of debug code 2017-08-01 12:29:56 +02:00
Moritz Kobitzsch 917a36eaee fix pedantic warnings 2017-08-01 12:27:29 +02:00
Moritz Kobitzsch 7620d419c6 fix serialisation of conditional turn restrictions 2017-08-01 12:27:29 +02:00
Moritz Kobitzsch 50c90b29d2 parse conditional turn restriction with via way 2017-08-01 12:27:29 +02:00
Daniel Patterson 0e77cf53f6 Update CHANGELOG with bugfix notes. 2017-07-31 08:33:19 -07:00
14 changed files with 164 additions and 66 deletions
+1
View File
@@ -1,4 +1,5 @@
{ {
"plugins": ["transform-class-properties"],
"presets": [ "presets": [
"stage-0", "stage-0",
"es2015", "es2015",
+1
View File
@@ -17,6 +17,7 @@ notifications:
branches: branches:
only: only:
- master - master
- "5.10"
# enable building tags # enable building tags
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/ - /^v\d+\.\d+(\.\d+)?(-\S*)?$/
+1
View File
@@ -17,6 +17,7 @@
- Guidance: add support for throughabouts - Guidance: add support for throughabouts
- Bugfixes - Bugfixes
- Properly save/retrieve datasource annotations for road segments ([#4346](https://github.com/Project-OSRM/osrm-backend/issues/4346) - Properly save/retrieve datasource annotations for road segments ([#4346](https://github.com/Project-OSRM/osrm-backend/issues/4346)
- Fix conditional restriction grammer parsing so it works for single-day-of-week restrictions ([#4357](https://github.com/Project-OSRM/osrm-backend/pull/4357))
- Algorithm) - Algorithm)
- BREAKING: the file format requires re-processing due to the changes on via-ways - BREAKING: the file format requires re-processing due to the changes on via-ways
- Added support for via-way restrictions - Added support for via-way restrictions
+30 -29
View File
@@ -27,11 +27,11 @@ var osrm = new OSRM('network.osrm');
This requires you to run `osrm-datastore` prior to creating an `OSRM` object. This requires you to run `osrm-datastore` prior to creating an `OSRM` object.
- `options.path` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The path to the `.osrm` files. This is mutually exclusive with setting {options.shared_memory} to true. - `options.path` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** The path to the `.osrm` files. This is mutually exclusive with setting {options.shared_memory} to true.
- `options.max_locations_trip` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in trip query (default: unlimited). - `options.max_locations_trip` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in trip query (default: unlimited).
- `options.max_locations_viaroute` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in viaroute query 9default: unlimited). - `options.max_locations_viaroute` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in viaroute query (default: unlimited).
- `options.max_locations_distance_table` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in distance table query (default: unlimited). - `options.max_locations_distance_table` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in distance table query (default: unlimited).
- `options.max_locations_map_matching` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in map matching query (default: unlimited). - `options.max_locations_map_matching` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. locations supported in map-matching query (default: unlimited).
- `options.max_results_nearest` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. results supported in nearest query (default: unlimited). - `options.max_results_nearest` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. results supported in nearest query (default: unlimited).
- `options.max_alternatives` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max. number of alternative routes supported (default: 3). - `options.max_alternatives` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)?** Max.number of alternatives supported in alternative routes query (default: 3).
### route ### route
@@ -45,15 +45,16 @@ Returns the fastest route between two or more coordinates while visiting the way
Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`. Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`.
- `options.radiuses` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the coordinate snapping to streets in the given radius in meters. Can be `null` (unlimited, default) or `double >= 0`. - `options.radiuses` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the coordinate snapping to streets in the given radius in meters. Can be `null` (unlimited, default) or `double >= 0`.
- `options.hints` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings. - `options.hints` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings.
- `options.alternatives` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Search for alternative routes and return as well. - `options.alternatives` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Search for alternative routes. (optional, default `false`)
_Please note that even if an alternative route is requested, a result cannot be guaranteed._ (optional, default `false`) - `options.alternatives` **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** Search for up to this many alternative routes.
- `options.steps` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Returned route steps for each route leg. (optional, default `false`) _Please note that even if alternative routes are requested, a result cannot be guaranteed._ (optional, default `0`)
- `options.steps` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Return route steps for each route leg. (optional, default `false`)
- `options.annotations` **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** An array with strings of `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed` or boolean for enabling/disabling all. (optional, default `false`) - `options.annotations` **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** An array with strings of `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed` or boolean for enabling/disabling all. (optional, default `false`)
- `options.geometries` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route geometry format (influences overview and per step). Can also be `geojson`. (optional, default `polyline`) - `options.geometries` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route geometry format (influences overview and per step). Can also be `geojson`. (optional, default `polyline`)
- `options.overview` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). (optional, default `simplified`) - `options.overview` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). (optional, default `simplified`)
- `options.continue_straight` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Forces the route to keep going straight at waypoints and don't do a uturn even if it would be faster. Default value depends on the profile. - `options.continue_straight` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Forces the route to keep going straight at waypoints and don't do a uturn even if it would be faster. Default value depends on the profile.
`null`/`true`/`false`
- `options.approaches` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`. - `options.approaches` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`.
`null`/`true`/`false`
- `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** - `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**
**Examples** **Examples**
@@ -194,14 +195,14 @@ if they can not be matched successfully.
- `options.bearings` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the search to segments with given bearing in degrees towards true north in clockwise direction. - `options.bearings` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the search to segments with given bearing in degrees towards true north in clockwise direction.
Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`. Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`.
- `options.hints` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings. - `options.hints` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings.
- `options.steps` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Returned route steps for each route. (optional, default `false`) - `options.steps` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Return route steps for each route. (optional, default `false`)
- `options.annotations` **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** An array with strings of `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed` or boolean for enabling/disabling all. (optional, default `false`) - `options.annotations` **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** An array with strings of `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed` or boolean for enabling/disabling all. (optional, default `false`)
- `options.geometries` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route geometry format (influences overview and per step). Can also be `geojson`. (optional, default `polyline`) - `options.geometries` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route geometry format (influences overview and per step). Can also be `geojson`. (optional, default `polyline`)
- `options.overview` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). (optional, default `simplified`) - `options.overview` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). (optional, default `simplified`)
- `options.timestamps` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>?** Timestamp of the input location (integers, UNIX-like timestamp). - `options.timestamps` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>?** Timestamp of the input location (integers, UNIX-like timestamp).
- `options.radiuses` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Standard deviation of GPS precision used for map matching. If applicable use GPS accuracy. Can be `null` for default value `5` meters or `double >= 0`. - `options.radiuses` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Standard deviation of GPS precision used for map matching. If applicable use GPS accuracy. Can be `null` for default value `5` meters or `double >= 0`.
- `options.gaps` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Allows the input track splitting based on huge timestamp gaps between points. Either `split` or `ignore`. (optional, default `split`) - `options.gaps` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** Allows the input track splitting based on huge timestamp gaps between points. Either `split` or `ignore` (optional, default `split`).
- `options.tidy` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Allows the input track modification to obtain better matching quality for noisy tracks. (optional, default `false`) - `options.tidy` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Allows the input track modification to obtain better matching quality for noisy tracks (optional, default `false`).
- `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** - `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**
**Examples** **Examples**
@@ -235,25 +236,7 @@ The trip plugin solves the Traveling Salesman Problem using a greedy heuristic
waypoints. The returned path does not have to be the shortest path, _ as TSP is NP-hard it is waypoints. The returned path does not have to be the shortest path, _ as TSP is NP-hard it is
only an approximation. only an approximation.
**Parameters** Note that all input coordinates have to be connected for the trip service to work.
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object literal containing parameters for the trip query.
- `options.coordinates` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** The coordinates this request will use, coordinates as `[{lon},{lat}]` values, in decimal degrees.
- `options.bearings` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the search to segments with given bearing in degrees towards true north in clockwise direction.
Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`.
- `options.radiuses` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the coordinate snapping to streets in the given radius in meters. Can be `double >= 0` or `null` (unlimited, default).
- `options.hints` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings.
- `options.steps` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Returned route steps for each route. (optional, default `false`)
- `options.annotations` **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** An array with strings of `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed` or boolean for enabling/disabling all. (optional, default `false`)
- `options.geometries` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route geometry format (influences overview and per step). Can also be `geojson`. (optional, default `polyline`)
- `options.overview` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` (optional, default `simplified`)
- `options.roundtrip` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Returned route is a roundtrip (route returns to first location). (optional, default `true`)
- `options.source` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route starts at `any` or `first` coordinate. (optional, default `any`)
- `options.destination` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route ends at `any` or `last` coordinate. (optional, default `any`)
- `options.approaches` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`.
- `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**
A requirement for computing trips is that all input coordinates are connected.
Currently, not all combinations of `roundtrip`, `source` and `destination` are supported. Currently, not all combinations of `roundtrip`, `source` and `destination` are supported.
Right now, the following combinations are possible: Right now, the following combinations are possible:
@@ -268,6 +251,24 @@ Right now, the following combinations are possible:
| false | any | last | no | | false | any | last | no |
| false | any | any | no | | false | any | any | no |
**Parameters**
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object literal containing parameters for the trip query.
- `options.coordinates` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** The coordinates this request will use, coordinates as `[{lon},{lat}]` values, in decimal degrees.
- `options.bearings` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the search to segments with given bearing in degrees towards true north in clockwise direction.
Can be `null` or an array of `[{value},{range}]` with `integer 0 .. 360,integer 0 .. 180`.
- `options.radiuses` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Limits the coordinate snapping to streets in the given radius in meters. Can be `double >= 0` or `null` (unlimited, default).
- `options.hints` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Hints for the coordinate snapping. Array of base64 encoded strings.
- `options.steps` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Return route steps for each route. (optional, default `false`)
- `options.annotations` **([Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) \| [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** An array with strings of `duration`, `nodes`, `distance`, `weight`, `datasources`, `speed` or boolean for enabling/disabling all. (optional, default `false`)
- `options.geometries` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Returned route geometry format (influences overview and per step). Can also be `geojson`. (optional, default `polyline`)
- `options.overview` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Add overview geometry either `full`, `simplified` (optional, default `simplified`)
- `options.roundtrip` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Return route is a roundtrip. (optional, default `true`)
- `options.source` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Return route starts at `any` or `first` coordinate. (optional, default `any`)
- `options.destination` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Return route ends at `any` or `last` coordinate. (optional, default `any`)
- `options.approaches` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)?** Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`.
- `callback` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)**
**Examples** **Examples**
```javascript ```javascript
+1 -1
View File
@@ -47,7 +47,7 @@ We may introduce forward-compatible changes: query parameters and response prope
4. Make sure the `package.json` is up to date. 4. Make sure the `package.json` is up to date.
5. Make sure all tests are passing (e.g. Travis CI gives you a :thumbs_up:) 5. Make sure all tests are passing (e.g. Travis CI gives you a :thumbs_up:)
6. Use an annotated tag to mark the release: `git tag vx.y.z -a` Body of the tag description should be the changelog entries. 6. Use an annotated tag to mark the release: `git tag vx.y.z -a` Body of the tag description should be the changelog entries.
7. Use `npm run build-api-docs` to generate the API documentation. Copy `build/docs/*` to `https://github.com/Project-OSRM/project-osrm.github.com` in the `docs/vN.N.N/api` directory 7. Use `npm run docs` to generate the API documentation. Copy `build/docs/*` to `https://github.com/Project-OSRM/project-osrm.github.com` in the `docs/vN.N.N/api` directory
8. Push tags and commits: `git push; git push --tags` 8. Push tags and commits: `git push; git push --tags`
9. If not a release-candidate: Write a mailing-list post to osrm-talk@openstreetmap.org to announce the release 9. If not a release-candidate: Write a mailing-list post to osrm-talk@openstreetmap.org to announce the release
10. Wait until the travis build has been completed and check if the node binaries were published by doing: 10. Wait until the travis build has been completed and check if the node binaries were published by doing:
@@ -739,3 +739,45 @@ Feature: Car - Turn restrictions
| from | to | route | turns | | from | to | route | turns |
| a | c | albic,dobe,dobe,albic,albic | depart,turn left,continue uturn,turn left,arrive | | a | c | albic,dobe,dobe,albic,albic | depart,turn left,continue uturn,turn left,arrive |
| a | e | albic,dobe,dobe | depart,turn left,arrive | | a | e | albic,dobe,dobe | depart,turn left,arrive |
@no_turning @conditionals
Scenario: Car - Conditional restriction with multiple time windows
Given the extract extra arguments "--parse-conditional-restrictions"
# 5pm Wed 02 May, 2017 GMT
Given the contract extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
Given the customize extra arguments "--time-zone-file=test/data/tz/{timezone_names}/guinea.geojson --parse-conditionals-from-now=1493744400"
Given the node map
"""
a f
| |
b - e - h
| | |
c d - g
1
"""
And the ways
| nodes |
| ab |
| bc |
| de |
| ef |
| be |
| eh |
| gh |
| dg |
And the relations
| type | way:from | way:to | way:via | restriction:conditional |
| restriction | ab | be | ef | no_uturn @ (Mo-Fr 07:00-11:00,16:00-18:30) |
And the relations
| type | way:from | way:to | node:via | restriction:conditional |
| restriction | ed | dg | d | no_uturn @ (Mo-Fr 07:00-11:00,16:00-18:30) |
When I route I should get
| from | to | route | # |
| a | f | ab,be,ef,ef | currently we do not handle conditional via-ways, this test will have to change when we do |
| f | 1 | ef,eh,gh,dg,dg | |
+37
View File
@@ -991,3 +991,40 @@ Feature: Car - Turn restrictions
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | f | ab,be,ef,ef | | a | f | ab,be,ef,ef |
@restriction @overlap @geometry
Scenario: Duplicated restriction
Given the node map
"""
c
|
| f
| |
b-g-e
| |
| d
|
a
"""
And the ways
| nodes |
| ab |
| bc |
| bge |
| de |
| ef |
And the relations
| type | way:from | way:to | node:via | restriction |
| restriction | bge | ef | e | no_left_turn |
And the relations
| type | way:from | way:via | way:to | restriction |
| restriction | ab | bge | de | no_right_turn |
| restriction | bc | bge | ef | no_left_turn |
When I route I should get
| from | to | route |
| a | d | ab,bc,bc,bge,de,de |
+6 -2
View File
@@ -166,7 +166,9 @@ inline void write(storage::io::FileWriter &writer, const WayRestriction &restric
inline void read(storage::io::FileReader &reader, TurnRestriction &restriction) inline void read(storage::io::FileReader &reader, TurnRestriction &restriction)
{ {
reader.ReadInto(restriction.is_only); reader.ReadInto(restriction.is_only);
if (restriction.Type() == RestrictionType::WAY_RESTRICTION) std::uint32_t restriction_type;
reader.ReadInto(restriction_type);
if (restriction_type == RestrictionType::WAY_RESTRICTION)
{ {
WayRestriction way_restriction; WayRestriction way_restriction;
read(reader, way_restriction); read(reader, way_restriction);
@@ -174,7 +176,7 @@ inline void read(storage::io::FileReader &reader, TurnRestriction &restriction)
} }
else else
{ {
BOOST_ASSERT(restriction.Type() == RestrictionType::NODE_RESTRICTION); BOOST_ASSERT(restriction_type == RestrictionType::NODE_RESTRICTION);
NodeRestriction node_restriction; NodeRestriction node_restriction;
read(reader, node_restriction); read(reader, node_restriction);
restriction.node_or_way = std::move(node_restriction); restriction.node_or_way = std::move(node_restriction);
@@ -184,6 +186,8 @@ inline void read(storage::io::FileReader &reader, TurnRestriction &restriction)
inline void write(storage::io::FileWriter &writer, const TurnRestriction &restriction) inline void write(storage::io::FileWriter &writer, const TurnRestriction &restriction)
{ {
writer.WriteOne(restriction.is_only); writer.WriteOne(restriction.is_only);
const std::uint32_t restriction_type = restriction.Type();
writer.WriteOne(restriction_type);
if (restriction.Type() == RestrictionType::WAY_RESTRICTION) if (restriction.Type() == RestrictionType::WAY_RESTRICTION)
{ {
write(writer, mapbox::util::get<WayRestriction>(restriction.node_or_way)); write(writer, mapbox::util::get<WayRestriction>(restriction.node_or_way));
+2 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "osrm", "name": "osrm",
"version": "5.10.0-rc.1", "version": "5.10.0",
"private": false, "private": false,
"description": "The Open Source Routing Machine is a high performance routing engine written in C++14 designed to run on OpenStreetMap data.", "description": "The Open Source Routing Machine is a high performance routing engine written in C++14 designed to run on OpenStreetMap data.",
"dependencies": { "dependencies": {
@@ -37,6 +37,7 @@
}, },
"devDependencies": { "devDependencies": {
"aws-sdk": "~2.0.31", "aws-sdk": "~2.0.31",
"babel-plugin-transform-class-properties": "^6.24.1",
"chalk": "^1.1.3", "chalk": "^1.1.3",
"cucumber": "^1.2.1", "cucumber": "^1.2.1",
"d3-queue": "^2.0.3", "d3-queue": "^2.0.3",
+25 -29
View File
@@ -749,40 +749,36 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
// next to the normal restrictions tracked in `entry_allowed`, via // next to the normal restrictions tracked in `entry_allowed`, via
// ways might introduce additional restrictions. These are handled // ways might introduce additional restrictions. These are handled
// here when turning off a via-way // here when turning off a via-way
const auto add_unrestricted_turns = for (auto duplicated_node_id : duplicated_nodes)
[&](const auto duplicated_node_id) { {
const auto from_id = const auto from_id =
m_number_of_edge_based_nodes - m_number_of_edge_based_nodes -
way_restriction_map.NumberOfDuplicatedNodes() + way_restriction_map.NumberOfDuplicatedNodes() +
duplicated_node_id; duplicated_node_id;
auto const node_at_end_of_turn = auto const node_at_end_of_turn =
m_node_based_graph->GetTarget(turn.eid); m_node_based_graph->GetTarget(turn.eid);
const auto is_restricted = way_restriction_map.IsRestricted( const auto is_restricted = way_restriction_map.IsRestricted(
duplicated_node_id, node_at_end_of_turn); duplicated_node_id, node_at_end_of_turn);
if (is_restricted) if (is_restricted)
return; continue;
// add into delayed data // add into delayed data
auto edge_with_data = generate_edge( auto edge_with_data = generate_edge(
NodeID(from_id), NodeID(from_id),
m_node_based_graph->GetEdgeData(turn.eid).edge_id, m_node_based_graph->GetEdgeData(turn.eid).edge_id,
node_along_road_entering, node_along_road_entering,
incoming_edge, incoming_edge,
node_at_center_of_intersection, node_at_center_of_intersection,
turn.eid, turn.eid,
intersection, intersection,
turn, turn,
entry_class_id); entry_class_id);
buffer->delayed_data.push_back(std::move(edge_with_data)); buffer->delayed_data.push_back(std::move(edge_with_data));
}; }
std::for_each(duplicated_nodes.begin(),
duplicated_nodes.end(),
add_unrestricted_turns);
} }
} }
} }
+3 -3
View File
@@ -765,7 +765,7 @@ void ExtractionContainers::PrepareRestrictions()
// translate the turn from one segment onto another into a node restriction (the ways can only // translate the turn from one segment onto another into a node restriction (the ways can only
// be connected at a single location) // be connected at a single location)
auto const get_node_restriction_from_OSM_ids = [&]( auto const get_node_restriction_from_OSM_ids = [&](
auto const from_id, auto const to_id, const OSMNodeID via_node = MAX_OSM_NODEID) { auto const from_id, auto const to_id, const OSMNodeID via_node) {
auto const from_segment_itr = referenced_ways.find(from_id); auto const from_segment_itr = referenced_ways.find(from_id);
if (from_segment_itr->second.way_id != from_id) if (from_segment_itr->second.way_id != from_id)
{ {
@@ -792,9 +792,9 @@ void ExtractionContainers::PrepareRestrictions()
auto const &external = external_type.AsWayRestriction(); auto const &external = external_type.AsWayRestriction();
// check if we were able to resolve all the involved ways // check if we were able to resolve all the involved ways
auto const from_restriction = auto const from_restriction =
get_node_restriction_from_OSM_ids(external.from, external.via); get_node_restriction_from_OSM_ids(external.from, external.via, MAX_OSM_NODEID);
auto const to_restriction = auto const to_restriction =
get_node_restriction_from_OSM_ids(external.via, external.to); get_node_restriction_from_OSM_ids(external.via, external.to, MAX_OSM_NODEID);
// failed to translate either of the involved nodes? // failed to translate either of the involved nodes?
if (!from_restriction.Valid() || !to_restriction.Valid()) if (!from_restriction.Valid() || !to_restriction.Valid())
+1 -1
View File
@@ -128,7 +128,7 @@ RestrictionParser::TryParse(const osmium::Relation &relation) const
restriction_container.is_only = is_only_restriction; restriction_container.is_only = is_only_restriction;
boost::optional<std::uint64_t> from = boost::none, via = boost::none, to = boost::none; boost::optional<std::uint64_t> from = boost::none, via = boost::none, to = boost::none;
bool is_node_restriction; bool is_node_restriction = true;
for (const auto &member : relation.members()) for (const auto &member : relation.members())
{ {
+13
View File
@@ -72,6 +72,12 @@ NAN_MODULE_INIT(Engine::Init)
* @param {Boolean} [options.shared_memory] Connects to the persistent shared memory datastore. * @param {Boolean} [options.shared_memory] Connects to the persistent shared memory datastore.
* This requires you to run `osrm-datastore` prior to creating an `OSRM` object. * This requires you to run `osrm-datastore` prior to creating an `OSRM` object.
* @param {String} [options.path] The path to the `.osrm` files. This is mutually exclusive with setting {options.shared_memory} to true. * @param {String} [options.path] The path to the `.osrm` files. This is mutually exclusive with setting {options.shared_memory} to true.
* @param {Number} [options.max_locations_trip] Max. locations supported in trip query (default: unlimited).
* @param {Number} [options.max_locations_viaroute] Max. locations supported in viaroute query (default: unlimited).
* @param {Number} [options.max_locations_distance_table] Max. locations supported in distance table query (default: unlimited).
* @param {Number} [options.max_locations_map_matching] Max. locations supported in map-matching query (default: unlimited).
* @param {Number} [options.max_results_nearest] Max. results supported in nearest query (default: unlimited).
* @param {Number} [options.max_alternatives] Max.number of alternatives supported in alternative routes query (default: 3).
* *
* @class OSRM * @class OSRM
* *
@@ -193,6 +199,7 @@ inline void async(const Nan::FunctionCallbackInfo<v8::Value> &info,
* @param {String} [options.geometries=polyline] Returned route geometry format (influences overview and per step). Can also be `geojson`. * @param {String} [options.geometries=polyline] Returned route geometry format (influences overview and per step). Can also be `geojson`.
* @param {String} [options.overview=simplified] Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). * @param {String} [options.overview=simplified] Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`).
* @param {Boolean} [options.continue_straight] Forces the route to keep going straight at waypoints and don't do a uturn even if it would be faster. Default value depends on the profile. * @param {Boolean} [options.continue_straight] Forces the route to keep going straight at waypoints and don't do a uturn even if it would be faster. Default value depends on the profile.
* @param {Array} [options.approaches] Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`.
* `null`/`true`/`false` * `null`/`true`/`false`
* @param {Function} callback * @param {Function} callback
* *
@@ -228,6 +235,7 @@ NAN_METHOD(Engine::route) //
* @param {Array} [options.hints] Hints for the coordinate snapping. Array of base64 encoded strings. * @param {Array} [options.hints] Hints for the coordinate snapping. Array of base64 encoded strings.
* @param {Number} [options.number=1] Number of nearest segments that should be returned. * @param {Number} [options.number=1] Number of nearest segments that should be returned.
* Must be an integer greater than or equal to `1`. * Must be an integer greater than or equal to `1`.
* @param {Array} [options.approaches] Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`.
* @param {Function} callback * @param {Function} callback
* *
* @returns {Object} containing `waypoints`. * @returns {Object} containing `waypoints`.
@@ -269,6 +277,7 @@ NAN_METHOD(Engine::nearest) //
* location with given index as source. Default is to use all. * location with given index as source. Default is to use all.
* @param {Array} [options.destinations] An array of `index` elements (`0 <= integer < * @param {Array} [options.destinations] An array of `index` elements (`0 <= integer <
* #coordinates`) to use location with given index as destination. Default is to use all. * #coordinates`) to use location with given index as destination. Default is to use all.
* @param {Array} [options.approaches] Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`.
* @param {Function} callback * @param {Function} callback
* *
* @returns {Object} containing `durations`, `sources`, and `destinations`. * @returns {Object} containing `durations`, `sources`, and `destinations`.
@@ -350,6 +359,9 @@ NAN_METHOD(Engine::tile)
* @param {String} [options.overview=simplified] Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`). * @param {String} [options.overview=simplified] Add overview geometry either `full`, `simplified` according to highest zoom level it could be display on, or not at all (`false`).
* @param {Array<Number>} [options.timestamps] Timestamp of the input location (integers, UNIX-like timestamp). * @param {Array<Number>} [options.timestamps] Timestamp of the input location (integers, UNIX-like timestamp).
* @param {Array} [options.radiuses] Standard deviation of GPS precision used for map matching. If applicable use GPS accuracy. Can be `null` for default value `5` meters or `double >= 0`. * @param {Array} [options.radiuses] Standard deviation of GPS precision used for map matching. If applicable use GPS accuracy. Can be `null` for default value `5` meters or `double >= 0`.
* @param {String} [options.gaps] Allows the input track splitting based on huge timestamp gaps between points. Either `split` or `ignore` (optional, default `split`).
* @param {Boolean} [options.tidy] Allows the input track modification to obtain better matching quality for noisy tracks (optional, default `false`).
*
* @param {Function} callback * @param {Function} callback
* *
* @returns {Object} containing `tracepoints` and `matchings`. * @returns {Object} containing `tracepoints` and `matchings`.
@@ -418,6 +430,7 @@ NAN_METHOD(Engine::match) //
* @param {Boolean} [options.roundtrip=true] Return route is a roundtrip. * @param {Boolean} [options.roundtrip=true] Return route is a roundtrip.
* @param {String} [options.source=any] Return route starts at `any` or `first` coordinate. * @param {String} [options.source=any] Return route starts at `any` or `first` coordinate.
* @param {String} [options.destination=any] Return route ends at `any` or `last` coordinate. * @param {String} [options.destination=any] Return route ends at `any` or `last` coordinate.
* @param {Array} [options.approaches] Keep waypoints on curb side. Can be `null` (unrestricted, default) or `curb`.
* *
* @returns {Object} containing `waypoints` and `trips`. * @returns {Object} containing `waypoints` and `trips`.
* **`waypoints`**: an array of [`Waypoint`](#waypoint) objects representing all waypoints in input order. * **`waypoints`**: an array of [`Waypoint`](#waypoint) objects representing all waypoints in input order.
+1
View File
@@ -343,6 +343,7 @@ int RestrictionsCheckCommand(const char *executable, const std::vector<std::stri
// For each conditional restriction if condition is active than print a line // For each conditional restriction if condition is active than print a line
for (auto &value : conditional_restrictions) for (auto &value : conditional_restrictions)
{ {
const auto &location = value.location; const auto &location = value.location;
const auto &restriction = value.restriction; const auto &restriction = value.restriction;