Hi all,
thanks first of all for this great project! I’m currently trying to adapt it to my needs and encountered a problem. I don’t really understand what the encoders are doing and as I’d like to add additional information (like the value of the maxspeed tag) this is a problem.
From what I understand
EncodingManager.registerEncoder( AbstractFlagEncoder encoder )
is using the same long variable to add the WayBits and the RelationBits. Now I was debugging through the Test-case “OSMReaderTest.java” and when the encoder for “FOOT” ist added (line 103 of OSMReaderTest.java), I can see in “registerEncoder” that the nextWayBit = 18 while nextRelBit = 3. The Bitmasks are set accordingly. Is that correct. Aren’t we now using the same bits for the Way information of the car encoder and the relation information of the foot encoder?
So for the bitmasks of the two encoders “car” and “foot” I observe the following:
wayBitMask_car = 0000 0000 0000 0000 0000 0000 1111 1111
wayBitMask_foot = 0000 0000 0000 0011 1111 1111 0000 0000
relBitMask_foot = 0000 0000 0000 0000 0000 0000 0000 0111
Which would mean, while the wayBits for foot and car are exclusive, the relBits of foot interfere with the waybits for the car.
Is this a bug or am I missing something? Maybe both encoders get an own long flag variable? But if so, why are the wayBits for foot then shifted such, that they don’t hit the wayBits for the car encoder?
Thanks
Stefan