mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 21:33:59 +00:00
committed by
Konstantin Pastbin
parent
c9cbb64f12
commit
76ffc99abd
32
tools/track_analyzing/track_analyzer/cmd_cpp_track.cpp
Normal file
32
tools/track_analyzing/track_analyzer/cmd_cpp_track.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include "track_analyzing/track.hpp"
|
||||
#include "track_analyzing/utils.hpp"
|
||||
|
||||
#include "storage/routing_helpers.hpp"
|
||||
#include "storage/storage.hpp"
|
||||
|
||||
using namespace routing;
|
||||
using namespace std;
|
||||
|
||||
namespace track_analyzing
|
||||
{
|
||||
void CmdCppTrack(string const & trackFile, string const & mwmName, string const & user,
|
||||
size_t trackIdx)
|
||||
{
|
||||
storage::Storage storage;
|
||||
auto const numMwmIds = CreateNumMwmIds(storage);
|
||||
MwmToMatchedTracks mwmToMatchedTracks;
|
||||
ReadTracks(numMwmIds, trackFile, mwmToMatchedTracks);
|
||||
|
||||
MatchedTrack const & track =
|
||||
GetMatchedTrack(mwmToMatchedTracks, *numMwmIds, mwmName, user, trackIdx);
|
||||
|
||||
auto const backupPrecision = cout.precision();
|
||||
cout.precision(8);
|
||||
for (MatchedTrackPoint const & point : track)
|
||||
{
|
||||
cout << " {" << point.GetDataPoint().m_latLon.m_lat << ", " << point.GetDataPoint().m_latLon.m_lon
|
||||
<< "}," << endl;
|
||||
}
|
||||
cout.precision(backupPrecision);
|
||||
}
|
||||
} // namespace track_analyzing
|
||||
Reference in New Issue
Block a user