superclass extractor_config with io_config
This commit is contained in:
committed by
Daniel J. H
parent
897518a297
commit
1b31099f73
@@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#ifndef CONTRACTOR_OPTIONS_HPP
|
||||
#define CONTRACTOR_OPTIONS_HPP
|
||||
|
||||
#include "storage/storage_config.hpp"
|
||||
#include "storage/io_config.hpp"
|
||||
#include "updater/updater_config.hpp"
|
||||
|
||||
#include <boost/filesystem/path.hpp>
|
||||
|
||||
@@ -57,9 +57,9 @@ class ExtractionContainers
|
||||
ExtractionContainers();
|
||||
|
||||
void PrepareData(ScriptingEnvironment &scripting_environment,
|
||||
const std::string &output_file_name,
|
||||
const std::string &osrm_input_path,
|
||||
const std::string &restrictions_file_name,
|
||||
const std::string &names_file_name);
|
||||
const std::string &names_data_path);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,14 +33,17 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <array>
|
||||
#include <string>
|
||||
|
||||
#include "storage/io_config.hpp"
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace extractor
|
||||
{
|
||||
|
||||
struct ExtractorConfig
|
||||
struct ExtractorConfig final : storage::IOConfig
|
||||
{
|
||||
ExtractorConfig() noexcept : requested_num_threads(0) {}
|
||||
|
||||
void UseDefaultOutputNames()
|
||||
{
|
||||
std::string basepath = input_path.string();
|
||||
@@ -58,58 +61,18 @@ struct ExtractorConfig
|
||||
}
|
||||
}
|
||||
|
||||
output_file_name = basepath + ".osrm";
|
||||
restriction_file_name = basepath + ".osrm.restrictions";
|
||||
names_file_name = basepath + ".osrm.names";
|
||||
turn_lane_descriptions_file_name = basepath + ".osrm.tls";
|
||||
turn_lane_data_file_name = basepath + ".osrm.tld";
|
||||
timestamp_file_name = basepath + ".osrm.timestamp";
|
||||
geometry_output_path = basepath + ".osrm.geometry";
|
||||
node_based_nodes_data_path = basepath + ".osrm.nbg_nodes";
|
||||
edge_based_nodes_data_path = basepath + ".osrm.ebg_nodes";
|
||||
edge_output_path = basepath + ".osrm.edges";
|
||||
edge_graph_output_path = basepath + ".osrm.ebg";
|
||||
rtree_nodes_output_path = basepath + ".osrm.ramIndex";
|
||||
rtree_leafs_output_path = basepath + ".osrm.fileIndex";
|
||||
turn_duration_penalties_path = basepath + ".osrm.turn_duration_penalties";
|
||||
turn_weight_penalties_path = basepath + ".osrm.turn_weight_penalties";
|
||||
turn_penalties_index_path = basepath + ".osrm.turn_penalties_index";
|
||||
edge_based_node_weights_output_path = basepath + ".osrm.enw";
|
||||
profile_properties_output_path = basepath + ".osrm.properties";
|
||||
intersection_class_data_output_path = basepath + ".osrm.icd";
|
||||
compressed_node_based_graph_output_path = basepath + ".osrm.cnbg";
|
||||
cnbg_ebg_graph_mapping_output_path = basepath + ".osrm.cnbg_to_ebg";
|
||||
osrm_input_path = basepath + ".osrm";
|
||||
|
||||
IOConfig::UseDefaultOutputNames();
|
||||
}
|
||||
|
||||
boost::filesystem::path input_path;
|
||||
boost::filesystem::path profile_path;
|
||||
|
||||
std::string output_file_name;
|
||||
std::string restriction_file_name;
|
||||
std::string names_file_name;
|
||||
std::string turn_lane_data_file_name;
|
||||
std::string turn_lane_descriptions_file_name;
|
||||
std::string timestamp_file_name;
|
||||
std::string geometry_output_path;
|
||||
std::string edge_output_path;
|
||||
std::string edge_graph_output_path;
|
||||
std::string node_based_nodes_data_path;
|
||||
std::string edge_based_nodes_data_path;
|
||||
std::string edge_based_node_weights_output_path;
|
||||
std::string rtree_nodes_output_path;
|
||||
std::string rtree_leafs_output_path;
|
||||
std::string profile_properties_output_path;
|
||||
std::string intersection_class_data_output_path;
|
||||
std::string turn_weight_penalties_path;
|
||||
std::string turn_duration_penalties_path;
|
||||
std::string compressed_node_based_graph_output_path;
|
||||
std::string cnbg_ebg_graph_mapping_output_path;
|
||||
|
||||
unsigned requested_num_threads;
|
||||
unsigned small_component_size;
|
||||
|
||||
bool generate_edge_lookup;
|
||||
std::string turn_penalties_index_path;
|
||||
|
||||
bool use_metadata;
|
||||
bool parse_conditionals;
|
||||
|
||||
@@ -41,9 +41,12 @@ struct IOConfig
|
||||
mld_graph_path = {osrm_input_path.string() + ".mldgr"};
|
||||
level_path = {osrm_input_path.string() + ".level"};
|
||||
node_path = {osrm_input_path.string() + ".enw"};
|
||||
edge_based_nodes_data_path = {osrm_input_path.string() + ".nodes_data"};
|
||||
edge_based_graph_path = {osrm_input_path.string() + ".ebg"};
|
||||
compressed_node_based_graph_path = {osrm_input_path.string() + ".cnbg"};
|
||||
cnbg_ebg_mapping_path = {osrm_input_path.string() + ".cnbg_to_ebg"};
|
||||
restriction_path = {osrm_input_path.string() + ".restrictions"};
|
||||
intersection_class_data_path = {osrm_input_path.string() + ".icd"};
|
||||
}
|
||||
|
||||
boost::filesystem::path osrm_input_path;
|
||||
@@ -71,9 +74,12 @@ struct IOConfig
|
||||
boost::filesystem::path mld_graph_path;
|
||||
boost::filesystem::path level_path;
|
||||
boost::filesystem::path node_path;
|
||||
boost::filesystem::path edge_based_nodes_data_path;
|
||||
boost::filesystem::path edge_based_graph_path;
|
||||
boost::filesystem::path compressed_node_based_graph_path;
|
||||
boost::filesystem::path cnbg_ebg_mapping_path;
|
||||
boost::filesystem::path restriction_path;
|
||||
boost::filesystem::path intersection_class_data_path;
|
||||
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user