mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-23 22:53:43 +00:00
[traffic] Remove obsolete code, fixes regression from 645ca792
Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
@@ -207,8 +207,6 @@ set(SRC
|
||||
tesselator.hpp
|
||||
towns_dumper.cpp
|
||||
towns_dumper.hpp
|
||||
traffic_generator.cpp
|
||||
traffic_generator.hpp
|
||||
transit_generator.cpp
|
||||
transit_generator.hpp
|
||||
transit_generator_experimental.cpp
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "generator/routing_world_roads_generator.hpp"
|
||||
#include "generator/search_index_builder.hpp"
|
||||
#include "generator/statistics.hpp"
|
||||
#include "generator/traffic_generator.hpp"
|
||||
#include "generator/transit_generator.hpp"
|
||||
#include "generator/transit_generator_experimental.hpp"
|
||||
#include "generator/unpack_mwm.hpp"
|
||||
@@ -171,7 +170,6 @@ DEFINE_string(unpack_borders, "", "Convert packed_polygons to a directory of pol
|
||||
DEFINE_bool(unpack_mwm, false, "Unpack each section of mwm into a separate file with name filePath.sectionName.");
|
||||
DEFINE_bool(check_mwm, false, "Check map file to be correct.");
|
||||
DEFINE_string(delete_section, "", "Delete specified section (defines.hpp) from container.");
|
||||
DEFINE_bool(generate_traffic_keys, false, "Generate keys for the traffic map (road segment -> speed group).");
|
||||
|
||||
DEFINE_bool(dump_mwm_tmp, false, "Prints feature builder objects from .mwm.tmp");
|
||||
|
||||
@@ -546,12 +544,6 @@ MAIN_WITH_ERROR_HANDLING([](int argc, char ** argv)
|
||||
BuildPopularPlacesFromDescriptions(dataFile);
|
||||
}
|
||||
}
|
||||
|
||||
if (FLAGS_generate_traffic_keys)
|
||||
{
|
||||
if (!traffic::GenerateTrafficKeysFromDataFile(dataFile))
|
||||
LOG(LCRITICAL, ("Error generating traffic keys."));
|
||||
}
|
||||
}
|
||||
|
||||
string const dataFile = base::JoinPath(path, FLAGS_output + DATA_FILE_EXTENSION);
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
#include "generator/traffic_generator.hpp"
|
||||
|
||||
#include "routing/routing_helpers.hpp"
|
||||
|
||||
#include "traffic/traffic_info.hpp"
|
||||
|
||||
#include "routing_common/car_model.hpp"
|
||||
|
||||
#include "platform/mwm_traits.hpp"
|
||||
|
||||
#include "indexer/feature_algo.hpp"
|
||||
#include "indexer/feature_processor.hpp"
|
||||
#include "indexer/features_offsets_table.hpp"
|
||||
|
||||
#include "coding/file_writer.hpp"
|
||||
#include "coding/files_container.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace traffic
|
||||
{
|
||||
bool GenerateTrafficKeysFromDataFile(std::string const & mwmPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
std::vector<TrafficInfo::RoadSegmentId> keys;
|
||||
TrafficInfo::ExtractTrafficKeys(mwmPath, keys);
|
||||
|
||||
std::vector<uint8_t> buf;
|
||||
TrafficInfo::SerializeTrafficKeys(keys, buf);
|
||||
|
||||
FilesContainerW writeContainer(mwmPath, FileWriter::OP_WRITE_EXISTING);
|
||||
auto writer = writeContainer.GetWriter(TRAFFIC_KEYS_FILE_TAG);
|
||||
writer->Write(buf.data(), buf.size());
|
||||
}
|
||||
catch (RootException const & e)
|
||||
{
|
||||
LOG(LERROR, ("Failed to build traffic keys:", e.Msg()));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
} // namespace traffic
|
||||
@@ -1,8 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace traffic
|
||||
{
|
||||
bool GenerateTrafficKeysFromDataFile(std::string const & mwmPath);
|
||||
} // namespace traffic
|
||||
Reference in New Issue
Block a user