Split intersection analysis and guidance code

Intersection analysis occupy in osrm::extractor::intersection namespace
and guidance code osrm::guidance
This commit is contained in:
Michael Krasnyk
2018-01-05 14:33:53 +01:00
parent 36877e4de5
commit 988b6e3311
100 changed files with 1406 additions and 1380 deletions
+3 -3
View File
@@ -68,7 +68,7 @@ add_executable(contractor-tests
add_executable(extractor-tests
EXCLUDE_FROM_ALL
${ExtractorTestsSources}
$<TARGET_OBJECTS:EXTRACTOR> $<TARGET_OBJECTS:GUIDANCE> $<TARGET_OBJECTS:UTIL>)
$<TARGET_OBJECTS:EXTRACTOR> $<TARGET_OBJECTS:UTIL>)
add_executable(partitioner-tests
EXCLUDE_FROM_ALL
@@ -150,12 +150,12 @@ target_include_directories(updater-tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(contractor-tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(engine-tests ${ENGINE_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
target_link_libraries(extractor-tests ${EXTRACTOR_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
target_link_libraries(extractor-tests osrm_extract osrm_guidance ${EXTRACTOR_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
target_link_libraries(partitioner-tests ${PARTITIONER_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
target_link_libraries(customizer-tests ${CUSTOMIZER_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
target_link_libraries(updater-tests ${UPDATER_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
target_link_libraries(library-tests osrm ${ENGINE_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
target_link_libraries(library-extract-tests osrm_extract ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
target_link_libraries(library-extract-tests osrm_extract osrm_guidance ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
target_link_libraries(library-contract-tests osrm_contract ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
target_link_libraries(library-customize-tests osrm_customize ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
target_link_libraries(library-partition-tests osrm_partition ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
+5 -3
View File
@@ -15,7 +15,7 @@ BOOST_AUTO_TEST_SUITE(guidance_assembly)
BOOST_AUTO_TEST_CASE(trim_short_segments)
{
using namespace osrm::extractor;
using namespace osrm::extractor::guidance;
using namespace osrm::guidance;
using namespace osrm::engine::guidance;
using namespace osrm::engine;
using namespace osrm::util;
@@ -59,7 +59,8 @@ BOOST_AUTO_TEST_CASE(trim_short_segments)
0},
0,
3,
{intersection1}},
{intersection1},
false},
{324,
false,
"Central Park West",
@@ -81,7 +82,8 @@ BOOST_AUTO_TEST_CASE(trim_short_segments)
0},
2,
3,
{intersection2}}};
{intersection2},
false}};
LegGeometry geometry;
geometry.locations = {{FloatLongitude{-73.981492}, FloatLatitude{40.768258}},
+1 -1
View File
@@ -9,7 +9,7 @@ BOOST_AUTO_TEST_SUITE(json_factory)
BOOST_AUTO_TEST_CASE(instructionTypeToString_test_size)
{
using namespace osrm::engine::api::json::detail;
using namespace osrm::extractor::guidance;
using namespace osrm::guidance;
BOOST_CHECK_EQUAL(instructionTypeToString(TurnType::Sliproad), "invalid");
}
+3 -4
View File
@@ -208,10 +208,9 @@ class ContiguousInternalMemoryDataFacade<routing_algorithms::offline::Algorithm>
StringView GetDatasourceName(const DatasourceID /*id*/) const override { return StringView{}; }
extractor::guidance::TurnInstruction
GetTurnInstructionForEdgeID(const EdgeID /*id*/) const override
guidance::TurnInstruction GetTurnInstructionForEdgeID(const EdgeID /*id*/) const override
{
return extractor::guidance::TurnInstruction{};
return guidance::TurnInstruction{};
}
extractor::TravelMode GetTravelMode(const NodeID /*id*/) const override
@@ -320,7 +319,7 @@ class ContiguousInternalMemoryDataFacade<routing_algorithms::offline::Algorithm>
return util::guidance::LaneTupleIdPair{};
}
extractor::guidance::TurnLaneDescription
extractor::TurnLaneDescription
GetTurnDescription(const LaneDescriptionID /*laneDescriptionID*/) const override
{
return {};
@@ -11,8 +11,8 @@
BOOST_AUTO_TEST_SUITE(intersection_analysis_tests)
using namespace osrm;
using namespace osrm::guidance;
using namespace osrm::extractor;
using namespace osrm::extractor::guidance;
using namespace osrm::extractor::intersection;
using InputEdge = util::NodeBasedDynamicGraph::InputEdge;
using Graph = util::NodeBasedDynamicGraph;
+4 -4
View File
@@ -6,8 +6,8 @@
#include "contractor/query_edge.hpp"
#include "extractor/class_data.hpp"
#include "extractor/travel_mode.hpp"
#include "extractor/turn_lane_types.hpp"
#include "guidance/turn_instruction.hpp"
#include "guidance/turn_lane_types.hpp"
#include "engine/algorithm.hpp"
#include "engine/datafacade/algorithm_datafacade.hpp"
@@ -90,10 +90,10 @@ class MockBaseDataFacade : public engine::datafacade::BaseDataFacade
StringView GetDatasourceName(const DatasourceID) const override final { return {}; }
extractor::guidance::TurnInstruction
osrm::guidance::TurnInstruction
GetTurnInstructionForEdgeID(const EdgeID /* id */) const override
{
return extractor::guidance::TurnInstruction::NO_TURN();
return osrm::guidance::TurnInstruction::NO_TURN();
}
std::vector<RTreeLeaf> GetEdgesInBox(const util::Coordinate /* south_west */,
const util::Coordinate /*north_east */) const override
@@ -240,7 +240,7 @@ class MockBaseDataFacade : public engine::datafacade::BaseDataFacade
{
return {{0, 0}, 0};
}
extractor::guidance::TurnLaneDescription
extractor::TurnLaneDescription
GetTurnDescription(const LaneDescriptionID /*lane_description_id*/) const override final
{
return {};