Fast map matching  0.1.0
gps_config.hpp
1 
9 #ifndef FMM_SRC_CONFIG_GPS_CONFIG_HPP_
10 #define FMM_SRC_CONFIG_GPS_CONFIG_HPP_
11 
12 #include <string>
13 #include <boost/property_tree/ptree.hpp>
14 #include <boost/property_tree/xml_parser.hpp>
15 
16 #include "cxxopts/cxxopts.hpp"
17 
18 namespace FMM {
22 namespace CONFIG {
26 struct GPSConfig{
27  std::string file;
28  std::string id;
29  std::string geom;
30  std::string x;
31  std::string y;
32  std::string timestamp;
33  bool gps_point = false;
38  bool validate() const;
42  void print() const;
50  int get_gps_format() const;
57  static GPSConfig load_from_xml(const boost::property_tree::ptree &xml_data);
64  static GPSConfig load_from_arg(const cxxopts::ParseResult &arg_data);
65 };
66 
67 } // CONFIG
68 
69 } // FMM
70 
71 #endif //FMM_SRC_CONFIG_GPS_CONFIG_HPP_
FMM::CONFIG::GPSConfig::x
std::string x
x field/column name
Definition: gps_config.hpp:30
FMM::CONFIG::GPSConfig::y
std::string y
y field/column name
Definition: gps_config.hpp:31
FMM
Fast map matching.
Definition: geom_algorithm.hpp:17
FMM::CONFIG::GPSConfig::validate
bool validate() const
Validate the GPS configuration for file existence, parameter validation.
Definition: gps_config.cpp:74
FMM::CONFIG::GPSConfig::id
std::string id
id field/column name
Definition: gps_config.hpp:28
FMM::CONFIG::GPSConfig::gps_point
bool gps_point
gps point stored or not
Definition: gps_config.hpp:33
FMM::CONFIG::GPSConfig::file
std::string file
filename
Definition: gps_config.hpp:27
FMM::CONFIG::GPSConfig::geom
std::string geom
geometry field/column name
Definition: gps_config.hpp:29
FMM::CONFIG::GPSConfig
GPS configuration class for reading data from a file.
Definition: gps_config.hpp:26
FMM::CONFIG::GPSConfig::print
void print() const
Print members of the GPS configuration.
Definition: gps_config.cpp:5
FMM::CONFIG::GPSConfig::timestamp
std::string timestamp
timestamp field/column name
Definition: gps_config.hpp:32
FMM::CONFIG::GPSConfig::get_gps_format
int get_gps_format() const
Find the GPS format.
Definition: gps_config.cpp:57
FMM::CONFIG::GPSConfig::load_from_xml
static GPSConfig load_from_xml(const boost::property_tree::ptree &xml_data)
Load GPSConfig from XML data.
Definition: gps_config.cpp:28
FMM::CONFIG::GPSConfig::load_from_arg
static GPSConfig load_from_arg(const cxxopts::ParseResult &arg_data)
Load GPSConfig from argument parsed data.
Definition: gps_config.cpp:43