-
Notifications
You must be signed in to change notification settings - Fork 0
/
exporters.h
43 lines (36 loc) · 1.05 KB
/
exporters.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef _GPXOUT_H
#define _GPXOUT_H
//
// Ingests GPSSample vectors and outputs GPX Track files
// Has abilities to combine and trim and segregate samples
//
// Author: Robert Wolff
// Copyright 2020 Robert Wolff with MIT license
//
#include <iostream>
#include <iomanip>
#include <vector>
#include <map>
// std::min and std::max
//#include <algorithm>
#include "goprometa.h"
#include "xmlwriter/xmlwriter.h"
class SamplesHandler {
public:
SamplesHandler();
~SamplesHandler();
bool AddSampleSet(const char* keyname, std::vector<GPSSample> samples);
void ExportDataGroupDailySegmented(std::map<std::string, std::map<std::string, std::vector<GPSSample>>> &outGroups);
void makeUniqueBasenames(std::map<std::string, std::vector<GPSSample>> &inbound);
protected:
std::map<std::string, std::vector<GPSSample>> trackGroups; // All sample groups mapped by filename individually
};
class GPXExporter {
public:
GPXExporter(SamplesHandler* _pHandler);
~GPXExporter();
bool ExportDailySegmented(const char* destdir="");
protected:
SamplesHandler* pHandler;
};
#endif