Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c7293f2024 | |||
| ddc8aed25d | |||
| 5f7410057c | |||
| d55d46e64e | |||
| a83150d311 | |||
| b073bf36f3 | |||
| aaea94f776 |
@@ -1,3 +1,8 @@
|
|||||||
|
# 5.7.2
|
||||||
|
- Changes from 5.7.1:
|
||||||
|
- Bug fixes:
|
||||||
|
- Fixes segmentation fault caused by the fix for 3977
|
||||||
|
|
||||||
# 5.7.1
|
# 5.7.1
|
||||||
- Changes from 5.7.0:
|
- Changes from 5.7.0:
|
||||||
- Bug fixes:
|
- Bug fixes:
|
||||||
|
|||||||
+1
-1
@@ -55,7 +55,7 @@ endif()
|
|||||||
project(OSRM C CXX)
|
project(OSRM C CXX)
|
||||||
set(OSRM_VERSION_MAJOR 5)
|
set(OSRM_VERSION_MAJOR 5)
|
||||||
set(OSRM_VERSION_MINOR 7)
|
set(OSRM_VERSION_MINOR 7)
|
||||||
set(OSRM_VERSION_PATCH 1)
|
set(OSRM_VERSION_PATCH 2)
|
||||||
set(OSRM_VERSION "${OSRM_VERSION_MAJOR}.${OSRM_VERSION_MINOR}.${OSRM_VERSION_PATCH}")
|
set(OSRM_VERSION "${OSRM_VERSION_MAJOR}.${OSRM_VERSION_MINOR}.${OSRM_VERSION_PATCH}")
|
||||||
|
|
||||||
add_definitions(-DOSRM_PROJECT_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
add_definitions(-DOSRM_PROJECT_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
|||||||
@@ -794,3 +794,29 @@ Feature: Basic Roundabout
|
|||||||
| 1 | f | abcda,af,af | depart,roundabout-exit-1,arrive |
|
| 1 | f | abcda,af,af | depart,roundabout-exit-1,arrive |
|
||||||
| 1 | g | abcda,bg,bg | depart,roundabout-exit-1,arrive |
|
| 1 | g | abcda,bg,bg | depart,roundabout-exit-1,arrive |
|
||||||
| 1 | h | abcda,bh,bh | depart,roundabout-exit-1,arrive |
|
| 1 | h | abcda,bh,bh | depart,roundabout-exit-1,arrive |
|
||||||
|
|
||||||
|
Scenario: CCW and CW roundabouts with overlaps
|
||||||
|
Given the node map
|
||||||
|
"""
|
||||||
|
a d g h
|
||||||
|
|
||||||
|
b c j i
|
||||||
|
f e k l
|
||||||
|
"""
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | junction |
|
||||||
|
| abcda | tertiary | roundabout |
|
||||||
|
| ed | tertiary | |
|
||||||
|
| af | tertiary | |
|
||||||
|
| ghijg | tertiary | roundabout |
|
||||||
|
| kg | tertiary | |
|
||||||
|
| hl | tertiary | |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns | distance |
|
||||||
|
| e | f | ed,af,af | depart,roundabout-exit-1,arrive | 80.1m |
|
||||||
|
| f | e | af,ed,ed | depart,roundabout-exit-1,arrive | 120.1m |
|
||||||
|
| k | l | kg,hl,hl | depart,roundabout-exit-1,arrive | 80.1m |
|
||||||
|
| l | k | hl,kg,kg | depart,roundabout-exit-1,arrive | 120.1m |
|
||||||
|
|
||||||
|
|||||||
@@ -34,9 +34,9 @@
|
|||||||
#define OSRM_ASSERT_MSG(cond, coordinate, msg) \
|
#define OSRM_ASSERT_MSG(cond, coordinate, msg) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
(void)cond; \
|
(void)(cond); \
|
||||||
(void)coordinate; \
|
(void)(coordinate); \
|
||||||
(void)msg; \
|
(void)(msg); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define OSRM_ASSERT(cond, coordinate) OSRM_ASSERT_MSG(cond, coordinate, "")
|
#define OSRM_ASSERT(cond, coordinate) OSRM_ASSERT_MSG(cond, coordinate, "")
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "osrm",
|
"name": "osrm",
|
||||||
"version": "5.7.1",
|
"version": "5.7.2",
|
||||||
"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": {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include "extractor/geojson_debug_policies.hpp"
|
#include "extractor/geojson_debug_policies.hpp"
|
||||||
#include "util/geojson_debug_logger.hpp"
|
#include "util/geojson_debug_logger.hpp"
|
||||||
|
|
||||||
|
#include "util/assert.hpp"
|
||||||
#include "util/bearing.hpp"
|
#include "util/bearing.hpp"
|
||||||
#include "util/coordinate_calculation.hpp"
|
#include "util/coordinate_calculation.hpp"
|
||||||
#include "util/log.hpp"
|
#include "util/log.hpp"
|
||||||
@@ -278,7 +279,8 @@ IntersectionView IntersectionGenerator::TransformIntersectionShapeIntoView(
|
|||||||
};
|
};
|
||||||
|
|
||||||
// due to merging of roads, the u-turn might actually not be part of the intersection anymore
|
// due to merging of roads, the u-turn might actually not be part of the intersection anymore
|
||||||
const auto uturn_bearing = [&]() {
|
// uturn is a pair of {edge id, bearing}
|
||||||
|
const auto uturn = [&]() {
|
||||||
const auto merge_entry = std::find_if(
|
const auto merge_entry = std::find_if(
|
||||||
performed_merges.begin(), performed_merges.end(), [&uturn_edge_itr](const auto entry) {
|
performed_merges.begin(), performed_merges.end(), [&uturn_edge_itr](const auto entry) {
|
||||||
return entry.merged_eid == uturn_edge_itr->eid;
|
return entry.merged_eid == uturn_edge_itr->eid;
|
||||||
@@ -291,7 +293,8 @@ IntersectionView IntersectionGenerator::TransformIntersectionShapeIntoView(
|
|||||||
normalized_intersection.end(),
|
normalized_intersection.end(),
|
||||||
[&](const IntersectionShapeData &road) { return road.eid == merged_into_id; });
|
[&](const IntersectionShapeData &road) { return road.eid == merged_into_id; });
|
||||||
BOOST_ASSERT(merged_u_turn != normalized_intersection.end());
|
BOOST_ASSERT(merged_u_turn != normalized_intersection.end());
|
||||||
return util::bearing::reverse(merged_u_turn->bearing);
|
return std::make_pair(merged_u_turn->eid,
|
||||||
|
util::bearing::reverse(merged_u_turn->bearing));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -301,7 +304,9 @@ IntersectionView IntersectionGenerator::TransformIntersectionShapeIntoView(
|
|||||||
connect_to_previous_node);
|
connect_to_previous_node);
|
||||||
BOOST_ASSERT(uturn_edge_at_normalized_intersection_itr !=
|
BOOST_ASSERT(uturn_edge_at_normalized_intersection_itr !=
|
||||||
normalized_intersection.end());
|
normalized_intersection.end());
|
||||||
return util::bearing::reverse(uturn_edge_at_normalized_intersection_itr->bearing);
|
return std::make_pair(
|
||||||
|
uturn_edge_at_normalized_intersection_itr->eid,
|
||||||
|
util::bearing::reverse(uturn_edge_at_normalized_intersection_itr->bearing));
|
||||||
}
|
}
|
||||||
}();
|
}();
|
||||||
|
|
||||||
@@ -314,7 +319,7 @@ IntersectionView IntersectionGenerator::TransformIntersectionShapeIntoView(
|
|||||||
return IntersectionViewData(
|
return IntersectionViewData(
|
||||||
road,
|
road,
|
||||||
is_allowed_turn(road),
|
is_allowed_turn(road),
|
||||||
util::bearing::angleBetween(uturn_bearing, road.bearing));
|
util::bearing::angleBetween(uturn.second, road.bearing));
|
||||||
});
|
});
|
||||||
|
|
||||||
const auto uturn_edge_at_intersection_view_itr =
|
const auto uturn_edge_at_intersection_view_itr =
|
||||||
@@ -369,8 +374,22 @@ IntersectionView IntersectionGenerator::TransformIntersectionShapeIntoView(
|
|||||||
std::end(intersection_view),
|
std::end(intersection_view),
|
||||||
std::mem_fn(&IntersectionViewData::CompareByAngle));
|
std::mem_fn(&IntersectionViewData::CompareByAngle));
|
||||||
|
|
||||||
BOOST_ASSERT(intersection_view[0].angle >= 0. &&
|
// Move entering_via_edge to intersection front and place all roads prior entering_via_edge
|
||||||
intersection_view[0].angle < std::numeric_limits<double>::epsilon());
|
// at the end of the intersection view with 360° angle
|
||||||
|
auto entering_via_it = std::find_if(intersection_view.begin(),
|
||||||
|
intersection_view.end(),
|
||||||
|
[&uturn](auto &road) { return road.eid == uturn.first; });
|
||||||
|
|
||||||
|
OSRM_ASSERT(entering_via_it != intersection_view.end() && entering_via_it->angle >= 0. &&
|
||||||
|
entering_via_it->angle < std::numeric_limits<double>::epsilon(),
|
||||||
|
coordinates[node_at_intersection]);
|
||||||
|
|
||||||
|
if (entering_via_it != intersection_view.begin() && entering_via_it != intersection_view.end())
|
||||||
|
{
|
||||||
|
std::for_each(
|
||||||
|
intersection_view.begin(), entering_via_it, [](auto &road) { road.angle = 360.; });
|
||||||
|
std::rotate(intersection_view.begin(), entering_via_it, intersection_view.end());
|
||||||
|
}
|
||||||
|
|
||||||
return intersection_view;
|
return intersection_view;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "extractor/guidance/roundabout_handler.hpp"
|
#include "extractor/guidance/roundabout_handler.hpp"
|
||||||
#include "extractor/guidance/constants.hpp"
|
#include "extractor/guidance/constants.hpp"
|
||||||
|
|
||||||
|
#include "util/assert.hpp"
|
||||||
#include "util/bearing.hpp"
|
#include "util/bearing.hpp"
|
||||||
#include "util/coordinate_calculation.hpp"
|
#include "util/coordinate_calculation.hpp"
|
||||||
#include "util/guidance/name_announcements.hpp"
|
#include "util/guidance/name_announcements.hpp"
|
||||||
@@ -158,6 +159,8 @@ void RoundaboutHandler::invalidateExitAgainstDirection(const NodeID from_nid,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OSRM_ASSERT(invalidate_from <= invalidate_to, coordinates[from_nid]);
|
||||||
|
|
||||||
// Exiting roundabouts at an entry point is technically a data-modelling issue.
|
// Exiting roundabouts at an entry point is technically a data-modelling issue.
|
||||||
// This workaround handles cases in which an exit precedes and entry. The resulting
|
// This workaround handles cases in which an exit precedes and entry. The resulting
|
||||||
// u-turn against the roundabout direction is invalidated.
|
// u-turn against the roundabout direction is invalidated.
|
||||||
|
|||||||
Reference in New Issue
Block a user