Flags describing the class of the road. This data is used during creation of graphs/guidance generation but is not available in annotation/navigation
| 16 | // Flags describing the class of the road. This data is used during creation of graphs/guidance |
| 17 | // generation but is not available in annotation/navigation |
| 18 | struct NodeBasedEdgeClassification |
| 19 | { |
| 20 | std::uint8_t forward : 1; // 1 |
| 21 | std::uint8_t backward : 1; // 1 |
| 22 | std::uint8_t is_split : 1; // 1 |
| 23 | std::uint8_t roundabout : 1; // 1 |
| 24 | std::uint8_t circular : 1; // 1 |
| 25 | std::uint8_t startpoint : 1; // 1 |
| 26 | std::uint8_t restricted : 1; // 1 |
| 27 | RoadClassification road_classification; // 16 2 |
| 28 | std::uint8_t highway_turn_classification : 4; // 4 |
| 29 | std::uint8_t access_turn_classification : 4; // 4 |
| 30 | |
| 31 | NodeBasedEdgeClassification(); |
| 32 | |
| 33 | NodeBasedEdgeClassification(const bool forward, |
| 34 | const bool backward, |
| 35 | const bool is_split, |
| 36 | const bool roundabout, |
| 37 | const bool circular, |
| 38 | const bool startpoint, |
| 39 | const bool restricted, |
| 40 | RoadClassification road_classification, |
| 41 | const std::uint8_t highway_turn_classification, |
| 42 | const std::uint8_t access_turn_classification) |
| 43 | : forward(forward), backward(backward), is_split(is_split), roundabout(roundabout), |
| 44 | circular(circular), startpoint(startpoint), restricted(restricted), |
| 45 | road_classification(road_classification), |
| 46 | highway_turn_classification(highway_turn_classification), |
| 47 | access_turn_classification(access_turn_classification) |
| 48 | { |
| 49 | } |
| 50 | |
| 51 | bool IsRestricted() const { return restricted; } |
| 52 | |
| 53 | bool operator==(const NodeBasedEdgeClassification &other) const |
| 54 | { |
| 55 | return (road_classification == other.road_classification) && (forward == other.forward) && |
| 56 | (backward == other.backward) && (is_split) == (other.is_split) && |
| 57 | (roundabout == other.roundabout) && (circular == other.circular) && |
| 58 | (startpoint == other.startpoint) && (restricted == other.restricted); |
| 59 | } |
| 60 | }; |
| 61 | |
| 62 | // Annotative data, used in parts in guidance generation, in parts during navigation (classes) but |
| 63 | // mostly for annotation of edges. The entry can be shared between multiple edges and usually |
no outgoing calls