Update docs for process_turn in the profile docs (#4786)
* update correct attributes available in process turn * make travel mode in ExtractedTurn const * fix mismatch of struct and class
This commit is contained in:
		
							parent
							
								
									a8f3474996
								
							
						
					
					
						commit
						e998c1193d
					
				| @ -209,15 +209,18 @@ 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`: | The following attributes can be read and set on the result in `process_turn`: | ||||||
| 
 | 
 | ||||||
| Attribute            | Read/write? | Type    | Notes | Attribute            | Read/write? | Type    | Notes | ||||||
| -------------------|-------------|---------|------------------------------------------------------ | ---------------------|-------------|---------|------------------------------------------------------ | ||||||
| direction_modifier | Read        | Enum    | Geometry 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) | ||||||
| turn_type          | Read        | Enum    | Priority of turn. Defined in `include/extractor/guidance/turn_instruction.hpp` | 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? | 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`) | 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`) | 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) | is_left_hand_driving | Read        | Boolean | Is left-hand traffic?  | ||||||
| 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) | 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 | ## Guidance | ||||||
| The guidance parameters in profiles are currently a work in progress. They can and will change. | The guidance parameters in profiles are currently a work in progress. They can and will change. | ||||||
|  | |||||||
| @ -39,8 +39,8 @@ struct ExtractionTurn | |||||||
|     const bool is_left_hand_driving; |     const bool is_left_hand_driving; | ||||||
|     double weight; |     double weight; | ||||||
|     double duration; |     double duration; | ||||||
|     TravelMode source_mode; |     const TravelMode source_mode; | ||||||
|     TravelMode target_mode; |     const TravelMode target_mode; | ||||||
| }; | }; | ||||||
| } | } | ||||||
| } | } | ||||||
|  | |||||||
| @ -12,7 +12,7 @@ namespace osrm | |||||||
| { | { | ||||||
| namespace util | namespace util | ||||||
| { | { | ||||||
| class Coordinate; | struct Coordinate; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| namespace extractor | namespace extractor | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user