mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-23 14:43:43 +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:
41
track_analyzing/track_analyzer/cmd_unmatched_tracks.cpp
Normal file
41
track_analyzing/track_analyzer/cmd_unmatched_tracks.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#include "track_analyzing/track.hpp"
|
||||
#include "track_analyzing/track_analyzer/utils.hpp"
|
||||
|
||||
#include "routing_common/num_mwm_id.hpp"
|
||||
|
||||
#include "storage/routing_helpers.hpp"
|
||||
#include "storage/storage.hpp"
|
||||
|
||||
#include "base/logging.hpp"
|
||||
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace track_analyzing
|
||||
{
|
||||
using namespace routing;
|
||||
using namespace std;
|
||||
|
||||
void CmdUnmatchedTracks(string const & logFile, string const & trackFileCsv)
|
||||
{
|
||||
LOG(LINFO, ("Saving unmatched tracks", logFile));
|
||||
storage::Storage storage;
|
||||
shared_ptr<NumMwmIds> numMwmIds = CreateNumMwmIds(storage);
|
||||
MwmToTracks mwmToTracks;
|
||||
ParseTracks(logFile, numMwmIds, mwmToTracks);
|
||||
|
||||
string const sep = ",";
|
||||
ofstream ofs(trackFileCsv, std::ofstream::out);
|
||||
for (auto const & kv : mwmToTracks)
|
||||
{
|
||||
for (auto const & idTrack : kv.second)
|
||||
{
|
||||
ofs << numMwmIds->GetFile(kv.first).GetName() << sep << idTrack.first;
|
||||
for (auto const & pnt : idTrack.second)
|
||||
ofs << sep << pnt.m_timestamp << sep << pnt.m_latLon.m_lat << sep << pnt.m_latLon.m_lon;
|
||||
ofs << "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace track_analyzing
|
||||
Reference in New Issue
Block a user