Remove GeoJSON based debugging output, we can now generate vector tiles with roughly the same data on-the-fly.

This commit is contained in:
Daniel Patterson
2016-02-20 00:48:35 -08:00
committed by Patrick Niklaus
parent ae802a8a83
commit 56e35e8ef2
9 changed files with 0 additions and 354 deletions
-11
View File
@@ -32,8 +32,6 @@
#include <thread>
#include <vector>
#include "util/debug_geometry.hpp"
namespace std
{
@@ -188,8 +186,6 @@ std::size_t Contractor::LoadEdgeExpandedGraph(
}
}
util::DEBUG_GEOMETRY_START(config);
// TODO: can we read this in bulk? util::DeallocatingVector isn't necessarily
// all stored contiguously
for (; number_of_edges > 0; --number_of_edges)
@@ -235,17 +231,11 @@ std::size_t Contractor::LoadEdgeExpandedGraph(
std::max(1, static_cast<int>(std::floor(
(segment_length * 10.) / (speed_iter->second / 3.6) + .5)));
new_weight += new_segment_weight;
util::DEBUG_GEOMETRY_EDGE(new_segment_weight, segment_length,
previous_osm_node_id, this_osm_node_id);
}
else
{
// If no lookup found, use the original weight value for this segment
new_weight += segment_weight;
util::DEBUG_GEOMETRY_EDGE(segment_weight, segment_length, previous_osm_node_id,
this_osm_node_id);
}
previous_osm_node_id = this_osm_node_id;
@@ -257,7 +247,6 @@ std::size_t Contractor::LoadEdgeExpandedGraph(
edge_based_edge_list.emplace_back(std::move(inbuffer));
}
util::DEBUG_GEOMETRY_STOP();
util::SimpleLogger().Write() << "Done reading edges";
return max_edge_id;
}
@@ -9,8 +9,6 @@
#include "util/timing_util.hpp"
#include "util/exception.hpp"
#include "util/debug_geometry.hpp"
#include <boost/assert.hpp>
#include <algorithm>
@@ -244,20 +242,11 @@ void EdgeBasedGraphFactory::FlushVectorToStream(
original_edge_data_vector.clear();
}
#ifdef DEBUG_GEOMETRY
void EdgeBasedGraphFactory::Run(const std::string &original_edge_data_filename,
lua_State *lua_state,
const std::string &edge_segment_lookup_filename,
const std::string &edge_penalty_filename,
const bool generate_edge_lookup,
const std::string &debug_turns_path)
#else
void EdgeBasedGraphFactory::Run(const std::string &original_edge_data_filename,
lua_State *lua_state,
const std::string &edge_segment_lookup_filename,
const std::string &edge_penalty_filename,
const bool generate_edge_lookup)
#endif
{
TIMER_START(renumber);
m_max_edge_id = RenumberEdges() - 1;
@@ -269,13 +258,8 @@ void EdgeBasedGraphFactory::Run(const std::string &original_edge_data_filename,
TIMER_STOP(generate_nodes);
TIMER_START(generate_edges);
#ifdef DEBUG_GEOMETRY
GenerateEdgeExpandedEdges(original_edge_data_filename, lua_state, edge_segment_lookup_filename,
edge_penalty_filename, generate_edge_lookup, debug_turns_path);
#else
GenerateEdgeExpandedEdges(original_edge_data_filename, lua_state, edge_segment_lookup_filename,
edge_penalty_filename, generate_edge_lookup);
#endif
TIMER_STOP(generate_edges);
@@ -367,22 +351,12 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedNodes()
}
/// Actually it also generates OriginalEdgeData and serializes them...
#ifdef DEBUG_GEOMETRY
void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
const std::string &original_edge_data_filename,
lua_State *lua_state,
const std::string &edge_segment_lookup_filename,
const std::string &edge_fixed_penalties_filename,
const bool generate_edge_lookup,
const std::string &debug_turns_path)
#else
void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
const std::string &original_edge_data_filename,
lua_State *lua_state,
const std::string &edge_segment_lookup_filename,
const std::string &edge_fixed_penalties_filename,
const bool generate_edge_lookup)
#endif
{
util::SimpleLogger().Write() << "generating edge-expanded edges";
@@ -414,10 +388,6 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
// linear number of turns only.
util::Percent progress(m_node_based_graph->GetNumberOfNodes());
#ifdef DEBUG_GEOMETRY
util::DEBUG_TURNS_START(debug_turns_path);
#endif
for (const auto node_u : util::irange(0u, m_node_based_graph->GetNumberOfNodes()))
{
// progress.printStatus(node_u);
@@ -455,9 +425,6 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
if (m_traffic_lights.find(node_v) != m_traffic_lights.end())
{
distance += speed_profile.traffic_signal_penalty;
util::DEBUG_SIGNAL(node_v, m_node_info_list,
speed_profile.traffic_signal_penalty);
}
const int turn_penalty = GetTurnPenalty(turn_angle, lua_state);
@@ -466,8 +433,6 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
if (turn_instruction == TurnInstruction::UTurn)
{
distance += speed_profile.u_turn_penalty;
util::DEBUG_UTURN(node_v, m_node_info_list, speed_profile.u_turn_penalty);
}
distance += turn_penalty;
@@ -575,8 +540,6 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
}
}
util::DEBUG_TURNS_STOP();
FlushVectorToStream(edge_data_file, original_edge_data_vector);
edge_data_file.seekp(std::ios::beg);
-7
View File
@@ -46,13 +46,6 @@ return_code parseArguments(int argc, char *argv[], contractor::ContractorConfig
->default_value(false),
"Use .level file to retain the contaction level for each node from the last run.");
#ifdef DEBUG_GEOMETRY
config_options.add_options()(
"debug-geometry",
boost::program_options::value<std::string>(&contractor_config.debug_geometry_path),
"Write out edge-weight debugging geometry data in GeoJSON format to this file");
#endif
// 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>(
-6
View File
@@ -49,12 +49,6 @@ return_code parseArguments(int argc, char *argv[], extractor::ExtractorConfig &e
"Number of nodes required before a strongly-connected-componennt is considered big "
"(affects nearest neighbor snapping)");
#ifdef DEBUG_GEOMETRY
config_options.add_options()("debug-turns", boost::program_options::value<std::string>(
&extractor_config.debug_turns_path),
"Write out GeoJSON with turn penalty data");
#endif // DEBUG_GEOMETRY
// 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");