osrm-backend/include/extractor/extractor_options.hpp
Moritz Kobitzsch 1c1bfd7541 Fix routing when start and target are on the same segment
Fixes issue #1864. Given the simple set-up:

a --> b --> c
^-----------|

This would translate into an edge based graph (ab) -> (bc),
(bc) -> (ca), (ca) -> (ab).

Starting at the end of the one-way street (ab) and going to
the beginning, the query has to find a self-loop within the
graph (ab) -> (bc) -> (ca) -> (ab), as both nodes map to the
same segment (ab).
2016-01-19 23:26:19 +01:00

64 lines
1.6 KiB
C++

#ifndef EXTRACTOR_OPTIONS_HPP
#define EXTRACTOR_OPTIONS_HPP
#include <boost/filesystem/path.hpp>
#include <string>
namespace osrm
{
namespace extractor
{
enum class return_code : unsigned
{
ok,
fail,
exit
};
struct ExtractorConfig
{
ExtractorConfig() : requested_num_threads(0) {}
boost::filesystem::path config_file_path;
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 timestamp_file_name;
std::string geometry_output_path;
std::string edge_output_path;
std::string edge_graph_output_path;
std::string node_output_path;
std::string rtree_nodes_output_path;
std::string rtree_leafs_output_path;
// every edge based node represents a segment in the original graph. During contraciton we need
// to know about this segment length, as we might have to add self-loops in cases of shorter
// parts than the segment represents itself
std::string edge_based_node_weights_output_path;
unsigned requested_num_threads;
unsigned small_component_size;
bool generate_edge_lookup;
std::string edge_penalty_path;
std::string edge_segment_lookup_path;
#ifdef DEBUG_GEOMETRY
std::string debug_turns_path;
#endif
};
struct ExtractorOptions
{
static return_code ParseArguments(int argc, char *argv[], ExtractorConfig &extractor_config);
static void GenerateOutputFilesNames(ExtractorConfig &extractor_config);
};
}
}
#endif // EXTRACTOR_OPTIONS_HPP