Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs for process_turn in the profile docs #4786

Merged
merged 4 commits into from
Jan 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions docs/profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +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
-------------------|-------------|---------|------------------------------------------------------
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`
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)
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.
Expand Down
4 changes: 2 additions & 2 deletions include/extractor/extraction_turn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion include/extractor/guidance/turn_discovery.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace osrm
{
namespace util
{
class Coordinate;
struct Coordinate;
}

namespace extractor
Expand Down