nodeFlags & wayFlags

I am just going through the OSMReader class.
Could anyone explain me what exactly this if statement is checking?

if ((nodeFlags & wayFlags) > 0)

Good question :slight_smile:

I think the following but I’m not 100% sure (we can ask NopMap): the bit range for one vehicle is assumed to be the same (wrong?) and the bit AND checks if there are at least some way bits in the “active” node bit area. If no bits in the wayFlags are set then the way is not passable which would make the split unnecessary. But one could try this theory via removing it and see if some unit tests break :slight_smile:

1 Like