Ignore --generate-edge-lookup and not list it anymore

This commit is contained in:
Patrick Niklaus 2017-03-15 23:52:01 +00:00 committed by Patrick Niklaus
parent eb2e4d0aaf
commit 44757729b7
8 changed files with 30 additions and 69 deletions

View File

@ -4,6 +4,8 @@
- Shared memory notification via conditional variables on Linux or semaphore queue on OS X and Windows with a limit of 128 OSRM Engine instances
- Files
- .osrm.datasource_index file was removed. Data is now part of .osrm.geometries.
- .osrm.edge_lookup was removed. The option `--generate-edge-lookup` does nothing now.
- `osrm-contract` does not depend on the `.osrm.fileIndex` file anymore
# 5.6.3
- Changes from 5.6.0

View File

@ -22,8 +22,8 @@ Feature: osrm-contract command line option: edge-weight-updates-over-factor
Scenario: Logging weight with updates over factor of 2, long segment
When I run "osrm-extract --profile {profile_file} {osm_file} --generate-edge-lookup"
When I run "osrm-contract --edge-weight-updates-over-factor 2 --segment-speed-file {speeds_file} {processed_file}"
And stderr should contain "weight updates"
And stderr should contain "New speed: 100 kph"
And stderr should contain "Segment: 1,2"
And stderr should contain "Segment: 1,3"
And I route I should get
| from | to | route | speed |
| a | b | ab,ab | 100 km/h |

View File

@ -1,28 +0,0 @@
@prepare @options @invalid
Feature: osrm-contract command line options: invalid options
Background:
Given the profile "testbot"
And the node map
"""
a b
"""
And the ways
| nodes |
| ab |
And the data has been extracted
Scenario: osrm-contract - Non-existing option
When I try to run "osrm-contract --fly-me-to-the-moon"
Then stdout should be empty
And stderr should contain "option"
And stderr should contain "fly-me-to-the-moon"
And it should exit with an error
# This tests the error messages when you try to use --segment-speed-file,
# but osrm-extract has not been run with --generate-edge-lookup
Scenario: osrm-contract - Someone forgot --generate-edge-lookup on osrm-extract
When I try to run "osrm-contract --segment-speed-file /dev/null {processed_file}"
Then stderr should contain "Error while trying to mmap"
Then stderr should contain ".osrm.turn_penalties_index"
And it should exit with an error

View File

@ -14,7 +14,6 @@ Feature: osrm-extract command line options: help
And stdout should contain "Configuration:"
And stdout should contain "--profile"
And stdout should contain "--threads"
And stdout should contain "--generate-edge-lookup"
And stdout should contain "--small-component-size"
And it should exit successfully
@ -28,7 +27,6 @@ Feature: osrm-extract command line options: help
And stdout should contain "Configuration:"
And stdout should contain "--profile"
And stdout should contain "--threads"
And stdout should contain "--generate-edge-lookup"
And stdout should contain "--small-component-size"
And it should exit successfully
@ -42,6 +40,5 @@ Feature: osrm-extract command line options: help
And stdout should contain "Configuration:"
And stdout should contain "--profile"
And stdout should contain "--threads"
And stdout should contain "--generate-edge-lookup"
And stdout should contain "--small-component-size"
And it should exit successfully

View File

@ -84,8 +84,7 @@ class EdgeBasedGraphFactory
const std::string &turn_weight_penalties_filename,
const std::string &turn_duration_penalties_filename,
const std::string &turn_penalties_index_filename,
const std::string &cnbg_ebg_mapping_path,
const bool generate_edge_lookup);
const std::string &cnbg_ebg_mapping_path);
// The following get access functions destroy the content in the factory
void GetEdgeBasedEdges(util::DeallocatingVector<EdgeBasedEdge> &edges);
@ -152,8 +151,7 @@ class EdgeBasedGraphFactory
const std::string &turn_lane_data_filename,
const std::string &turn_weight_penalties_filename,
const std::string &turn_duration_penalties_filename,
const std::string &turn_penalties_index_filename,
const bool generate_edge_lookup);
const std::string &turn_penalties_index_filename);
// Mapping betweenn the node based graph u,v nodes and the edge based graph head,tail edge ids.
// Required in the osrm-partition tool to translate from a nbg partition to a ebg partition.

View File

@ -199,8 +199,7 @@ void EdgeBasedGraphFactory::Run(ScriptingEnvironment &scripting_environment,
const std::string &turn_weight_penalties_filename,
const std::string &turn_duration_penalties_filename,
const std::string &turn_penalties_index_filename,
const std::string &cnbg_ebg_mapping_path,
const bool generate_edge_lookup)
const std::string &cnbg_ebg_mapping_path)
{
TIMER_START(renumber);
m_max_edge_id = RenumberEdges() - 1;
@ -217,8 +216,7 @@ void EdgeBasedGraphFactory::Run(ScriptingEnvironment &scripting_environment,
turn_lane_data_filename,
turn_weight_penalties_filename,
turn_duration_penalties_filename,
turn_penalties_index_filename,
generate_edge_lookup);
turn_penalties_index_filename);
TIMER_STOP(generate_edges);
@ -330,8 +328,7 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
const std::string &turn_lane_data_filename,
const std::string &turn_weight_penalties_filename,
const std::string &turn_duration_penalties_filename,
const std::string &turn_penalties_index_filename,
const bool generate_edge_lookup)
const std::string &turn_penalties_index_filename)
{
util::Log() << "Generating edge-expanded edges ";
@ -584,27 +581,24 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
// look
// up the node
// immediately preceding the turn from the compressed edge container.
if (generate_edge_lookup)
{
const bool isTrivial = m_compressed_edge_container.IsTrivial(incoming_edge);
const bool isTrivial = m_compressed_edge_container.IsTrivial(incoming_edge);
const auto &from_node =
isTrivial
? m_node_info_list[node_along_road_entering]
: m_node_info_list[m_compressed_edge_container.GetLastEdgeSourceID(
incoming_edge)];
const auto &via_node =
m_node_info_list[m_compressed_edge_container.GetLastEdgeTargetID(
incoming_edge)];
const auto &to_node =
m_node_info_list[m_compressed_edge_container.GetFirstEdgeTargetID(
turn.eid)];
const auto &from_node =
isTrivial
? m_node_info_list[node_along_road_entering]
: m_node_info_list[m_compressed_edge_container.GetLastEdgeSourceID(
incoming_edge)];
const auto &via_node =
m_node_info_list[m_compressed_edge_container.GetLastEdgeTargetID(
incoming_edge)];
const auto &to_node =
m_node_info_list[m_compressed_edge_container.GetFirstEdgeTargetID(
turn.eid)];
lookup::TurnIndexBlock turn_index_block = {
from_node.node_id, via_node.node_id, to_node.node_id};
lookup::TurnIndexBlock turn_index_block = {
from_node.node_id, via_node.node_id, to_node.node_id};
turn_penalties_index_file.WriteOne(turn_index_block);
}
turn_penalties_index_file.WriteOne(turn_index_block);
}
}
}

View File

@ -486,8 +486,7 @@ Extractor::BuildEdgeExpandedGraph(ScriptingEnvironment &scripting_environment,
config.turn_weight_penalties_path,
config.turn_duration_penalties_path,
config.turn_penalties_index_path,
config.cnbg_ebg_graph_mapping_output_path,
config.generate_edge_lookup);
config.cnbg_ebg_graph_mapping_output_path);
// The osrm-partition tool requires the compressed node based graph with an embedding.
//

View File

@ -41,11 +41,6 @@ return_code parseArguments(int argc, char *argv[], extractor::ExtractorConfig &e
boost::program_options::value<unsigned int>(&extractor_config.requested_num_threads)
->default_value(tbb::task_scheduler_init::default_num_threads()),
"Number of threads to use")(
"generate-edge-lookup",
boost::program_options::value<bool>(&extractor_config.generate_edge_lookup)
->implicit_value(true)
->default_value(false),
"Generate a lookup table for internal edge-expanded-edge IDs to OSM node pairs")(
"small-component-size",
boost::program_options::value<unsigned int>(&extractor_config.small_component_size)
->default_value(1000),
@ -57,13 +52,17 @@ return_code parseArguments(int argc, char *argv[], extractor::ExtractorConfig &e
->default_value(false),
"Use metada during osm parsing (This can affect the extraction performance).");
bool dummy;
// 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");
hidden_options.add_options()(
"input,i",
boost::program_options::value<boost::filesystem::path>(&extractor_config.input_path),
"Input file in .osm, .osm.bz2 or .osm.pbf format");
"Input file in .osm, .osm.bz2 or .osm.pbf format")(
"generate-edge-lookup",
boost::program_options::value<bool>(&dummy)->implicit_value(true)->default_value(false),
"Not used anymore");
// positional option
boost::program_options::positional_options_description positional_options;