2015-06-23 19:55:30 -04:00
|
|
|
#ifndef GEOMETRY_COMPRESSOR_HPP
|
|
|
|
#define GEOMETRY_COMPRESSOR_HPP
|
|
|
|
|
2017-07-20 08:03:39 -04:00
|
|
|
#include "extractor/scripting_environment.hpp"
|
2016-01-02 11:13:44 -05:00
|
|
|
#include "util/typedefs.hpp"
|
2015-06-23 19:55:30 -04:00
|
|
|
|
2016-01-02 11:13:44 -05:00
|
|
|
#include "util/node_based_graph.hpp"
|
2015-06-23 19:55:30 -04:00
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <unordered_set>
|
2017-07-06 11:09:24 -04:00
|
|
|
#include <vector>
|
2015-06-23 19:55:30 -04:00
|
|
|
|
2016-01-05 10:51:13 -05:00
|
|
|
namespace osrm
|
|
|
|
{
|
|
|
|
namespace extractor
|
|
|
|
{
|
|
|
|
|
2015-06-24 13:55:36 -04:00
|
|
|
class CompressedEdgeContainer;
|
2017-07-06 11:09:24 -04:00
|
|
|
struct TurnRestriction;
|
2022-08-24 11:19:24 -04:00
|
|
|
struct UnresolvedManeuverOverride;
|
2015-06-23 19:55:30 -04:00
|
|
|
|
|
|
|
class GraphCompressor
|
|
|
|
{
|
2016-01-05 10:51:13 -05:00
|
|
|
using EdgeData = util::NodeBasedDynamicGraph::EdgeData;
|
2015-06-23 19:55:30 -04:00
|
|
|
|
2016-01-05 06:04:04 -05:00
|
|
|
public:
|
|
|
|
void Compress(const std::unordered_set<NodeID> &barrier_nodes,
|
|
|
|
const std::unordered_set<NodeID> &traffic_lights,
|
2017-07-20 08:03:39 -04:00
|
|
|
ScriptingEnvironment &scripting_environment,
|
2017-07-06 11:09:24 -04:00
|
|
|
std::vector<TurnRestriction> &turn_restrictions,
|
2018-02-09 13:32:09 -05:00
|
|
|
std::vector<UnresolvedManeuverOverride> &maneuver_overrides,
|
2016-01-05 10:51:13 -05:00
|
|
|
util::NodeBasedDynamicGraph &graph,
|
2017-09-25 09:37:11 -04:00
|
|
|
const std::vector<NodeBasedEdgeAnnotation> &node_data_container,
|
2016-01-05 06:04:04 -05:00
|
|
|
CompressedEdgeContainer &geometry_compressor);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void PrintStatistics(unsigned original_number_of_nodes,
|
|
|
|
unsigned original_number_of_edges,
|
2016-01-05 10:51:13 -05:00
|
|
|
const util::NodeBasedDynamicGraph &graph) const;
|
2015-06-23 19:55:30 -04:00
|
|
|
};
|
2020-11-26 10:21:39 -05:00
|
|
|
} // namespace extractor
|
|
|
|
} // namespace osrm
|
2016-01-05 10:51:13 -05:00
|
|
|
|
2015-06-23 19:55:30 -04:00
|
|
|
#endif
|