Implement Turn Lane Api
This commit is contained in:
@@ -65,21 +65,18 @@ class LaneTupel
|
||||
LaneID lanes_in_turn;
|
||||
LaneID first_lane_from_the_right;
|
||||
|
||||
friend std::size_t std::hash<LaneTupel>::operator()(const LaneTupel &) const;
|
||||
friend std::size_t hash_value(const LaneTupel &tup)
|
||||
{
|
||||
std::size_t seed{0};
|
||||
boost::hash_combine(seed, tup.lanes_in_turn);
|
||||
boost::hash_combine(seed, tup.first_lane_from_the_right);
|
||||
return seed;
|
||||
}
|
||||
};
|
||||
|
||||
using LaneTupelIdPair = std::pair<util::guidance::LaneTupel, LaneStringID>;
|
||||
} // namespace guidance
|
||||
} // namespace util
|
||||
} // namespace osrm
|
||||
|
||||
// make Bearing Class hasbable
|
||||
namespace std
|
||||
{
|
||||
inline size_t hash<::osrm::util::guidance::LaneTupel>::
|
||||
operator()(const ::osrm::util::guidance::LaneTupel &lane_tupel) const
|
||||
{
|
||||
return boost::hash_value(*reinterpret_cast<const std::uint16_t *>(&lane_tupel));
|
||||
}
|
||||
} // namespace std
|
||||
|
||||
#endif /* OSRM_UTIL_GUIDANCE_TURN_LANES_HPP */
|
||||
|
||||
@@ -20,7 +20,8 @@ struct NodeBasedEdgeData
|
||||
NodeBasedEdgeData()
|
||||
: distance(INVALID_EDGE_WEIGHT), edge_id(SPECIAL_NODEID),
|
||||
name_id(std::numeric_limits<unsigned>::max()), access_restricted(false), reversed(false),
|
||||
roundabout(false), travel_mode(TRAVEL_MODE_INACCESSIBLE), lane_string_id(INVALID_LANE_STRINGID)
|
||||
roundabout(false), travel_mode(TRAVEL_MODE_INACCESSIBLE),
|
||||
lane_string_id(INVALID_LANE_STRINGID)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -60,9 +60,11 @@ using NameID = std::uint32_t;
|
||||
using EdgeWeight = std::int32_t;
|
||||
|
||||
using LaneStringID = std::uint16_t;
|
||||
static const LaneStringID INVALID_LANE_STRINGID = std::numeric_limits<LaneStringID>::max();
|
||||
using LaneID = std::uint8_t;
|
||||
static const LaneID INVALID_LANEID = std::numeric_limits<LaneID>::max();
|
||||
static const LaneStringID INVALID_LANE_STRINGID = std::numeric_limits<LaneStringID>::max();
|
||||
using LaneDataID = std::uint16_t;
|
||||
static const LaneDataID INVALID_LANE_DATAID = std::numeric_limits<LaneStringID>::max();
|
||||
|
||||
using BearingClassID = std::uint32_t;
|
||||
static const BearingClassID INVALID_BEARING_CLASSID = std::numeric_limits<BearingClassID>::max();
|
||||
|
||||
Reference in New Issue
Block a user