Split QueryNode into coordinates and osm id
This commit is contained in:
parent
786a3d8919
commit
7f6e0c478b
@ -204,8 +204,7 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade
|
||||
using super = BaseDataFacade;
|
||||
using IndexBlock = util::RangeTable<16, storage::Ownership::View>::BlockT;
|
||||
using RTreeLeaf = super::RTreeLeaf;
|
||||
using SharedRTree =
|
||||
util::StaticRTree<RTreeLeaf, util::vector_view<util::Coordinate>, storage::Ownership::View>;
|
||||
using SharedRTree = util::StaticRTree<RTreeLeaf, storage::Ownership::View>;
|
||||
using SharedGeospatialQuery = GeospatialQuery<SharedRTree, BaseDataFacade>;
|
||||
using RTreeNode = SharedRTree::TreeNode;
|
||||
|
||||
@ -215,7 +214,7 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade
|
||||
|
||||
unsigned m_check_sum;
|
||||
util::vector_view<util::Coordinate> m_coordinate_list;
|
||||
util::PackedVector<OSMNodeID, storage::Ownership::View> m_osmnodeid_list;
|
||||
util::PackedVectorView<OSMNodeID> m_osmnodeid_list;
|
||||
util::NameTable m_names_table;
|
||||
util::vector_view<std::uint32_t> m_lane_description_offsets;
|
||||
util::vector_view<extractor::guidance::TurnLaneType::Mask> m_lane_description_masks;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "extractor/restriction_map.hpp"
|
||||
|
||||
#include "util/deallocating_vector.hpp"
|
||||
#include "util/packed_vector.hpp"
|
||||
#include "util/guidance/bearing_class.hpp"
|
||||
#include "util/guidance/entry_class.hpp"
|
||||
#include "util/name_table.hpp"
|
||||
@ -72,7 +73,8 @@ class EdgeBasedGraphFactory
|
||||
const std::unordered_set<NodeID> &barrier_nodes,
|
||||
const std::unordered_set<NodeID> &traffic_lights,
|
||||
std::shared_ptr<const RestrictionMap> restriction_map,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const util::PackedVector<OSMNodeID> &osm_node_ids,
|
||||
ProfileProperties profile_properties,
|
||||
const util::NameTable &name_table,
|
||||
std::vector<std::uint32_t> &turn_lane_offsets,
|
||||
@ -128,7 +130,8 @@ class EdgeBasedGraphFactory
|
||||
util::DeallocatingVector<EdgeBasedEdge> m_edge_based_edge_list;
|
||||
EdgeID m_max_edge_id;
|
||||
|
||||
const std::vector<QueryNode> &m_node_info_list;
|
||||
const std::vector<util::Coordinate> &m_coordinates;
|
||||
const util::PackedVector<OSMNodeID> &m_osm_node_ids;
|
||||
std::shared_ptr<util::NodeBasedDynamicGraph> m_node_based_graph;
|
||||
std::shared_ptr<RestrictionMap const> m_restriction_map;
|
||||
|
||||
|
@ -58,7 +58,8 @@ class Extractor
|
||||
|
||||
std::pair<std::size_t, EdgeID>
|
||||
BuildEdgeExpandedGraph(ScriptingEnvironment &scripting_environment,
|
||||
std::vector<QueryNode> &internal_to_external_node_map,
|
||||
std::vector<util::Coordinate> &coordinates,
|
||||
util::PackedVector<OSMNodeID> &osm_node_ids,
|
||||
std::vector<EdgeBasedNode> &node_based_edge_list,
|
||||
std::vector<bool> &node_is_startpoint,
|
||||
std::vector<EdgeWeight> &edge_based_node_weights,
|
||||
@ -66,18 +67,18 @@ class Extractor
|
||||
const std::string &intersection_class_output_file);
|
||||
void WriteProfileProperties(const std::string &output_path,
|
||||
const ProfileProperties &properties) const;
|
||||
void WriteNodeMapping(const std::vector<QueryNode> &internal_to_external_node_map);
|
||||
void FindComponents(unsigned max_edge_id,
|
||||
const util::DeallocatingVector<EdgeBasedEdge> &edges,
|
||||
std::vector<EdgeBasedNode> &nodes) const;
|
||||
void BuildRTree(std::vector<EdgeBasedNode> node_based_edge_list,
|
||||
std::vector<bool> node_is_startpoint,
|
||||
const std::vector<QueryNode> &internal_to_external_node_map);
|
||||
const std::vector<util::Coordinate> &coordinates);
|
||||
std::shared_ptr<RestrictionMap> LoadRestrictionMap();
|
||||
std::shared_ptr<util::NodeBasedDynamicGraph>
|
||||
LoadNodeBasedGraph(std::unordered_set<NodeID> &barrier_nodes,
|
||||
std::unordered_set<NodeID> &traffic_lights,
|
||||
std::vector<QueryNode> &internal_to_external_node_map);
|
||||
std::vector<util::Coordinate> &coordinates,
|
||||
util::PackedVector<OSMNodeID> &osm_node_ids);
|
||||
|
||||
void WriteEdgeBasedGraph(const std::string &output_file_filename,
|
||||
const EdgeID max_edge_id,
|
||||
@ -94,7 +95,7 @@ class Extractor
|
||||
// Writes compressed node based graph and its embedding into a file for osrm-partition to use.
|
||||
static void WriteCompressedNodeBasedGraph(const std::string &path,
|
||||
const util::NodeBasedDynamicGraph &graph,
|
||||
const std::vector<QueryNode> &externals);
|
||||
const std::vector<util::Coordinate> &coordiantes);
|
||||
|
||||
// globals persisting during the extraction process and the graph generation process
|
||||
|
||||
|
@ -4,6 +4,10 @@
|
||||
#include "extractor/guidance/turn_lane_types.hpp"
|
||||
#include "extractor/seralization.hpp"
|
||||
|
||||
#include "util/coordinate.hpp"
|
||||
#include "util/packed_vector.hpp"
|
||||
#include "util/serialization.hpp"
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
namespace osrm
|
||||
@ -13,6 +17,32 @@ namespace extractor
|
||||
namespace files
|
||||
{
|
||||
|
||||
// reads .osrm.nodes
|
||||
template<storage::Ownership Ownership>
|
||||
inline void readNodes(const boost::filesystem::path &path,
|
||||
typename util::ShM<util::Coordinate, Ownership>::vector &coordinates,
|
||||
util::detail::PackedVector<OSMNodeID, Ownership> &osm_node_ids)
|
||||
{
|
||||
const auto fingerprint = storage::io::FileReader::VerifyFingerprint;
|
||||
storage::io::FileReader reader{path, fingerprint};
|
||||
|
||||
reader.DeserializeVector(coordinates);
|
||||
util::serialization::read(reader, osm_node_ids);
|
||||
}
|
||||
|
||||
// writes .osrm.nodes
|
||||
template<storage::Ownership Ownership>
|
||||
inline void writeNodes(const boost::filesystem::path &path,
|
||||
const typename util::ShM<util::Coordinate, Ownership>::vector &coordinates,
|
||||
const util::detail::PackedVector<OSMNodeID, Ownership> &osm_node_ids)
|
||||
{
|
||||
const auto fingerprint = storage::io::FileWriter::GenerateFingerprint;
|
||||
storage::io::FileWriter writer{path, fingerprint};
|
||||
|
||||
writer.SerializeVector(coordinates);
|
||||
util::serialization::write(writer, osm_node_ids);
|
||||
}
|
||||
|
||||
// reads .osrm.cnbg_to_ebg
|
||||
inline void readNBGMapping(const boost::filesystem::path &path, std::vector<NBGToEBG> &mapping)
|
||||
{
|
||||
|
@ -23,7 +23,7 @@ class CoordinateExtractor
|
||||
public:
|
||||
CoordinateExtractor(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const extractor::CompressedEdgeContainer &compressed_geometries,
|
||||
const std::vector<extractor::QueryNode> &node_coordinates);
|
||||
const std::vector<util::Coordinate> &node_coordinates);
|
||||
|
||||
/* Find a interpolated coordinate a long the compressed geometries. The desired coordinate
|
||||
* should be in a certain distance. This method is dedicated to find representative coordinates
|
||||
@ -156,7 +156,7 @@ class CoordinateExtractor
|
||||
private:
|
||||
const util::NodeBasedDynamicGraph &node_based_graph;
|
||||
const extractor::CompressedEdgeContainer &compressed_geometries;
|
||||
const std::vector<extractor::QueryNode> &node_coordinates;
|
||||
const std::vector<util::Coordinate> &node_coordinates;
|
||||
|
||||
double ComputeInterpolationFactor(const double desired_distance,
|
||||
const double distance_to_first,
|
||||
|
@ -40,7 +40,7 @@ class IntersectionGenerator
|
||||
IntersectionGenerator(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const RestrictionMap &restriction_map,
|
||||
const std::unordered_set<NodeID> &barrier_nodes,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const CompressedEdgeContainer &compressed_edge_container);
|
||||
|
||||
// For a source node `a` and a via edge `ab` creates an intersection at target `b`.
|
||||
@ -112,7 +112,7 @@ class IntersectionGenerator
|
||||
const util::NodeBasedDynamicGraph &node_based_graph;
|
||||
const RestrictionMap &restriction_map;
|
||||
const std::unordered_set<NodeID> &barrier_nodes;
|
||||
const std::vector<QueryNode> &node_info_list;
|
||||
const std::vector<util::Coordinate> &coordinates;
|
||||
|
||||
// own state, used to find the correct coordinates along a road
|
||||
const CoordinateExtractor coordinate_extractor;
|
||||
|
@ -34,7 +34,7 @@ class IntersectionHandler
|
||||
{
|
||||
public:
|
||||
IntersectionHandler(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table,
|
||||
const IntersectionGenerator &intersection_generator);
|
||||
@ -51,7 +51,7 @@ class IntersectionHandler
|
||||
|
||||
protected:
|
||||
const util::NodeBasedDynamicGraph &node_based_graph;
|
||||
const std::vector<QueryNode> &node_info_list;
|
||||
const std::vector<util::Coordinate> &coordinates;
|
||||
const util::NameTable &name_table;
|
||||
const SuffixTable &street_name_suffix_table;
|
||||
const IntersectionGenerator &intersection_generator;
|
||||
|
@ -43,7 +43,7 @@ class IntersectionNormalizer
|
||||
std::vector<IntersectionNormalizationOperation> performed_merges;
|
||||
};
|
||||
IntersectionNormalizer(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<extractor::QueryNode> &node_coordinates,
|
||||
const std::vector<util::Coordinate> &node_coordinates,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table,
|
||||
const IntersectionGenerator &intersection_generator);
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "extractor/guidance/intersection.hpp"
|
||||
#include "util/node_based_graph.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
#include "util/coordinate.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
@ -22,7 +23,6 @@ class NameTable;
|
||||
namespace extractor
|
||||
{
|
||||
|
||||
struct QueryNode;
|
||||
class SuffixTable;
|
||||
|
||||
namespace guidance
|
||||
@ -37,7 +37,7 @@ class MergableRoadDetector
|
||||
using MergableRoadData = IntersectionShapeData;
|
||||
|
||||
MergableRoadDetector(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<QueryNode> &node_coordinates,
|
||||
const std::vector<util::Coordinate> &node_coordinates,
|
||||
const IntersectionGenerator &intersection_generator,
|
||||
const CoordinateExtractor &coordinate_extractor,
|
||||
const util::NameTable &name_table,
|
||||
@ -138,7 +138,7 @@ class MergableRoadDetector
|
||||
bool IsLinkRoad(const NodeID intersection_node, const MergableRoadData &road) const;
|
||||
|
||||
const util::NodeBasedDynamicGraph &node_based_graph;
|
||||
const std::vector<QueryNode> &node_coordinates;
|
||||
const std::vector<util::Coordinate> &node_coordinates;
|
||||
const IntersectionGenerator &intersection_generator;
|
||||
const CoordinateExtractor &coordinate_extractor;
|
||||
|
||||
|
@ -25,7 +25,7 @@ class MotorwayHandler : public IntersectionHandler
|
||||
{
|
||||
public:
|
||||
MotorwayHandler(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table,
|
||||
const IntersectionGenerator &intersection_generator);
|
||||
|
@ -41,7 +41,7 @@ class RoundaboutHandler : public IntersectionHandler
|
||||
{
|
||||
public:
|
||||
RoundaboutHandler(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const CompressedEdgeContainer &compressed_edge_container,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table,
|
||||
|
@ -27,7 +27,7 @@ class SliproadHandler final : public IntersectionHandler
|
||||
public:
|
||||
SliproadHandler(const IntersectionGenerator &intersection_generator,
|
||||
const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table);
|
||||
|
||||
|
@ -23,7 +23,7 @@ class SuppressModeHandler final : public IntersectionHandler
|
||||
public:
|
||||
SuppressModeHandler(const IntersectionGenerator &intersection_generator,
|
||||
const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table);
|
||||
|
||||
|
@ -40,7 +40,7 @@ class TurnAnalysis
|
||||
{
|
||||
public:
|
||||
TurnAnalysis(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const RestrictionMap &restriction_map,
|
||||
const std::unordered_set<NodeID> &barrier_nodes,
|
||||
const CompressedEdgeContainer &compressed_edge_container,
|
||||
|
@ -29,7 +29,7 @@ class TurnHandler : public IntersectionHandler
|
||||
{
|
||||
public:
|
||||
TurnHandler(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table,
|
||||
const IntersectionGenerator &intersection_generator);
|
||||
|
@ -1,54 +0,0 @@
|
||||
#ifndef OSRM_STORAGE_SERIALIZATION_HPP_
|
||||
#define OSRM_STORAGE_SERIALIZATION_HPP_
|
||||
|
||||
#include "contractor/query_edge.hpp"
|
||||
#include "extractor/extractor.hpp"
|
||||
#include "extractor/original_edge_data.hpp"
|
||||
#include "extractor/query_node.hpp"
|
||||
#include "storage/io.hpp"
|
||||
#include "util/exception.hpp"
|
||||
#include "util/fingerprint.hpp"
|
||||
#include "util/log.hpp"
|
||||
#include "util/static_graph.hpp"
|
||||
|
||||
#include <boost/filesystem/fstream.hpp>
|
||||
#include <boost/iostreams/seek.hpp>
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
|
||||
namespace osrm
|
||||
{
|
||||
namespace storage
|
||||
{
|
||||
namespace serialization
|
||||
{
|
||||
|
||||
// To make function calls consistent, this function returns the fixed number of properties
|
||||
inline std::size_t readPropertiesCount() { return 1; }
|
||||
|
||||
// Loads coordinates and OSM node IDs from .nodes files into memory
|
||||
// Needs to be called after readElementCount() to get the correct offset in the stream
|
||||
template <typename OSMNodeIDVectorT>
|
||||
void readNodes(io::FileReader &nodes_file,
|
||||
util::Coordinate *coordinate_list,
|
||||
OSMNodeIDVectorT &osmnodeid_list,
|
||||
const std::uint64_t number_of_coordinates)
|
||||
{
|
||||
BOOST_ASSERT(coordinate_list);
|
||||
extractor::QueryNode current_node;
|
||||
for (std::uint64_t i = 0; i < number_of_coordinates; ++i)
|
||||
{
|
||||
nodes_file.ReadInto(current_node);
|
||||
coordinate_list[i] = util::Coordinate(current_node.lon, current_node.lat);
|
||||
osmnodeid_list.push_back(current_node.node_id);
|
||||
BOOST_ASSERT(coordinate_list[i].IsValid());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -10,6 +10,7 @@
|
||||
#include "util/fingerprint.hpp"
|
||||
#include "util/log.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
#include "util/packed_vector.hpp"
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
@ -57,21 +58,23 @@ template <typename BarrierOutIter, typename TrafficSignalsOutIter>
|
||||
NodeID loadNodesFromFile(storage::io::FileReader &file_reader,
|
||||
BarrierOutIter barriers,
|
||||
TrafficSignalsOutIter traffic_signals,
|
||||
std::vector<extractor::QueryNode> &node_array)
|
||||
std::vector<util::Coordinate> &coordinates,
|
||||
util::PackedVector<OSMNodeID> &osm_node_ids)
|
||||
{
|
||||
NodeID number_of_nodes = file_reader.ReadElementCount32();
|
||||
Log() << "Importing number_of_nodes new = " << number_of_nodes << " nodes ";
|
||||
|
||||
node_array.resize(number_of_nodes);
|
||||
coordinates.resize(number_of_nodes);
|
||||
osm_node_ids.reserve(number_of_nodes);
|
||||
|
||||
extractor::ExternalMemoryNode current_node;
|
||||
for (NodeID i = 0; i < number_of_nodes; ++i)
|
||||
{
|
||||
file_reader.ReadInto(¤t_node, 1);
|
||||
|
||||
node_array[i].lon = current_node.lon;
|
||||
node_array[i].lat = current_node.lat;
|
||||
node_array[i].node_id = current_node.node_id;
|
||||
coordinates[i].lon = current_node.lon;
|
||||
coordinates[i].lat = current_node.lat;
|
||||
osm_node_ids.push_back(current_node.node_id);
|
||||
|
||||
if (current_node.barrier)
|
||||
{
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "util/shared_memory_vector_wrapper.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
#include "storage/io.hpp"
|
||||
#include "storage/shared_memory_ownership.hpp"
|
||||
|
||||
#include <cmath>
|
||||
@ -13,7 +14,22 @@ namespace osrm
|
||||
{
|
||||
namespace util
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template <typename T, storage::Ownership Ownership> class PackedVector;
|
||||
}
|
||||
|
||||
namespace serialization
|
||||
{
|
||||
template <typename T, storage::Ownership Ownership>
|
||||
inline void read(storage::io::FileReader &reader, detail::PackedVector<T, Ownership> &vec);
|
||||
|
||||
template <typename T, storage::Ownership Ownership>
|
||||
inline void write(storage::io::FileWriter &writer, const detail::PackedVector<T, Ownership> &vec);
|
||||
}
|
||||
|
||||
namespace detail
|
||||
{
|
||||
/**
|
||||
* Since OSM node IDs are (at the time of writing) not quite yet overflowing 32 bits, and
|
||||
* will predictably be containable within 33 bits for a long time, the following packs
|
||||
@ -22,8 +38,7 @@ namespace util
|
||||
* NOTE: this type is templated for future use, but will require a slight refactor to
|
||||
* configure BITSIZE and ELEMSIZE
|
||||
*/
|
||||
template <typename T, storage::Ownership Ownership = storage::Ownership::Container>
|
||||
class PackedVector
|
||||
template <typename T, storage::Ownership Ownership> class PackedVector
|
||||
{
|
||||
static const constexpr std::size_t BITSIZE = 33;
|
||||
static const constexpr std::size_t ELEMSIZE = 64;
|
||||
@ -80,7 +95,9 @@ class PackedVector
|
||||
num_elements++;
|
||||
}
|
||||
|
||||
T at(const std::size_t &a_index) const
|
||||
T operator[](const std::size_t index) const { return at(index); }
|
||||
|
||||
T at(const std::size_t a_index) const
|
||||
{
|
||||
BOOST_ASSERT(a_index < num_elements);
|
||||
|
||||
@ -147,10 +164,16 @@ class PackedVector
|
||||
return std::floor(static_cast<double>(vec.capacity()) * ELEMSIZE / BITSIZE);
|
||||
}
|
||||
|
||||
friend void serialization::read<T, Ownership>(storage::io::FileReader &reader,
|
||||
detail::PackedVector<T, Ownership> &vec);
|
||||
|
||||
friend void serialization::write<T, Ownership>(storage::io::FileWriter &writer,
|
||||
const detail::PackedVector<T, Ownership> &vec);
|
||||
|
||||
private:
|
||||
typename util::ShM<std::uint64_t, Ownership>::vector vec;
|
||||
|
||||
std::size_t num_elements = 0;
|
||||
std::uint64_t num_elements = 0;
|
||||
|
||||
signed cursor = -1;
|
||||
|
||||
@ -192,6 +215,10 @@ class PackedVector
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
template <typename T> using PackedVector = detail::PackedVector<T, storage::Ownership::Container>;
|
||||
template <typename T> using PackedVectorView = detail::PackedVector<T, storage::Ownership::View>;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* PACKED_VECTOR_HPP */
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef OSMR_UTIL_SERIALIZATION_HPP
|
||||
#define OSMR_UTIL_SERIALIZATION_HPP
|
||||
|
||||
#include "util/packed_vector.hpp"
|
||||
#include "util/static_graph.hpp"
|
||||
#include "util/dynamic_graph.hpp"
|
||||
#include "storage/io.hpp"
|
||||
@ -11,6 +12,21 @@ namespace util
|
||||
{
|
||||
namespace serialization
|
||||
{
|
||||
template <typename T, storage::Ownership Ownership>
|
||||
inline void read(storage::io::FileReader &reader,
|
||||
detail::PackedVector<T, Ownership> &vec)
|
||||
{
|
||||
vec.num_elements =reader.ReadOne<std::uint64_t>();
|
||||
reader.DeserializeVector(vec.vec);
|
||||
}
|
||||
|
||||
template <typename T, storage::Ownership Ownership>
|
||||
inline void write(storage::io::FileWriter &writer,
|
||||
const detail::PackedVector<T, Ownership> &vec)
|
||||
{
|
||||
writer.WriteOne(vec.num_elements);
|
||||
writer.SerializeVector(vec.vec);
|
||||
}
|
||||
|
||||
template <typename EdgeDataT, storage::Ownership Ownership>
|
||||
inline void read(storage::io::FileReader &reader,
|
||||
|
@ -53,16 +53,17 @@ namespace util
|
||||
// All coordinates are pojected first to Web Mercator before the bounding boxes
|
||||
// are computed, this means the internal distance metric doesn not represent meters!
|
||||
template <class EdgeDataT,
|
||||
class CoordinateListT = std::vector<Coordinate>,
|
||||
storage::Ownership Ownership = storage::Ownership::Container,
|
||||
std::uint32_t BRANCHING_FACTOR = 128,
|
||||
std::uint32_t LEAF_PAGE_SIZE = 4096>
|
||||
class StaticRTree
|
||||
{
|
||||
template <typename T> using Vector = typename ShM<T, Ownership>::vector;
|
||||
|
||||
public:
|
||||
using Rectangle = RectangleInt2D;
|
||||
using EdgeData = EdgeDataT;
|
||||
using CoordinateList = CoordinateListT;
|
||||
using CoordinateList = Vector<util::Coordinate>;
|
||||
|
||||
static_assert(LEAF_PAGE_SIZE >= sizeof(uint32_t) + sizeof(EdgeDataT), "page size is too small");
|
||||
static_assert(((LEAF_PAGE_SIZE - 1) & LEAF_PAGE_SIZE) == 0, "page size is not a power of 2");
|
||||
@ -154,8 +155,8 @@ class StaticRTree
|
||||
Coordinate fixed_projected_coordinate;
|
||||
};
|
||||
|
||||
typename ShM<TreeNode, Ownership>::vector m_search_tree;
|
||||
const CoordinateListT &m_coordinate_list;
|
||||
Vector<TreeNode> m_search_tree;
|
||||
const Vector<Coordinate> &m_coordinate_list;
|
||||
|
||||
boost::iostreams::mapped_file_source m_leaves_region;
|
||||
// read-only view of leaves
|
||||
@ -165,12 +166,11 @@ class StaticRTree
|
||||
StaticRTree(const StaticRTree &) = delete;
|
||||
StaticRTree &operator=(const StaticRTree &) = delete;
|
||||
|
||||
template <typename CoordinateT>
|
||||
// Construct a packed Hilbert-R-Tree with Kamel-Faloutsos algorithm [1]
|
||||
explicit StaticRTree(const std::vector<EdgeDataT> &input_data_vector,
|
||||
const std::string &tree_node_filename,
|
||||
const std::string &leaf_node_filename,
|
||||
const std::vector<CoordinateT> &coordinate_list)
|
||||
const Vector<Coordinate> &coordinate_list)
|
||||
: m_coordinate_list(coordinate_list)
|
||||
{
|
||||
const uint64_t element_count = input_data_vector.size();
|
||||
@ -347,7 +347,7 @@ class StaticRTree
|
||||
|
||||
explicit StaticRTree(const boost::filesystem::path &node_file,
|
||||
const boost::filesystem::path &leaf_file,
|
||||
const CoordinateListT &coordinate_list)
|
||||
const Vector<Coordinate> &coordinate_list)
|
||||
: m_coordinate_list(coordinate_list)
|
||||
{
|
||||
storage::io::FileReader tree_node_file(node_file,
|
||||
@ -364,7 +364,7 @@ class StaticRTree
|
||||
explicit StaticRTree(TreeNode *tree_node_ptr,
|
||||
const uint64_t number_of_nodes,
|
||||
const boost::filesystem::path &leaf_file,
|
||||
const CoordinateListT &coordinate_list)
|
||||
const Vector<Coordinate> &coordinate_list)
|
||||
: m_search_tree(tree_node_ptr, number_of_nodes), m_coordinate_list(coordinate_list)
|
||||
{
|
||||
MapLeafNodesFile(leaf_file);
|
||||
|
@ -41,13 +41,15 @@ EdgeBasedGraphFactory::EdgeBasedGraphFactory(
|
||||
const std::unordered_set<NodeID> &barrier_nodes,
|
||||
const std::unordered_set<NodeID> &traffic_lights,
|
||||
std::shared_ptr<const RestrictionMap> restriction_map,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const util::PackedVector<OSMNodeID> &osm_node_ids,
|
||||
ProfileProperties profile_properties,
|
||||
const util::NameTable &name_table,
|
||||
std::vector<std::uint32_t> &turn_lane_offsets,
|
||||
std::vector<guidance::TurnLaneType::Mask> &turn_lane_masks,
|
||||
guidance::LaneDescriptionMap &lane_description_map)
|
||||
: m_max_edge_id(0), m_node_info_list(node_info_list),
|
||||
: m_max_edge_id(0), m_coordinates(coordinates),
|
||||
m_osm_node_ids(osm_node_ids),
|
||||
m_node_based_graph(std::move(node_based_graph)),
|
||||
m_restriction_map(std::move(restriction_map)), m_barrier_nodes(barrier_nodes),
|
||||
m_traffic_lights(traffic_lights), m_compressed_edge_container(compressed_edge_container),
|
||||
@ -67,15 +69,6 @@ void EdgeBasedGraphFactory::GetEdgeBasedEdges(
|
||||
|
||||
void EdgeBasedGraphFactory::GetEdgeBasedNodes(std::vector<EdgeBasedNode> &nodes)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
for (const EdgeBasedNode &node : m_edge_based_node_list)
|
||||
{
|
||||
BOOST_ASSERT(
|
||||
util::Coordinate(m_node_info_list[node.u].lon, m_node_info_list[node.u].lat).IsValid());
|
||||
BOOST_ASSERT(
|
||||
util::Coordinate(m_node_info_list[node.v].lon, m_node_info_list[node.v].lat).IsValid());
|
||||
}
|
||||
#endif
|
||||
using std::swap; // Koenig swap
|
||||
swap(nodes, m_edge_based_node_list);
|
||||
}
|
||||
@ -325,7 +318,7 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
|
||||
// linear number of turns only.
|
||||
SuffixTable street_name_suffix_table(scripting_environment);
|
||||
guidance::TurnAnalysis turn_analysis(*m_node_based_graph,
|
||||
m_node_info_list,
|
||||
m_coordinates,
|
||||
*m_restriction_map,
|
||||
m_barrier_nodes,
|
||||
m_compressed_edge_container,
|
||||
@ -548,18 +541,17 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
|
||||
|
||||
const auto &from_node =
|
||||
isTrivial
|
||||
? m_node_info_list[node_along_road_entering]
|
||||
: m_node_info_list[m_compressed_edge_container.GetLastEdgeSourceID(
|
||||
? m_osm_node_ids[node_along_road_entering]
|
||||
: m_osm_node_ids[m_compressed_edge_container.GetLastEdgeSourceID(
|
||||
incoming_edge)];
|
||||
const auto &via_node =
|
||||
m_node_info_list[m_compressed_edge_container.GetLastEdgeTargetID(
|
||||
m_osm_node_ids[m_compressed_edge_container.GetLastEdgeTargetID(
|
||||
incoming_edge)];
|
||||
const auto &to_node =
|
||||
m_node_info_list[m_compressed_edge_container.GetFirstEdgeTargetID(
|
||||
m_osm_node_ids[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, via_node, to_node};
|
||||
|
||||
turn_penalties_index_file.WriteOne(turn_index_block);
|
||||
}
|
||||
|
@ -262,10 +262,12 @@ int Extractor::run(ScriptingEnvironment &scripting_environment)
|
||||
util::DeallocatingVector<EdgeBasedEdge> edge_based_edge_list;
|
||||
std::vector<bool> node_is_startpoint;
|
||||
std::vector<EdgeWeight> edge_based_node_weights;
|
||||
std::vector<QueryNode> internal_to_external_node_map;
|
||||
std::vector<util::Coordinate> coordinates;
|
||||
util::PackedVector<OSMNodeID> osm_node_ids;
|
||||
|
||||
auto graph_size = BuildEdgeExpandedGraph(scripting_environment,
|
||||
internal_to_external_node_map,
|
||||
coordinates,
|
||||
osm_node_ids,
|
||||
edge_based_node_list,
|
||||
node_is_startpoint,
|
||||
edge_based_node_weights,
|
||||
@ -292,14 +294,12 @@ int Extractor::run(ScriptingEnvironment &scripting_environment)
|
||||
|
||||
util::Log() << "Building r-tree ...";
|
||||
TIMER_START(rtree);
|
||||
BuildRTree(std::move(edge_based_node_list),
|
||||
std::move(node_is_startpoint),
|
||||
internal_to_external_node_map);
|
||||
BuildRTree(std::move(edge_based_node_list), std::move(node_is_startpoint), coordinates);
|
||||
|
||||
TIMER_STOP(rtree);
|
||||
|
||||
util::Log() << "Writing node map ...";
|
||||
WriteNodeMapping(internal_to_external_node_map);
|
||||
files::writeNodes<storage::Ownership::Container>(config.node_output_path, coordinates, osm_node_ids);
|
||||
|
||||
WriteEdgeBasedGraph(config.edge_graph_output_path, max_edge_id, edge_based_edge_list);
|
||||
|
||||
@ -406,7 +406,8 @@ std::shared_ptr<RestrictionMap> Extractor::LoadRestrictionMap()
|
||||
std::shared_ptr<util::NodeBasedDynamicGraph>
|
||||
Extractor::LoadNodeBasedGraph(std::unordered_set<NodeID> &barriers,
|
||||
std::unordered_set<NodeID> &traffic_signals,
|
||||
std::vector<QueryNode> &internal_to_external_node_map)
|
||||
std::vector<util::Coordinate> &coordiantes,
|
||||
util::PackedVector<OSMNodeID> &osm_node_ids)
|
||||
{
|
||||
storage::io::FileReader file_reader(config.output_file_name,
|
||||
storage::io::FileReader::VerifyFingerprint);
|
||||
@ -415,7 +416,7 @@ Extractor::LoadNodeBasedGraph(std::unordered_set<NodeID> &barriers,
|
||||
auto traffic_signals_iter = inserter(traffic_signals, end(traffic_signals));
|
||||
|
||||
NodeID number_of_node_based_nodes = util::loadNodesFromFile(
|
||||
file_reader, barriers_iter, traffic_signals_iter, internal_to_external_node_map);
|
||||
file_reader, barriers_iter, traffic_signals_iter, coordiantes, osm_node_ids);
|
||||
|
||||
util::Log() << " - " << barriers.size() << " bollard nodes, " << traffic_signals.size()
|
||||
<< " traffic lights";
|
||||
@ -437,7 +438,8 @@ Extractor::LoadNodeBasedGraph(std::unordered_set<NodeID> &barriers,
|
||||
*/
|
||||
std::pair<std::size_t, EdgeID>
|
||||
Extractor::BuildEdgeExpandedGraph(ScriptingEnvironment &scripting_environment,
|
||||
std::vector<QueryNode> &internal_to_external_node_map,
|
||||
std::vector<util::Coordinate> &coordinates,
|
||||
util::PackedVector<OSMNodeID> &osm_node_ids,
|
||||
std::vector<EdgeBasedNode> &node_based_edge_list,
|
||||
std::vector<bool> &node_is_startpoint,
|
||||
std::vector<EdgeWeight> &edge_based_node_weights,
|
||||
@ -449,7 +451,7 @@ Extractor::BuildEdgeExpandedGraph(ScriptingEnvironment &scripting_environment,
|
||||
|
||||
auto restriction_map = LoadRestrictionMap();
|
||||
auto node_based_graph =
|
||||
LoadNodeBasedGraph(barrier_nodes, traffic_lights, internal_to_external_node_map);
|
||||
LoadNodeBasedGraph(barrier_nodes, traffic_lights, coordinates, osm_node_ids);
|
||||
|
||||
CompressedEdgeContainer compressed_edge_container;
|
||||
GraphCompressor graph_compressor;
|
||||
@ -473,7 +475,8 @@ Extractor::BuildEdgeExpandedGraph(ScriptingEnvironment &scripting_environment,
|
||||
barrier_nodes,
|
||||
traffic_lights,
|
||||
std::const_pointer_cast<RestrictionMap const>(restriction_map),
|
||||
internal_to_external_node_map,
|
||||
coordinates,
|
||||
osm_node_ids,
|
||||
scripting_environment.GetProfileProperties(),
|
||||
name_table,
|
||||
turn_lane_offsets,
|
||||
@ -508,7 +511,7 @@ Extractor::BuildEdgeExpandedGraph(ScriptingEnvironment &scripting_environment,
|
||||
compressed_node_based_graph_writing = std::async(std::launch::async, [&] {
|
||||
WriteCompressedNodeBasedGraph(config.compressed_node_based_graph_output_path,
|
||||
*node_based_graph,
|
||||
internal_to_external_node_map);
|
||||
coordinates);
|
||||
});
|
||||
|
||||
WriteTurnLaneData(config.turn_lane_descriptions_file_name);
|
||||
@ -531,17 +534,6 @@ Extractor::BuildEdgeExpandedGraph(ScriptingEnvironment &scripting_environment,
|
||||
return std::make_pair(number_of_node_based_nodes, max_edge_id);
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Writing info on original (node-based) nodes
|
||||
*/
|
||||
void Extractor::WriteNodeMapping(const std::vector<QueryNode> &internal_to_external_node_map)
|
||||
{
|
||||
storage::io::FileWriter node_file(config.node_output_path,
|
||||
storage::io::FileWriter::HasNoFingerprint);
|
||||
|
||||
node_file.SerializeVector(internal_to_external_node_map);
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Building rtree-based nearest-neighbor data structure
|
||||
|
||||
@ -549,11 +541,10 @@ void Extractor::WriteNodeMapping(const std::vector<QueryNode> &internal_to_exter
|
||||
*/
|
||||
void Extractor::BuildRTree(std::vector<EdgeBasedNode> node_based_edge_list,
|
||||
std::vector<bool> node_is_startpoint,
|
||||
const std::vector<QueryNode> &internal_to_external_node_map)
|
||||
const std::vector<util::Coordinate> &coordinates)
|
||||
{
|
||||
util::Log() << "constructing r-tree of " << node_based_edge_list.size()
|
||||
<< " edge elements build on-top of " << internal_to_external_node_map.size()
|
||||
<< " coordinates";
|
||||
<< " edge elements build on-top of " << coordinates.size() << " coordinates";
|
||||
|
||||
BOOST_ASSERT(node_is_startpoint.size() == node_based_edge_list.size());
|
||||
|
||||
@ -580,10 +571,10 @@ void Extractor::BuildRTree(std::vector<EdgeBasedNode> node_based_edge_list,
|
||||
node_based_edge_list.resize(new_size);
|
||||
|
||||
TIMER_START(construction);
|
||||
util::StaticRTree<EdgeBasedNode, std::vector<QueryNode>> rtree(node_based_edge_list,
|
||||
config.rtree_nodes_output_path,
|
||||
config.rtree_leafs_output_path,
|
||||
internal_to_external_node_map);
|
||||
util::StaticRTree<EdgeBasedNode> rtree(node_based_edge_list,
|
||||
config.rtree_nodes_output_path,
|
||||
config.rtree_leafs_output_path,
|
||||
coordinates);
|
||||
|
||||
TIMER_STOP(construction);
|
||||
util::Log() << "finished r-tree construction in " << TIMER_SEC(construction) << " seconds";
|
||||
@ -678,7 +669,7 @@ void Extractor::WriteTurnLaneData(const std::string &turn_lane_file) const
|
||||
|
||||
void Extractor::WriteCompressedNodeBasedGraph(const std::string &path,
|
||||
const util::NodeBasedDynamicGraph &graph,
|
||||
const std::vector<QueryNode> &externals)
|
||||
const std::vector<util::Coordinate> &coordinates)
|
||||
{
|
||||
const auto fingerprint = storage::io::FileWriter::GenerateFingerprint;
|
||||
|
||||
@ -693,7 +684,7 @@ void Extractor::WriteCompressedNodeBasedGraph(const std::string &path,
|
||||
const auto num_edges = graph.GetNumberOfEdges();
|
||||
const auto num_nodes = graph.GetNumberOfNodes();
|
||||
|
||||
BOOST_ASSERT_MSG(num_nodes == externals.size(), "graph and embedding out of sync");
|
||||
BOOST_ASSERT_MSG(num_nodes == coordinates.size(), "graph and embedding out of sync");
|
||||
|
||||
writer.WriteElementCount64(num_edges);
|
||||
writer.WriteElementCount64(num_nodes);
|
||||
@ -710,7 +701,8 @@ void Extractor::WriteCompressedNodeBasedGraph(const std::string &path,
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto &qnode : externals)
|
||||
// FIXME this is unneccesary: We have this data
|
||||
for (const auto &qnode : coordinates)
|
||||
{
|
||||
writer.WriteOne(qnode.lon);
|
||||
writer.WriteOne(qnode.lat);
|
||||
|
@ -60,7 +60,7 @@ double GetOffsetCorrectionFactor(const RoadClassification &road_classification)
|
||||
CoordinateExtractor::CoordinateExtractor(
|
||||
const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const extractor::CompressedEdgeContainer &compressed_geometries,
|
||||
const std::vector<extractor::QueryNode> &node_coordinates)
|
||||
const std::vector<util::Coordinate> &node_coordinates)
|
||||
: node_based_graph(node_based_graph), compressed_geometries(compressed_geometries),
|
||||
node_coordinates(node_coordinates)
|
||||
{
|
||||
@ -95,9 +95,9 @@ util::Coordinate CoordinateExtractor::ExtractRepresentativeCoordinate(
|
||||
{
|
||||
// check if the coordinate is equal to the interseciton coordinate
|
||||
const auto not_same_as_start = [&](const util::Coordinate coordinate) {
|
||||
return util::Coordinate(traversed_in_reverse
|
||||
? node_coordinates[to_node]
|
||||
: node_coordinates[intersection_node]) != coordinate;
|
||||
return node_coordinates[traversed_in_reverse
|
||||
? to_node
|
||||
: intersection_node] != coordinate;
|
||||
};
|
||||
// this is only used for debug purposes in assertions. We don't want warnings about it
|
||||
(void)not_same_as_start;
|
||||
|
@ -33,11 +33,11 @@ IntersectionGenerator::IntersectionGenerator(
|
||||
const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const RestrictionMap &restriction_map,
|
||||
const std::unordered_set<NodeID> &barrier_nodes,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const CompressedEdgeContainer &compressed_edge_container)
|
||||
: node_based_graph(node_based_graph), restriction_map(restriction_map),
|
||||
barrier_nodes(barrier_nodes), node_info_list(node_info_list),
|
||||
coordinate_extractor(node_based_graph, compressed_edge_container, node_info_list)
|
||||
barrier_nodes(barrier_nodes), coordinates(coordinates),
|
||||
coordinate_extractor(node_based_graph, compressed_edge_container, coordinates)
|
||||
{
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ IntersectionGenerator::ComputeIntersectionShape(const NodeID node_at_center_of_i
|
||||
// reserve enough items (+ the possibly missing u-turn edge)
|
||||
const auto intersection_degree = node_based_graph.GetOutDegree(node_at_center_of_intersection);
|
||||
intersection.reserve(intersection_degree);
|
||||
const util::Coordinate turn_coordinate = node_info_list[node_at_center_of_intersection];
|
||||
const util::Coordinate turn_coordinate = coordinates[node_at_center_of_intersection];
|
||||
|
||||
// number of lanes at the intersection changes how far we look down the road
|
||||
const auto edge_range = node_based_graph.GetAdjacentEdgeRange(node_at_center_of_intersection);
|
||||
|
@ -31,11 +31,11 @@ inline bool requiresAnnouncement(const EdgeData &from, const EdgeData &to)
|
||||
}
|
||||
|
||||
IntersectionHandler::IntersectionHandler(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table,
|
||||
const IntersectionGenerator &intersection_generator)
|
||||
: node_based_graph(node_based_graph), node_info_list(node_info_list), name_table(name_table),
|
||||
: node_based_graph(node_based_graph), coordinates(coordinates), name_table(name_table),
|
||||
street_name_suffix_table(street_name_suffix_table),
|
||||
intersection_generator(intersection_generator),
|
||||
graph_walker(node_based_graph, intersection_generator)
|
||||
@ -127,8 +127,8 @@ TurnInstruction IntersectionHandler::getInstructionForObvious(const std::size_t
|
||||
// or actually follow the full road. When 2399 lands, we can exchange here for a
|
||||
// precalculated distance value.
|
||||
const auto distance = util::coordinate_calculation::haversineDistance(
|
||||
node_info_list[node_based_graph.GetTarget(via_edge)],
|
||||
node_info_list[node_based_graph.GetTarget(road.eid)]);
|
||||
coordinates[node_based_graph.GetTarget(via_edge)],
|
||||
coordinates[node_based_graph.GetTarget(road.eid)]);
|
||||
return {
|
||||
TurnType::Turn,
|
||||
(angularDeviation(road.angle, STRAIGHT_ANGLE) < FUZZY_ANGLE_DIFFERENCE ||
|
||||
|
@ -16,13 +16,13 @@ namespace guidance
|
||||
|
||||
IntersectionNormalizer::IntersectionNormalizer(
|
||||
const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<extractor::QueryNode> &node_coordinates,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table,
|
||||
const IntersectionGenerator &intersection_generator)
|
||||
: node_based_graph(node_based_graph), intersection_generator(intersection_generator),
|
||||
mergable_road_detector(node_based_graph,
|
||||
node_coordinates,
|
||||
coordinates,
|
||||
intersection_generator,
|
||||
intersection_generator.GetCoordinateExtractor(),
|
||||
name_table,
|
||||
|
@ -44,7 +44,7 @@ inline auto makeCheckRoadForName(const NameID name_id,
|
||||
}
|
||||
|
||||
MergableRoadDetector::MergableRoadDetector(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<QueryNode> &node_coordinates,
|
||||
const std::vector<util::Coordinate> &node_coordinates,
|
||||
const IntersectionGenerator &intersection_generator,
|
||||
const CoordinateExtractor &coordinate_extractor,
|
||||
const util::NameTable &name_table,
|
||||
|
@ -40,12 +40,12 @@ inline bool isRampClass(EdgeID eid, const util::NodeBasedDynamicGraph &node_base
|
||||
} // namespace
|
||||
|
||||
MotorwayHandler::MotorwayHandler(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table,
|
||||
const IntersectionGenerator &intersection_generator)
|
||||
: IntersectionHandler(node_based_graph,
|
||||
node_info_list,
|
||||
coordinates,
|
||||
name_table,
|
||||
street_name_suffix_table,
|
||||
intersection_generator)
|
||||
|
@ -23,19 +23,19 @@ namespace guidance
|
||||
{
|
||||
|
||||
RoundaboutHandler::RoundaboutHandler(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const CompressedEdgeContainer &compressed_edge_container,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table,
|
||||
const ProfileProperties &profile_properties,
|
||||
const IntersectionGenerator &intersection_generator)
|
||||
: IntersectionHandler(node_based_graph,
|
||||
node_info_list,
|
||||
coordinates,
|
||||
name_table,
|
||||
street_name_suffix_table,
|
||||
intersection_generator),
|
||||
compressed_edge_container(compressed_edge_container), profile_properties(profile_properties),
|
||||
coordinate_extractor(node_based_graph, compressed_edge_container, node_info_list)
|
||||
coordinate_extractor(node_based_graph, compressed_edge_container, coordinates)
|
||||
{
|
||||
}
|
||||
|
||||
@ -149,10 +149,6 @@ void RoundaboutHandler::invalidateExitAgainstDirection(const NodeID from_nid,
|
||||
bool RoundaboutHandler::qualifiesAsRoundaboutIntersection(
|
||||
const std::unordered_set<NodeID> &roundabout_nodes) const
|
||||
{
|
||||
// translate a node ID into its respective coordinate stored in the node_info_list
|
||||
const auto getCoordinate = [this](const NodeID node) {
|
||||
return util::Coordinate(node_info_list[node].lon, node_info_list[node].lat);
|
||||
};
|
||||
const bool has_limited_size = roundabout_nodes.size() <= 4;
|
||||
if (!has_limited_size)
|
||||
return false;
|
||||
@ -169,7 +165,7 @@ bool RoundaboutHandler::qualifiesAsRoundaboutIntersection(
|
||||
// Find all exit bearings. Only if they are well distinct (at least 60 degrees between
|
||||
// them), we allow a roundabout turn
|
||||
|
||||
const auto exit_bearings = [this, &roundabout_nodes, getCoordinate]() {
|
||||
const auto exit_bearings = [this, &roundabout_nodes]() {
|
||||
std::vector<double> result;
|
||||
for (const auto node : roundabout_nodes)
|
||||
{
|
||||
@ -182,7 +178,7 @@ bool RoundaboutHandler::qualifiesAsRoundaboutIntersection(
|
||||
continue;
|
||||
|
||||
// there is a single non-roundabout edge
|
||||
const auto src_coordinate = getCoordinate(node);
|
||||
const auto src_coordinate = coordinates[node];
|
||||
|
||||
const auto edge_range = node_based_graph.GetAdjacentEdgeRange(node);
|
||||
const auto number_of_lanes_at_intersection = std::accumulate(
|
||||
@ -242,11 +238,6 @@ bool RoundaboutHandler::qualifiesAsRoundaboutIntersection(
|
||||
|
||||
RoundaboutType RoundaboutHandler::getRoundaboutType(const NodeID nid) const
|
||||
{
|
||||
// translate a node ID into its respective coordinate stored in the node_info_list
|
||||
const auto getCoordinate = [this](const NodeID node) {
|
||||
return util::Coordinate(node_info_list[node].lon, node_info_list[node].lat);
|
||||
};
|
||||
|
||||
std::unordered_set<unsigned> roundabout_name_ids;
|
||||
std::unordered_set<unsigned> connected_names;
|
||||
|
||||
@ -305,11 +296,11 @@ RoundaboutType RoundaboutHandler::getRoundaboutType(const NodeID nid) const
|
||||
|
||||
const auto getEdgeLength = [&](const NodeID source_node, EdgeID eid) {
|
||||
double length = 0.;
|
||||
auto last_coord = getCoordinate(source_node);
|
||||
auto last_coord = coordinates[source_node];
|
||||
const auto &edge_bucket = compressed_edge_container.GetBucketReference(eid);
|
||||
for (const auto &compressed_edge : edge_bucket)
|
||||
{
|
||||
const auto next_coord = getCoordinate(compressed_edge.node_id);
|
||||
const auto next_coord = coordinates[compressed_edge.node_id];
|
||||
length += util::coordinate_calculation::haversineDistance(last_coord, next_coord);
|
||||
last_coord = next_coord;
|
||||
}
|
||||
|
@ -23,11 +23,11 @@ namespace guidance
|
||||
|
||||
SliproadHandler::SliproadHandler(const IntersectionGenerator &intersection_generator,
|
||||
const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table)
|
||||
: IntersectionHandler(node_based_graph,
|
||||
node_info_list,
|
||||
coordinates,
|
||||
name_table,
|
||||
street_name_suffix_table,
|
||||
intersection_generator)
|
||||
@ -374,8 +374,8 @@ operator()(const NodeID /*nid*/, const EdgeID source_edge_id, Intersection inter
|
||||
// Only check for curvature and ~90 degree when it makes sense to do so.
|
||||
const constexpr auto MIN_LENGTH = 3.;
|
||||
|
||||
const auto length = haversineDistance(node_info_list[intersection_node_id],
|
||||
node_info_list[main_road_intersection->node]);
|
||||
const auto length = haversineDistance(coordinates[intersection_node_id],
|
||||
coordinates[main_road_intersection->node]);
|
||||
|
||||
const double perpendicular_angle = 90 + FUZZY_ANGLE_DIFFERENCE;
|
||||
|
||||
@ -638,9 +638,9 @@ bool SliproadHandler::isValidSliproadArea(const double max_area,
|
||||
{
|
||||
using namespace util::coordinate_calculation;
|
||||
|
||||
const auto first = node_info_list[a];
|
||||
const auto second = node_info_list[b];
|
||||
const auto third = node_info_list[c];
|
||||
const auto first = coordinates[a];
|
||||
const auto second = coordinates[b];
|
||||
const auto third = coordinates[c];
|
||||
|
||||
const auto length = haversineDistance(first, second);
|
||||
const auto heigth = haversineDistance(second, third);
|
||||
|
@ -13,11 +13,11 @@ namespace guidance
|
||||
|
||||
SuppressModeHandler::SuppressModeHandler(const IntersectionGenerator &intersection_generator,
|
||||
const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table)
|
||||
: IntersectionHandler(node_based_graph,
|
||||
node_info_list,
|
||||
coordinates,
|
||||
name_table,
|
||||
street_name_suffix_table,
|
||||
intersection_generator)
|
||||
|
@ -27,7 +27,7 @@ bool requiresAnnouncement(const EdgeData &from, const EdgeData &to)
|
||||
}
|
||||
|
||||
TurnAnalysis::TurnAnalysis(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const RestrictionMap &restriction_map,
|
||||
const std::unordered_set<NodeID> &barrier_nodes,
|
||||
const CompressedEdgeContainer &compressed_edge_container,
|
||||
@ -37,38 +37,38 @@ TurnAnalysis::TurnAnalysis(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
: node_based_graph(node_based_graph), intersection_generator(node_based_graph,
|
||||
restriction_map,
|
||||
barrier_nodes,
|
||||
node_info_list,
|
||||
coordinates,
|
||||
compressed_edge_container),
|
||||
intersection_normalizer(node_based_graph,
|
||||
node_info_list,
|
||||
coordinates,
|
||||
name_table,
|
||||
street_name_suffix_table,
|
||||
intersection_generator),
|
||||
roundabout_handler(node_based_graph,
|
||||
node_info_list,
|
||||
coordinates,
|
||||
compressed_edge_container,
|
||||
name_table,
|
||||
street_name_suffix_table,
|
||||
profile_properties,
|
||||
intersection_generator),
|
||||
motorway_handler(node_based_graph,
|
||||
node_info_list,
|
||||
coordinates,
|
||||
name_table,
|
||||
street_name_suffix_table,
|
||||
intersection_generator),
|
||||
turn_handler(node_based_graph,
|
||||
node_info_list,
|
||||
coordinates,
|
||||
name_table,
|
||||
street_name_suffix_table,
|
||||
intersection_generator),
|
||||
sliproad_handler(intersection_generator,
|
||||
node_based_graph,
|
||||
node_info_list,
|
||||
coordinates,
|
||||
name_table,
|
||||
street_name_suffix_table),
|
||||
suppress_mode_handler(intersection_generator,
|
||||
node_based_graph,
|
||||
node_info_list,
|
||||
coordinates,
|
||||
name_table,
|
||||
street_name_suffix_table)
|
||||
{
|
||||
|
@ -111,12 +111,12 @@ std::size_t TurnHandler::Fork::getLeftIndex() const
|
||||
}
|
||||
|
||||
TurnHandler::TurnHandler(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||
const std::vector<QueryNode> &node_info_list,
|
||||
const std::vector<util::Coordinate> &coordinates,
|
||||
const util::NameTable &name_table,
|
||||
const SuffixTable &street_name_suffix_table,
|
||||
const IntersectionGenerator &intersection_generator)
|
||||
: IntersectionHandler(node_based_graph,
|
||||
node_info_list,
|
||||
coordinates,
|
||||
name_table,
|
||||
street_name_suffix_table,
|
||||
intersection_generator)
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "storage/storage.hpp"
|
||||
|
||||
#include "storage/io.hpp"
|
||||
#include "storage/serialization.hpp"
|
||||
#include "storage/shared_datatype.hpp"
|
||||
#include "storage/shared_memory.hpp"
|
||||
#include "storage/shared_memory_ownership.hpp"
|
||||
@ -64,8 +63,7 @@ namespace storage
|
||||
{
|
||||
|
||||
using RTreeLeaf = engine::datafacade::BaseDataFacade::RTreeLeaf;
|
||||
using RTreeNode = util::
|
||||
StaticRTree<RTreeLeaf, util::vector_view<util::Coordinate>, storage::Ownership::View>::TreeNode;
|
||||
using RTreeNode = util:: StaticRTree<RTreeLeaf, storage::Ownership::View>::TreeNode;
|
||||
using QueryGraph = util::StaticGraph<contractor::QueryEdge::EdgeData>;
|
||||
using EdgeBasedGraph = util::StaticGraph<extractor::EdgeBasedEdge::EdgeData>;
|
||||
|
||||
@ -281,9 +279,7 @@ void Storage::PopulateLayout(DataLayout &layout)
|
||||
}
|
||||
|
||||
{
|
||||
// allocate space in shared memory for profile properties
|
||||
const auto properties_size = serialization::readPropertiesCount();
|
||||
layout.SetBlockSize<extractor::ProfileProperties>(DataLayout::PROPERTIES, properties_size);
|
||||
layout.SetBlockSize<extractor::ProfileProperties>(DataLayout::PROPERTIES, 1);
|
||||
}
|
||||
|
||||
// read timestampsize
|
||||
@ -323,14 +319,14 @@ void Storage::PopulateLayout(DataLayout &layout)
|
||||
|
||||
// load coordinate size
|
||||
{
|
||||
io::FileReader node_file(config.nodes_data_path, io::FileReader::HasNoFingerprint);
|
||||
io::FileReader node_file(config.nodes_data_path, io::FileReader::VerifyFingerprint);
|
||||
const auto coordinate_list_size = node_file.ReadElementCount64();
|
||||
layout.SetBlockSize<util::Coordinate>(DataLayout::COORDINATE_LIST, coordinate_list_size);
|
||||
// we'll read a list of OSM node IDs from the same data, so set the block size for the same
|
||||
// number of items:
|
||||
layout.SetBlockSize<std::uint64_t>(
|
||||
DataLayout::OSM_NODE_ID_LIST,
|
||||
util::PackedVector<OSMNodeID>::elements_to_blocks(coordinate_list_size));
|
||||
util::PackedVectorView<OSMNodeID>::elements_to_blocks(coordinate_list_size));
|
||||
}
|
||||
|
||||
// load geometries sizes
|
||||
@ -690,20 +686,15 @@ void Storage::PopulateData(const DataLayout &layout, char *memory_ptr)
|
||||
|
||||
// Loading list of coordinates
|
||||
{
|
||||
io::FileReader nodes_file(config.nodes_data_path, io::FileReader::HasNoFingerprint);
|
||||
nodes_file.Skip<std::uint64_t>(1); // node_count
|
||||
const auto coordinates_ptr =
|
||||
layout.GetBlockPtr<util::Coordinate, true>(memory_ptr, DataLayout::COORDINATE_LIST);
|
||||
const auto osmnodeid_ptr =
|
||||
layout.GetBlockPtr<std::uint64_t, true>(memory_ptr, DataLayout::OSM_NODE_ID_LIST);
|
||||
util::PackedVector<OSMNodeID, storage::Ownership::View> osmnodeid_list;
|
||||
util::vector_view<util::Coordinate> coordinates(coordinates_ptr, layout.num_entries[DataLayout::COORDINATE_LIST]);
|
||||
util::PackedVectorView<OSMNodeID> osm_node_ids;
|
||||
osm_node_ids.reset(osmnodeid_ptr, layout.num_entries[DataLayout::OSM_NODE_ID_LIST]);
|
||||
|
||||
osmnodeid_list.reset(osmnodeid_ptr, layout.num_entries[DataLayout::OSM_NODE_ID_LIST]);
|
||||
|
||||
serialization::readNodes(nodes_file,
|
||||
coordinates_ptr,
|
||||
osmnodeid_list,
|
||||
layout.num_entries[DataLayout::COORDINATE_LIST]);
|
||||
extractor::files::readNodes<storage::Ownership::View>(config.nodes_data_path, coordinates, osm_node_ids);
|
||||
}
|
||||
|
||||
// load turn weight penalties
|
||||
|
@ -32,7 +32,8 @@ using TarjanGraph = util::StaticGraph<void>;
|
||||
using TarjanEdge = util::static_graph_details::SortableEdgeWithData<void>;
|
||||
|
||||
std::size_t loadGraph(const std::string &path,
|
||||
std::vector<extractor::QueryNode> &coordinate_list,
|
||||
std::vector<util::Coordinate> &coordinate_list,
|
||||
util::PackedVector<OSMNodeID> &osm_node_ids,
|
||||
std::vector<TarjanEdge> &graph_edge_list)
|
||||
{
|
||||
storage::io::FileReader file_reader(path, storage::io::FileReader::VerifyFingerprint);
|
||||
@ -41,7 +42,7 @@ std::size_t loadGraph(const std::string &path,
|
||||
|
||||
auto nop = boost::make_function_output_iterator([](auto) {});
|
||||
|
||||
const auto number_of_nodes = util::loadNodesFromFile(file_reader, nop, nop, coordinate_list);
|
||||
const auto number_of_nodes = util::loadNodesFromFile(file_reader, nop, nop, coordinate_list, osm_node_ids);
|
||||
|
||||
util::loadEdgesFromFile(file_reader, edge_list);
|
||||
|
||||
@ -75,7 +76,9 @@ struct FeatureWriter
|
||||
}
|
||||
|
||||
void
|
||||
AddLine(const extractor::QueryNode from, const extractor::QueryNode to, const std::string &type)
|
||||
AddLine(const util::Coordinate from, const util::Coordinate to,
|
||||
const OSMNodeID from_id, const OSMNodeID to_id,
|
||||
const std::string &type)
|
||||
{
|
||||
const auto from_lon = static_cast<double>(util::toFloating(from.lon));
|
||||
const auto from_lat = static_cast<double>(util::toFloating(from.lat));
|
||||
@ -89,8 +92,8 @@ struct FeatureWriter
|
||||
out << ",";
|
||||
}
|
||||
|
||||
out << "{\"type\":\"Feature\",\"properties\":{\"from\":" << from.node_id << ","
|
||||
<< "\"to\":" << to.node_id << ",\"type\":\"" << type
|
||||
out << "{\"type\":\"Feature\",\"properties\":{\"from\":" << from_id << ","
|
||||
<< "\"to\":" << to_id << ",\"type\":\"" << type
|
||||
<< "\"},\"geometry\":{\"type\":\"LineString\",\"coordinates\":[[" << from_lon << ","
|
||||
<< from_lat << "],[" << to_lon << "," << to_lat << "]]}}";
|
||||
|
||||
@ -110,7 +113,6 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
using namespace osrm;
|
||||
|
||||
std::vector<extractor::QueryNode> coordinate_list;
|
||||
util::LogPolicy::GetInstance().Unmute();
|
||||
|
||||
if (argc < 3)
|
||||
@ -137,7 +139,9 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
std::vector<tools::TarjanEdge> graph_edge_list;
|
||||
auto number_of_nodes = tools::loadGraph(inpath, coordinate_list, graph_edge_list);
|
||||
std::vector<util::Coordinate> coordinate_list;
|
||||
util::PackedVector<OSMNodeID> osm_node_ids;
|
||||
auto number_of_nodes = tools::loadGraph(inpath, coordinate_list, osm_node_ids, graph_edge_list);
|
||||
|
||||
tbb::parallel_sort(graph_edge_list.begin(), graph_edge_list.end());
|
||||
|
||||
@ -185,7 +189,7 @@ int main(int argc, char *argv[])
|
||||
auto same_component = source_component_id == target_component_id;
|
||||
std::string type = same_component ? "inner" : "border";
|
||||
|
||||
writer.AddLine(coordinate_list[source], coordinate_list[target], type);
|
||||
writer.AddLine(coordinate_list[source], coordinate_list[target], osm_node_ids[source], osm_node_ids[target], type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -143,10 +143,9 @@ updateSegmentData(const UpdaterConfig &config,
|
||||
{
|
||||
auto weight_multiplier = profile_properties.GetWeightMultiplier();
|
||||
|
||||
std::vector<extractor::QueryNode> internal_to_external_node_map;
|
||||
storage::io::FileReader nodes_file(config.node_based_graph_path,
|
||||
storage::io::FileReader::HasNoFingerprint);
|
||||
nodes_file.DeserializeVector(internal_to_external_node_map);
|
||||
std::vector<util::Coordinate> coordinates;
|
||||
util::PackedVector<OSMNodeID> osm_node_ids;
|
||||
extractor::files::readNodes(config.node_based_graph_path, coordinates, osm_node_ids);
|
||||
|
||||
// vector to count used speeds for logging
|
||||
// size offset by one since index 0 is used for speeds not from external file
|
||||
@ -180,8 +179,7 @@ updateSegmentData(const UpdaterConfig &config,
|
||||
segment_lengths.reserve(nodes_range.size() + 1);
|
||||
util::for_each_pair(nodes_range, [&](const auto &u, const auto &v) {
|
||||
segment_lengths.push_back(util::coordinate_calculation::greatCircleDistance(
|
||||
util::Coordinate{internal_to_external_node_map[u]},
|
||||
util::Coordinate{internal_to_external_node_map[v]}));
|
||||
coordinates[u], coordinates[v]));
|
||||
});
|
||||
|
||||
auto fwd_weights_range = segment_data.GetForwardWeights(geometry_id);
|
||||
@ -190,8 +188,8 @@ updateSegmentData(const UpdaterConfig &config,
|
||||
bool fwd_was_updated = false;
|
||||
for (const auto segment_offset : util::irange<std::size_t>(0, fwd_weights_range.size()))
|
||||
{
|
||||
auto u = internal_to_external_node_map[nodes_range[segment_offset]].node_id;
|
||||
auto v = internal_to_external_node_map[nodes_range[segment_offset + 1]].node_id;
|
||||
auto u = osm_node_ids[nodes_range[segment_offset]];
|
||||
auto v = osm_node_ids[nodes_range[segment_offset + 1]];
|
||||
if (auto value = segment_speed_lookup({u, v}))
|
||||
{
|
||||
auto new_duration =
|
||||
@ -224,8 +222,8 @@ updateSegmentData(const UpdaterConfig &config,
|
||||
|
||||
for (const auto segment_offset : util::irange<std::size_t>(0, rev_weights_range.size()))
|
||||
{
|
||||
auto u = internal_to_external_node_map[nodes_range[segment_offset]].node_id;
|
||||
auto v = internal_to_external_node_map[nodes_range[segment_offset + 1]].node_id;
|
||||
auto u = osm_node_ids[nodes_range[segment_offset]];
|
||||
auto v = osm_node_ids[nodes_range[segment_offset + 1]];
|
||||
if (auto value = segment_speed_lookup({v, u}))
|
||||
{
|
||||
auto new_duration =
|
||||
@ -301,9 +299,8 @@ updateSegmentData(const UpdaterConfig &config,
|
||||
if (old_fwd_durations_range[segment_offset] >=
|
||||
(new_fwd_durations_range[segment_offset] * config.log_edge_updates_factor))
|
||||
{
|
||||
auto from = internal_to_external_node_map[nodes_range[segment_offset]].node_id;
|
||||
auto to =
|
||||
internal_to_external_node_map[nodes_range[segment_offset + 1]].node_id;
|
||||
auto from = osm_node_ids[nodes_range[segment_offset]];
|
||||
auto to = osm_node_ids[nodes_range[segment_offset + 1]];
|
||||
util::Log(logWARNING)
|
||||
<< "[weight updates] Edge weight update from "
|
||||
<< old_fwd_durations_range[segment_offset] / 10. << "s to "
|
||||
@ -323,9 +320,8 @@ updateSegmentData(const UpdaterConfig &config,
|
||||
if (old_rev_durations_range[segment_offset] >=
|
||||
(new_rev_durations_range[segment_offset] * config.log_edge_updates_factor))
|
||||
{
|
||||
auto from =
|
||||
internal_to_external_node_map[nodes_range[segment_offset + 1]].node_id;
|
||||
auto to = internal_to_external_node_map[nodes_range[segment_offset]].node_id;
|
||||
auto from = osm_node_ids[nodes_range[segment_offset + 1]];
|
||||
auto to = osm_node_ids[nodes_range[segment_offset]];
|
||||
util::Log(logWARNING)
|
||||
<< "[weight updates] Edge weight update from "
|
||||
<< old_rev_durations_range[segment_offset] / 10. << "s to "
|
||||
|
@ -12,7 +12,7 @@ using namespace osrm::util;
|
||||
// Verify that the packed vector behaves as expected
|
||||
BOOST_AUTO_TEST_CASE(insert_and_retrieve_packed_test)
|
||||
{
|
||||
PackedVector<OSMNodeID, osrm::storage::Ownership::Container> packed_ids;
|
||||
PackedVector<OSMNodeID> packed_ids;
|
||||
std::vector<OSMNodeID> original_ids;
|
||||
|
||||
const constexpr std::size_t num_test_cases = 399;
|
||||
@ -33,7 +33,7 @@ BOOST_AUTO_TEST_CASE(insert_and_retrieve_packed_test)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(packed_vector_capacity_test)
|
||||
{
|
||||
PackedVector<OSMNodeID, osrm::storage::Ownership::Container> packed_vec;
|
||||
PackedVector<OSMNodeID> packed_vec;
|
||||
const std::size_t original_size = packed_vec.capacity();
|
||||
std::vector<OSMNodeID> dummy_vec;
|
||||
|
||||
|
@ -41,12 +41,10 @@ constexpr uint32_t TEST_LEAF_NODE_SIZE = 64;
|
||||
|
||||
using TestData = extractor::EdgeBasedNode;
|
||||
using TestStaticRTree = StaticRTree<TestData,
|
||||
std::vector<Coordinate>,
|
||||
osrm::storage::Ownership::Container,
|
||||
TEST_BRANCHING_FACTOR,
|
||||
TEST_LEAF_NODE_SIZE>;
|
||||
using MiniStaticRTree =
|
||||
StaticRTree<TestData, std::vector<Coordinate>, osrm::storage::Ownership::Container, 2, 128>;
|
||||
using MiniStaticRTree = StaticRTree<TestData,osrm::storage::Ownership::Container, 2, 128>;
|
||||
using TestDataFacade = MockDataFacade<osrm::engine::routing_algorithms::ch::Algorithm>;
|
||||
|
||||
// Choosen by a fair W20 dice roll (this value is completely arbitrary)
|
||||
@ -275,8 +273,7 @@ void construction_test(const std::string &prefix, FixtureT *fixture)
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE(construct_tiny, TestRandomGraphFixture_10_30)
|
||||
{
|
||||
using TinyTestTree =
|
||||
StaticRTree<TestData, std::vector<Coordinate>, osrm::storage::Ownership::Container, 2, 64>;
|
||||
using TinyTestTree = StaticRTree<TestData, osrm::storage::Ownership::Container, 2, 64>;
|
||||
construction_test<TinyTestTree>("test_tiny", this);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user