First round of changes for access=destination enhancements. Not yet
fully functional.
This commit is contained in:
@@ -42,10 +42,10 @@ public:
|
||||
|
||||
/** Default constructor. target and weight are set to 0.*/
|
||||
NodeBasedEdge() :
|
||||
_source(0), _target(0), _name(0), _weight(0), forward(0), backward(0), _type(0), _roundabout(false), _ignoreInGrid(false) { assert(false); } //shall not be used.
|
||||
_source(0), _target(0), _name(0), _weight(0), forward(0), backward(0), _type(0), _roundabout(false), _ignoreInGrid(false), _accessRestricted(false) { assert(false); } //shall not be used.
|
||||
|
||||
explicit NodeBasedEdge(NodeID s, NodeID t, NodeID n, EdgeWeight w, bool f, bool b, short ty, bool ra, bool ig) :
|
||||
_source(s), _target(t), _name(n), _weight(w), forward(f), backward(b), _type(ty), _roundabout(ra), _ignoreInGrid(ig) { if(ty < 0) {ERR("Type: " << ty);}; }
|
||||
explicit NodeBasedEdge(NodeID s, NodeID t, NodeID n, EdgeWeight w, bool f, bool b, short ty, bool ra, bool ig, bool ar) :
|
||||
_source(s), _target(t), _name(n), _weight(w), forward(f), backward(b), _type(ty), _roundabout(ra), _ignoreInGrid(ig), _accessRestricted(ar) { if(ty < 0) {ERR("Type: " << ty);}; }
|
||||
|
||||
NodeID target() const {return _target; }
|
||||
NodeID source() const {return _source; }
|
||||
@@ -58,6 +58,7 @@ public:
|
||||
bool isLocatable() const { return _type != 14; }
|
||||
bool isRoundabout() const { return _roundabout; }
|
||||
bool ignoreInGrid() const { return _ignoreInGrid; }
|
||||
bool isAccessRestricted() const { return _accessRestricted; }
|
||||
|
||||
NodeID _source;
|
||||
NodeID _target;
|
||||
@@ -68,6 +69,7 @@ public:
|
||||
short _type;
|
||||
bool _roundabout;
|
||||
bool _ignoreInGrid;
|
||||
bool _accessRestricted;
|
||||
};
|
||||
|
||||
class EdgeBasedEdge {
|
||||
|
||||
@@ -43,6 +43,11 @@ struct TurnInstructionsClass {
|
||||
const static short StartAtEndOfStreet = 14;
|
||||
const static short ReachedYourDestination = 15;
|
||||
|
||||
const static short AccessRestrictionFlag = (1<<14);
|
||||
const static short InverseAccessRestrictionFlag = ~(1<<14);
|
||||
|
||||
const static int AccessRestrictionPenaly = 1 << 15; //unrelated to the bit set in the restriction flag
|
||||
|
||||
std::string TurnStrings[16];
|
||||
std::string Ordinals[12];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user