Conditional turn restriction support (#3841)
* optionally include condition and via node coords in InputRestrictionContainer * only write conditionals to disk, custom serialization for restrictions * conditional turn lookup, reuse timezone validation from extract-conditionals * adapt updater to use coordinates/osm ids, remove internal to external map * add utc time now parameter to contraction * only compile timezone code where libshp is found, adapt test running * slight refactor, more tests * catch invalid via nodes in restriction parsing, set default cucumber origin to guinée * add another run to test mld routed paths * cosmetic review changes * Simplify Timezoner for windows build * Split declaration and parsing parts for opening hours * adjust conditional tests to run without shapefiles * always include parse conditionals option * Adjust travis timeout * Added dummy TZ shapefile with test timezone polygons * [skip ci] update changelog
This commit is contained in:
+19
-1
@@ -2,6 +2,7 @@
|
||||
#include "osrm/contractor.hpp"
|
||||
#include "osrm/contractor_config.hpp"
|
||||
#include "util/log.hpp"
|
||||
#include "util/timezones.hpp"
|
||||
#include "util/version.hpp"
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
@@ -61,7 +62,24 @@ return_code parseArguments(int argc, char *argv[], contractor::ContractorConfig
|
||||
&contractor_config.updater_config.log_edge_updates_factor)
|
||||
->default_value(0.0),
|
||||
"Use with `--segment-speed-file`. Provide an `x` factor, by which Extractor will log edge "
|
||||
"weights updated by more than this factor");
|
||||
"weights updated by more than this factor")(
|
||||
"parse-conditionals-from-now",
|
||||
boost::program_options::value<std::time_t>(&contractor_config.updater_config.valid_now)
|
||||
->default_value(0),
|
||||
"Optional for conditional turn restriction parsing, provide a UTC time stamp from "
|
||||
"which "
|
||||
"to evaluate the validity of conditional turn restrictions");
|
||||
|
||||
if (updater::SupportsShapefiles())
|
||||
{
|
||||
config_options.add_options()("time-zone-file",
|
||||
boost::program_options::value<std::string>(
|
||||
&contractor_config.updater_config.tz_file_path)
|
||||
->default_value(""),
|
||||
"Required for conditional turn restriction parsing, provide a "
|
||||
"shp or dbf file containing "
|
||||
"time zone boundaries");
|
||||
}
|
||||
|
||||
// hidden options, will be allowed on command line, but will not be shown to the user
|
||||
boost::program_options::options_description hidden_options("Hidden options");
|
||||
|
||||
Reference in New Issue
Block a user