mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
This commit is contained in:
32
track_analyzing/track_analyzer/cmd_cpp_track.cpp
Normal file
32
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