MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / QueryNode

Class QueryNode

include/extractor/query_node.hpp:14–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12{
13
14struct QueryNode
15{
16 using key_type = OSMNodeID; // type of NodeID
17 using value_type = std::int32_t; // type of lat,lons
18
19 explicit QueryNode(const util::FixedLongitude lon_,
20 const util::FixedLatitude lat_,
21 const key_type node_id_)
22 : lon(lon_), lat(lat_), node_id(node_id_)
23 {
24 }
25 QueryNode()
26 : lon{std::numeric_limits<value_type>::max()}, lat{std::numeric_limits<value_type>::max()},
27 node_id(SPECIAL_OSM_NODEID)
28 {
29 }
30
31 util::FixedLongitude lon;
32 util::FixedLatitude lat;
33 key_type node_id;
34
35 static QueryNode min_value()
36 {
37 return QueryNode(util::FixedLongitude{static_cast<value_type>(-180 * COORDINATE_PRECISION)},
38 util::FixedLatitude{static_cast<value_type>(-90 * COORDINATE_PRECISION)},
39 MIN_OSM_NODEID);
40 }
41
42 static QueryNode max_value()
43 {
44 return QueryNode(util::FixedLongitude{static_cast<value_type>(180 * COORDINATE_PRECISION)},
45 util::FixedLatitude{static_cast<value_type>(90 * COORDINATE_PRECISION)},
46 MAX_OSM_NODEID);
47 }
48};
49} // namespace osrm::extractor
50
51#endif // QUERY_NODE_HPP

Callers 2

min_valueMethod · 0.85
max_valueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected