Skip to content

Commit 080cf39

Browse files
ClaudeDennisOSRM
andcommitted
Fix formatting and update documentation
- Apply clang-format to graph_compressor.cpp - Add turning circle feature to CHANGELOG.md - Document has_turning_facility field in profiles.md Co-authored-by: DennisOSRM <[email protected]>
1 parent 1e2d0e5 commit 080cf39

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Unreleased
22
- Changes from 6.0.0
33
- Routing:
4+
- ADDED: Use turning circles, turning loops, and mini roundabouts for u-turns with zero penalty [#620](https://github.com/Project-OSRM/osrm-backend/issues/620)
45
- FIXED: Crash when route starts or ends at `type=manoeuvre` relation via node [#7287](https://github.com/Project-OSRM/osrm-backend/issues/7287)
56
- Extraction:
67
- ADDED: Emit warning when ways reference nodes not present in input data [#1596](https://github.com/Project-OSRM/osrm-backend/issues/1596)

docs/profiles.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,7 @@ angle | Read | Float |
416416
number_of_roads | Read | Integer | Number of ways at the intersection of the turn
417417
is_u_turn | Read | Boolean | Is the turn a u-turn?
418418
has_traffic_light | Read | Boolean | Is a traffic light present at this turn?
419+
has_turning_facility | Read | Boolean | Is a turning facility (turning_circle, turning_loop, or mini_roundabout) present at this intersection?
419420
is_left_hand_driving | Read | Boolean | Is left-hand traffic?
420421
source_restricted | Read | Boolean | Is it from a restricted access road? (See definition in `process_way`)
421422
source_mode | Read | Enum | Travel mode before the turn. Defined in `include/extractor/travel_mode.hpp`

src/extractor/graph_compressor.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -265,17 +265,17 @@ void GraphCompressor::Compress(ScriptingEnvironment &scripting_environment,
265265
EdgePenalties &penalties)
266266
{
267267
// generate an artificial turn for the turn penalty generation
268-
ExtractionTurn fake_turn{from,
269-
via,
270-
to,
271-
from_edge,
272-
to_edge,
273-
no_other_roads,
274-
no_other_roads,
275-
scripting_environment.m_obstacle_map.any(
276-
from, via, Obstacle::Type::TrafficSignals),
277-
scripting_environment.m_obstacle_map.any(
278-
via, Obstacle::Type::Turning)};
268+
ExtractionTurn fake_turn{
269+
from,
270+
via,
271+
to,
272+
from_edge,
273+
to_edge,
274+
no_other_roads,
275+
no_other_roads,
276+
scripting_environment.m_obstacle_map.any(
277+
from, via, Obstacle::Type::TrafficSignals),
278+
scripting_environment.m_obstacle_map.any(via, Obstacle::Type::Turning)};
279279
scripting_environment.ProcessTurn(fake_turn);
280280
penalties.duration +=
281281
to_alias<EdgeDuration>(fake_turn.duration * SECOND_TO_DECISECOND);

0 commit comments

Comments
 (0)