update cppgtfs, add (hidden as of now, as the mode is not complete) option -F to keep additional non-standard GTFS fields

This commit is contained in:
Patrick Brosi 2023-11-06 17:59:29 +01:00
parent dfb62babd9
commit dd05506c42
5 changed files with 25 additions and 11 deletions

View file

@ -144,10 +144,11 @@ void ConfigReader::read(Config* cfg, int argc, char** argv) {
{"stats", no_argument, 0, 14},
{"no-hop-cache", no_argument, 0, 15},
{"gaussian-noise", required_argument, 0, 16},
{"keep-additional-gtfs-fields", no_argument, 0, 'F'},
{0, 0, 0, 0}};
char c;
while ((c = getopt_long(argc, argv, ":o:hvi:c:x:Dm:g:X:T:d:pP:", ops, 0)) !=
while ((c = getopt_long(argc, argv, ":o:hvi:c:x:Dm:g:X:T:d:pP:F", ops, 0)) !=
-1) {
switch (c) {
case 1:
@ -219,6 +220,9 @@ void ConfigReader::read(Config* cfg, int argc, char** argv) {
case 16:
cfg->gaussianNoise = atof(optarg);
break;
case 'F':
cfg->parseAdditionalGTFSFields = true;
break;
case 'v':
std::cout << "pfaedle " << VERSION_FULL << std::endl;
exit(0);

View file

@ -9,6 +9,7 @@
#include <sstream>
#include <string>
#include <vector>
#include "ad/cppgtfs/gtfs/Route.h"
#include "util/geo/Geo.h"
@ -36,6 +37,7 @@ struct Config {
noTrie(false),
noHopCache(false),
writeStats(false),
parseAdditionalGTFSFields(false),
gridSize(2000 / util::geo::M_PER_DEG),
gaussianNoise(0) {}
std::string dbgOutputPath;
@ -62,6 +64,7 @@ struct Config {
bool noTrie;
bool noHopCache;
bool writeStats;
bool parseAdditionalGTFSFields;
double gridSize;
double gaussianNoise;
@ -85,6 +88,7 @@ struct Config {
<< "no-a-star: " << noAStar << "\n"
<< "no-trie: " << noTrie << "\n"
<< "no-hop-cache: " << noHopCache << "\n"
<< "parse-additional-gtfs-fields: " << parseAdditionalGTFSFields << "\n"
<< "write-stats: " << writeStats << "\n"
<< "feed-paths: ";