Turn Angles in OSRM were computed using a lookahead of 10 meters.

This PR adds more advanced coordinate extraction, analysing the road
to detect offsets due to OSM way modelling.

In addition it improves the handling of bearings. Right now OSM reports
bearings simply based on the very first coordinate along a way.
With this PR, we store the bearings for a turn correctly, making the
bearings for turns correct.
This commit is contained in:
Moritz Kobitzsch
2016-08-17 09:49:19 +02:00
parent 1f8ca2879f
commit 5e167b8745
62 changed files with 3451 additions and 679 deletions
+4 -2
View File
@@ -467,7 +467,8 @@ Status TilePlugin::HandleRequest(const std::shared_ptr<datafacade::BaseDataFacad
for (const auto &source_ebn : edge_based_node_info)
{
// Grab a copy of the geometry leading up to the intersection.
first_geometry = facade->GetUncompressedForwardGeometry(source_ebn.second.packed_geometry_id);
first_geometry =
facade->GetUncompressedForwardGeometry(source_ebn.second.packed_geometry_id);
// We earlier saved the source and target intersection nodes for every road section.
// We can use the target node to find all road sections that lead away from
@@ -534,7 +535,8 @@ Status TilePlugin::HandleRequest(const std::shared_ptr<datafacade::BaseDataFacad
edge_based_node_info.at(target_ebn).packed_geometry_id);
// Now, calculate the sum of the weight of all the segments.
forward_weight_vector = facade->GetUncompressedForwardWeights(source_ebn.second.packed_geometry_id);
forward_weight_vector =
facade->GetUncompressedForwardWeights(source_ebn.second.packed_geometry_id);
const auto sum_node_weight = std::accumulate(
forward_weight_vector.begin(), forward_weight_vector.end(), EdgeWeight{0});