[mkgmap-dev] MDR success and a couple of questions
From Alexander Atanasov aatanasov at gmail.com on Wed Sep 23 10:49:38 BST 2009
Hi! This is going to be a long post. MDR1 - Images List. 4 bytes image id, 4 bytes detailed map id, like in the tdb MDR4 1 byte type, 1 byte unknown, 1 byte subtype garmin_mdr.c:1020:1|POI Type garmin_mdr.c:337:1|1(0)[0000] type=0x0300 x=4(4) :03 04 00 garmin_mdr.c:337:1|2(1)[0003] type=0x0400 x=4(4) :04 04 00 garmin_mdr.c:337:1|3(2)[0006] type=0x0700 x=3(3) :07 03 00 garmin_mdr.c:337:1|4(3)[0009] type=0x0800 x=3(3) :08 03 00 garmin_mdr.c:337:1|5(4)[000C] type=0x0A00 x=2(2) :0A 02 00 garmin_mdr.c:337:1|6(5)[000F] type=0x0B00 x=2(2) :0B 02 00 ------------------------------------------------------------------------------ garmin_mdr.c:337:1|7(6)[0012] type=0x2A00 x=1(1) :2A 01 00 garmin_mdr.c:337:1|8(7)[0015] type=0x2A03 x=1(1) :2A 01 03 garmin_mdr.c:337:1|9(8)[0018] type=0x2A04 x=1(1) :2A 01 04 garmin_mdr.c:337:1|10(9)[001B] type=0x2A05 x=1(1) :2A 01 05 garmin_mdr.c:337:1|11(a)[001E] type=0x2A07 x=1(1) :2A 01 07 garmin_mdr.c:337:1|12(b)[0021] type=0x2A09 x=1(1) :2A 01 09 garmin_mdr.c:337:1|13(c)[0024] type=0x2A0A x=1(1) :2A 01 0A garmin_mdr.c:337:1|14(d)[0027] type=0x2A0B x=1(1) :2A 01 0B garmin_mdr.c:337:1|15(e)[002A] type=0x2A0C x=1(1) :2A 01 0C garmin_mdr.c:337:1|16(f)[002D] type=0x2A0D x=0(0) :2A 00 0D garmin_mdr.c:337:1|17(10)[0030] type=0x2A0E x=0(0) :2A 00 0E garmin_mdr.c:337:1|18(11)[0033] type=0x2A12 x=0(0) :2A 00 12 --------------------------------------------------------------------------------- garmin_mdr.c:337:1|19(12)[0036] type=0x2B00 x=1(1) :2B 01 00 garmin_mdr.c:337:1|20(13)[0039] type=0x2B01 x=1(1) :2B 01 01 garmin_mdr.c:337:1|21(14)[003C] type=0x2B03 x=0(0) :2B 00 03 garmin_mdr.c:337:1|22(15)[003F] type=0x2B04 x=0(0) :2B 00 04 --------------------------------------------------------------------------------- garmin_mdr.c:337:1|23(16)[0042] type=0x2C00 x=0(0) :2C 00 00 garmin_mdr.c:337:1|24(17)[0045] type=0x2C01 x=0(0) :2C 00 01 garmin_mdr.c:337:1|25(18)[0048] type=0x2C02 x=0(0) :2C 00 02 the --- lines are where the type changes, this is used later in MDR9 MDR6 - Cities 1/2 bytes IMG id from MDR1 1/2 bytes (city index) not sure about this, 1 or 2 bytes is from the first bit in the flags(after record size in header) 3 bytes label offset in the image, here 0x800000 is set if the point is indexed 2 bytes region id in MDR13 3 bytes label offset in MDR15 MDR7 - Roads 1/2 bytes IMG id from MDR1 3 bytes - unknown, may be a pointer in NOD, it's not a label or NET offset 3 bytes label offset in MDR15 MDR9 - Poi Category index 1 bytes - unknown 2/3 bytes - poi index in MDR11 garmin_mdr.c:1202:1|o9: 643317 44 4 0 garmin_mdr.c:977:1|POI Index1 garmin_mdr.c:337:1|1[0000] i=1 o=1(1) idx:50094 [163C66:ABLANITSA] :01 01 00 00 garmin_mdr.c:337:1|2[0004] i=2 o=1389(5001) idx:5189 [A38:117] :02 89 13 00 garmin_mdr.c:337:1|3[0008] i=3 o=16B3(5811) idx:50090 [163C30:A LA FIESTA (PARK HOTEL)] :03 B3 16 00 garmin_mdr.c:337:1|4[000C] i=4 o=1944(6468) idx:3 [9A1:1] :04 44 19 00 garmin_mdr.c:337:1|5[0010] i=5 o=1C10(7184) idx:30739 [E85:4] :05 10 1C 00 garmin_mdr.c:337:1|6[0014] i=6 o=1DA5(7589) idx:2 [1512D:"PIKADILI PARK"] :06 A5 1D 00 garmin_mdr.c:337:1|7[0018] i=7 o=1FD2(8146) idx:15 [9A1:1] :07 D2 1F 00 garmin_mdr.c:337:1|8[001C] i=8 o=11CFA(72954) idx:26 [9A1:1] :08 FA 1C 01 garmin_mdr.c:337:1|9[0020] i=11 o=11FB8(73656) idx:1 [15129:???] :0B B8 1F 01 garmin_mdr.c:337:1|10[0024] i=12 o=12C79(76921) idx:65336 [3034:BLATO] :0C 79 2C 01 garmin_mdr.c:337:1|11[0028] i=13 o=12CAF(76975) idx:50432 [1644FE:ARKATA] :0D AF 2C 01 garmin_mdr.c:1003:1|Done 11 len:44 rs:4 The unknown byte is sequential as you see above. >From MDR4 where the type changes(just type, no the subtype) it coresponds to a record here. So you have a type from here you find where point with that type start in MDR10. MDR10 - POIs indexed by type 1 bytes - subtype 2/3 bytes - POI index in MDR11 - index have 0x8000 or 0x800000 flag-> if the point is indexed or not MDR11 - POIs sorted 1/2 bytes - IMG id from MDR1 1 byte - point index in the image 2 bytes - subdiv index in the image 3 bytes - label offset in the img, 0x800000 flagged, index or no index point(not sure) 2 bytes - region index 0x8000 flagged - may be city or region 3 bytes - label offset in MDR15 MDR13 - Region 1/2 bytes - IMG id from MDR1 2 bytes - region id 2 bytes - country id from MDR14 3 btyes - label offset in MDR15 MDR14 - Country 1/2 bytes - IMG id from MDR1 2 bytes - Country ID 3 bytes - label offset in MDR15 MDR15 - Labels 0 terminated strings referenced from other sections if flags is not 0, it's compressed/encoded If header is more than 286 i've seen this: MDR24 1/2 bytes - IMG id from MDR1 2 bytes - region id same as in MDR13 2 bytes - country id same as in MDR14 3 bytes - label offset in MDR15 MDR29 1/2 bytes - IMG id from MDR1 2 bytes - region id same as in MDR13 3 bytes - label offset in MDR15 3 bytes - unknown yet. -- have fun, alex
- Previous message: [mkgmap-dev] MDR success and a couple of questions
- Next message: [mkgmap-dev] MDR success and a couple of questions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list