From bc57b2d1e99ba68c8ade375f9d7ea617ac8a2be9 Mon Sep 17 00:00:00 2001 From: Chau Nguyen Date: Mon, 8 Jan 2018 18:39:44 +0100 Subject: [PATCH 1/4] update correct attributes available in --- docs/profiles.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/profiles.md b/docs/profiles.md index 0458bcb7491..2fb9ba924ad 100644 --- a/docs/profiles.md +++ b/docs/profiles.md @@ -210,14 +210,16 @@ The following attributes can be read and set on the result in `process_turn`: Attribute | Read/write? | Type | Notes -------------------|-------------|---------|------------------------------------------------------ -direction_modifier | Read | Enum | Geometry of turn. Defined in `include/extractor/guidance/turn_instruction.hpp` -turn_type | Read | Enum | Priority of turn. Defined in `include/extractor/guidance/turn_instruction.hpp` +angle | Read | Float | Angle of turn in degrees (`0-360`: `0`=u-turn, `180`=straight on) +number_of_roads | Read | Integer | Number of ways at the intersection of the turn +is_u_turn | Read | Boolean | Is the turn a u-turn? has_traffic_light | Read | Boolean | Is a traffic light present at this turn? source_restricted | Read | Boolean | Is it from a restricted access road? (See definition in `process_way`) target_restricted | Read | Boolean | Is it to a restricted access road? (See definition in `process_way`) -angle | Read | Float | Angle of turn in degrees (`0-360`: `0`=u-turn, `180`=straight on) -duration | Read/write | Float | Penalty to be applied for this turn (duration in deciseconds) weight | Read/write | Float | Penalty to be applied for this turn (routing weight) +duration | Read/write | Float | Penalty to be applied for this turn (duration in deciseconds) +source_mode | Read/write | Enum | Travel mode before the turn. Defined in `include/extractor/travel_mode.hpp` +target_mode | Read/write | Enum | Travel mode after the turn. Defined in `include/extractor/travel_mode.hpp` ## Guidance The guidance parameters in profiles are currently a work in progress. They can and will change. From 4b706a0338e71b03c21f37eb96f1e6b392b54d94 Mon Sep 17 00:00:00 2001 From: Chau Nguyen Date: Tue, 9 Jan 2018 13:08:45 +0100 Subject: [PATCH 2/4] make travel mode in process_turn const --- include/extractor/extraction_turn.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/extractor/extraction_turn.hpp b/include/extractor/extraction_turn.hpp index 35b0c074eaa..4f45a098750 100644 --- a/include/extractor/extraction_turn.hpp +++ b/include/extractor/extraction_turn.hpp @@ -39,8 +39,8 @@ struct ExtractionTurn const bool is_left_hand_driving; double weight; double duration; - TravelMode source_mode; - TravelMode target_mode; + const TravelMode source_mode; + const TravelMode target_mode; }; } } From 1d63c94d16ed4562fcb9f4a03d7cdd32bda9a4f0 Mon Sep 17 00:00:00 2001 From: Chau Nguyen Date: Tue, 9 Jan 2018 13:09:50 +0100 Subject: [PATCH 3/4] fix mismatch of and --- include/extractor/guidance/turn_discovery.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/extractor/guidance/turn_discovery.hpp b/include/extractor/guidance/turn_discovery.hpp index 92cfe20c8a7..cd0892871d6 100644 --- a/include/extractor/guidance/turn_discovery.hpp +++ b/include/extractor/guidance/turn_discovery.hpp @@ -12,7 +12,7 @@ namespace osrm { namespace util { -class Coordinate; +struct Coordinate; } namespace extractor From 7553da7c9754e6b3c44ee2cfeb9ba8a4088aa007 Mon Sep 17 00:00:00 2001 From: Chau Nguyen Date: Tue, 9 Jan 2018 13:31:00 +0100 Subject: [PATCH 4/4] add is_left_hand_driving --- docs/profiles.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/profiles.md b/docs/profiles.md index 2fb9ba924ad..dda62e921de 100644 --- a/docs/profiles.md +++ b/docs/profiles.md @@ -208,18 +208,19 @@ The `process_turn` function is called for every possible turn in the network. Ba The following attributes can be read and set on the result in `process_turn`: -Attribute | Read/write? | Type | Notes --------------------|-------------|---------|------------------------------------------------------ -angle | Read | Float | Angle of turn in degrees (`0-360`: `0`=u-turn, `180`=straight on) -number_of_roads | Read | Integer | Number of ways at the intersection of the turn -is_u_turn | Read | Boolean | Is the turn a u-turn? -has_traffic_light | Read | Boolean | Is a traffic light present at this turn? -source_restricted | Read | Boolean | Is it from a restricted access road? (See definition in `process_way`) -target_restricted | Read | Boolean | Is it to a restricted access road? (See definition in `process_way`) -weight | Read/write | Float | Penalty to be applied for this turn (routing weight) -duration | Read/write | Float | Penalty to be applied for this turn (duration in deciseconds) -source_mode | Read/write | Enum | Travel mode before the turn. Defined in `include/extractor/travel_mode.hpp` -target_mode | Read/write | Enum | Travel mode after the turn. Defined in `include/extractor/travel_mode.hpp` +Attribute | Read/write? | Type | Notes +---------------------|-------------|---------|------------------------------------------------------ +angle | Read | Float | Angle of turn in degrees (`0-360`: `0`=u-turn, `180`=straight on) +number_of_roads | Read | Integer | Number of ways at the intersection of the turn +is_u_turn | Read | Boolean | Is the turn a u-turn? +has_traffic_light | Read | Boolean | Is a traffic light present at this turn? +source_restricted | Read | Boolean | Is it from a restricted access road? (See definition in `process_way`) +target_restricted | Read | Boolean | Is it to a restricted access road? (See definition in `process_way`) +is_left_hand_driving | Read | Boolean | Is left-hand traffic? +weight | Read/write | Float | Penalty to be applied for this turn (routing weight) +duration | Read/write | Float | Penalty to be applied for this turn (duration in deciseconds) +source_mode | Read | Enum | Travel mode before the turn. Defined in `include/extractor/travel_mode.hpp` +target_mode | Read | Enum | Travel mode after the turn. Defined in `include/extractor/travel_mode.hpp` ## Guidance The guidance parameters in profiles are currently a work in progress. They can and will change.