Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2016-10-17 17:51:22 +0300
committerVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2016-11-02 11:06:36 +0300
commit57c0d5a6dfc85c3074498669fdbcecc28df5e822 (patch)
tree72de89696c11b035e2bbf8758007a5e1fe8fd271
parent5daa09c9fd47822086ded3e02ead2c99fd1c2470 (diff)
Adding edgeidx define and detail some comments.
-rw-r--r--defines.hpp1
-rw-r--r--routing/car_router.cpp7
-rw-r--r--routing/car_router.hpp2
-rw-r--r--routing/road_graph_router.cpp3
-rw-r--r--routing/route.cpp2
-rw-r--r--routing/route.hpp9
6 files changed, 13 insertions, 11 deletions
diff --git a/defines.hpp b/defines.hpp
index 612169d512..f0db7c48ec 100644
--- a/defines.hpp
+++ b/defines.hpp
@@ -27,6 +27,7 @@
#define METADATA_FILE_TAG "meta"
#define METADATA_INDEX_FILE_TAG "metaidx"
#define ALTITUDES_FILE_TAG "altitudes"
+#define EDGE_INDEX_FILE_TAG "edgeidx"
#define FEATURE_OFFSETS_FILE_TAG "offs"
#define RANKS_FILE_TAG "ranks"
#define REGION_INFO_FILE_TAG "rgninfo"
diff --git a/routing/car_router.cpp b/routing/car_router.cpp
index e773852941..c2408e13ac 100644
--- a/routing/car_router.cpp
+++ b/routing/car_router.cpp
@@ -505,10 +505,7 @@ bool CarRouter::IsEdgeIndexExisting(Index::MwmId const & mwmId)
if (value->GetHeader().GetFormat() < version::Format::v8)
return false;
- // @TODO This section name will be defined in another PR.
- // This const should be removed.
- string const EDGE_INDEX_FILE_TAG = "edgeidx";
- if (value->m_cont.IsExist(EDGE_INDEX_FILE_TAG.c_str()))
+ if (value->m_cont.IsExist(EDGE_INDEX_FILE_TAG))
return true;
return false;
}
@@ -524,7 +521,7 @@ bool CarRouter::FindSingleRouteDispatcher(FeatureGraphNode const & source, Featu
Route mwmRoute(GetName());
// @TODO It's not the best place for checking availability of edge index section in mwm.
- // Probably it's better to keep if mwm had edge index section in mwmId.
+ // Probably it's better to keep if mwm has an edge index section in mwmId.
if (IsEdgeIndexExisting(source.mwmId) && m_roadGraphRouter)
{
// A* routing
diff --git a/routing/car_router.hpp b/routing/car_router.hpp
index a9eb4f5956..6b2d107f6e 100644
--- a/routing/car_router.hpp
+++ b/routing/car_router.hpp
@@ -86,8 +86,6 @@ private:
* \param route The found route is added the the |route| if the method returns true.
* \return true if route is build and false otherwise.
*/
- // @TODO. The behavior of the method should be changed. This method should check if osrm section
- // available and if so use them. If not, RoadGraphRouter and A* should be used.
bool FindSingleRouteDispatcher(FeatureGraphNode const & source, FeatureGraphNode const & target,
RouterDelegate const & delegate, TRoutingMappingPtr & mapping,
Route & route);
diff --git a/routing/road_graph_router.cpp b/routing/road_graph_router.cpp
index 0afa57a2e7..693a4841ca 100644
--- a/routing/road_graph_router.cpp
+++ b/routing/road_graph_router.cpp
@@ -314,9 +314,10 @@ unique_ptr<IRouter> CreateBicycleAStarBidirectionalRouter(Index & index, TCountr
unique_ptr<RoadGraphRouter> CreateCarAStarBidirectionalRouter(Index & index, TCountryFileFn const & countryFileFn)
{
- // @TODO It's necessary to use car classes instead of bicycle ones.
unique_ptr<IVehicleModelFactory> vehicleModelFactory = make_unique<CarModelFactory>();
unique_ptr<IRoutingAlgorithm> algorithm = make_unique<AStarBidirectionalRoutingAlgorithm>();
+ // @TODO Bycycle turn generation engine is used now. It's ok for the time being.
+ // But later a special car turn generation engine should be implemented.
unique_ptr<IDirectionsEngine> directionsEngine = make_unique<BicycleDirectionsEngine>(index);
unique_ptr<RoadGraphRouter> router = make_unique<RoadGraphRouter>(
"astar-bidirectional-bicycle", index, countryFileFn, IRoadGraph::Mode::ObeyOnewayTag,
diff --git a/routing/route.cpp b/routing/route.cpp
index c7f20933f3..452367cd75 100644
--- a/routing/route.cpp
+++ b/routing/route.cpp
@@ -391,8 +391,6 @@ void Route::AppendRoute(Route const & route)
m_streets.push_back(move(s));
}
- // @TODO Implement altitude appending.
-
// Appending times.
double const estimationTime = m_times.empty() ? 0.0 : m_times.back().second;
for (TTimeItem t : route.m_times)
diff --git a/routing/route.hpp b/routing/route.hpp
index 093306b800..b3fe071212 100644
--- a/routing/route.hpp
+++ b/routing/route.hpp
@@ -60,7 +60,14 @@ public:
inline void SetStreetNames(TStreets && v) { m_streets = move(v); }
inline void SetAltitudes(feature::TAltitudes && v) { m_altitudes = move(v); }
- /// \brief Appends all |route| attributes except for altitude.
+ /// \brief Glues all |route| attributes to |this| except for |m_altitudes|.
+ // @TODO In the future this method should append |m_altitudes| as well.
+ // It's not implemented now because it's not easy to do it and it'll not be used in
+ // the short future. The problem is routes genetated by osrm have empty |m_altitudes|.
+ // So |m_altitudes| should be filled (with correnct or default values) on osrm route
+ // reconstruction stage to be added with this method. On the other
+ // hand it seems this method'll not be not used for bicycle and pedestrian routing
+ // in short future. And altitude is not used for car routing.
void AppendRoute(Route const & route);
uint32_t GetTotalTimeSec() const;