[mkgmap-dev] Re: my map testing
From Alexander Atanasov aatanasov at gmail.com on Fri Dec 12 01:18:06 GMT 2008
Hi, Robert! On Thu, Dec 11, 2008 at 11:45 PM, Robert Vollmert <rvollmert-lists at gmx.net> wrote: > A bitstream appears to be as follows: > > signinfo > extra bit 0 > deltas 1 > extra bit 1 > deltas 2 > extra bit 2 > ... > deltas n > extra bit n > > I.e., there's n+1 extra bits for n deltas. This is a little hard to track > down because the last extra bit is usually zero, but there are cases where > it isn't. But even if it's zero, this bit may mean that an extra zero byte > is written. That last extra bit went in with r730, fixing some problems. > > Now, suppose "deltas k" describe "coordinate k" (with the polyline starting > at coordinate 0). It's kind of open whether "extra bit k" should be > associated with coordinate k, with coordinate k+1, or with the line segment > between coordinates k and k+1. > > But associating extra bit k with coordinate k offers the easiest > interpretation of the extra bits I've seen: Except for extra bit 0 and extra > bit n, extra bit k is set iff coordinate k is a node. I've never seen extra > bit 0 set, and I believe extra bit n is set iff coordinate n is a node of > the road, but not the last node. > > All quite unsure, though. I've seen 0x00 at the end too, but i think it's the zero delta or padding most probably if bpx+bpy+eb > 8, so every thing can be read in 16 or 32bit chunks. I did some quick tests here but can not find a map with the zero eb set or the last is set too. can you send me such map for testing? eb marks a node, that's sure. two nodes make the arc. and that's why first and last are not so important. from the gps position you find the closest point on the line P0, P1,P2,P3. It's between two nodes and you travel to one of them. S--P0---N1-----P1------P2-------N2---P3-------E(s1) If on P0, next node is N1, if past N1 next is N2, if past P3 you reach the end of line. You don't need eb at S and E in that case. If there is one more segment continuing at E E(s2)---P4---N3-------N4------E2 E(s1) and E(s2) are exactly the same point, that continues the line. the line is connected and you are between N2 and N3 - thats the arc. If E is a node you need an eb in that case on P4, you are between E and N3. Traveling in the oposite direction is the same, if you leave the line over S you are on a new road, if you are past N1 you travel to S. That's why i think that S don't need an eb(you can always consider it as a node). And E only if there are more segments. More important are bmlen and the bitmap. bmlen is the count of nodes bitmap probably defines nodes to skip. When you start to read from the node how much nodes there are that point to the same road in NET. Reading is something like that read the node, recursive walk all arcs and follow the ones that are for the same road as the starting node. That gives exactly bmlen nodes. That's needed when you want to find where are you on the road. More testing will show better what is what :) -- have fun, alex
- Previous message: [mkgmap-dev] Re: my map testing
- Next message: [mkgmap-dev] Re: my map testing
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list