logo separator

[mkgmap-dev] MDR success and a couple of questions

From Alexander Atanasov aatanasov at gmail.com on Wed Sep 30 13:07:54 BST 2009

Hi, Steve!

On Wed, Sep 30, 2009 at 2:18 AM, Steve Ratcliffe <steve at parabola.me.uk> wrote:
>
> Hi Alex
>
>> 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.
>
> At first I didn't see how this could work with my example files, but I
> now think you are correct with one small difference in that type 0x28
> is out of place:
>
> first byte: type
> 1: all city types and perhaps all indexed points
> 2: 2a
> 3: 2b
> ... etc
> 7: 2f
> 8: 30
> 9: 28

28(regions) and 21(exits) may be are different, i don't have map that
contains them in mdr4.
(this types that are within ranges may be are types like the cities 1
byte, < 0xff and 1 byte options, like region idx, in the exits it's
exit flags)
Also its known that some types appear in more than one category, the
unknown byte may be related.
For the regions there is a section, so no need to be in the POIs.
For the exits probably there is a section too, like in the LBL file.
(exits appear realy rare in the free maps)

> So group 9 is out of order. Also what about points that have a type >
> 0x30?  File that have such points do not any entries in mdr 4 for
> them. Perhaps you just can't search for them?

in one of the maps i tested with there are 64XX,65XX,66XX types at the
end of mdr4,
so types greater than 0x30 should be possible.
garmin_mdr.c:337:1|76(4b)[00E1] type=0x3008 x=0(0) :30 00 08
garmin_mdr.c:337:1|77(4c)[00E4] type=0x6400 x=0(0) :64 00 00
garmin_mdr.c:337:1|78(4d)[00E7] type=0x6401 x=1(1) :64 01 01
garmin_mdr.c:337:1|79(4e)[00EA] type=0x6402 x=0(0) :64 00 02
garmin_mdr.c:337:1|80(4f)[00ED] type=0x6403 x=0(0) :64 00 03
garmin_mdr.c:337:1|81(50)[00F0] type=0x6404 x=1(1) :64 01 04
garmin_mdr.c:337:1|82(51)[00F3] type=0x6405 x=0(0) :64 00 05
garmin_mdr.c:337:1|83(52)[00F6] type=0x6406 x=1(1) :64 01 06
garmin_mdr.c:337:1|84(53)[00F9] type=0x6407 x=0(0) :64 00 07
garmin_mdr.c:337:1|85(54)[00FC] type=0x6408 x=1(1) :64 01 08
garmin_mdr.c:337:1|86(55)[00FF] type=0x640A x=1(1) :64 01 0A
garmin_mdr.c:337:1|87(56)[0102] type=0x640B x=0(0) :64 00 0B
garmin_mdr.c:337:1|88(57)[0105] type=0x640C x=0(0) :64 00 0C
garmin_mdr.c:337:1|89(58)[0108] type=0x640D x=0(0) :64 00 0D
garmin_mdr.c:337:1|90(59)[010B] type=0x640E x=0(0) :64 00 0E
garmin_mdr.c:337:1|91(5a)[010E] type=0x640F x=1(1) :64 01 0F
garmin_mdr.c:337:1|92(5b)[0111] type=0x6410 x=1(1) :64 01 10
garmin_mdr.c:337:1|93(5c)[0114] type=0x6411 x=0(0) :64 00 11
garmin_mdr.c:337:1|94(5d)[0117] type=0x6412 x=0(0) :64 00 12
garmin_mdr.c:337:1|95(5e)[011A] type=0x6413 x=0(0) :64 00 13
garmin_mdr.c:337:1|96(5f)[011D] type=0x6414 x=1(1) :64 01 14
garmin_mdr.c:337:1|97(60)[0120] type=0x6415 x=0(0) :64 00 15
garmin_mdr.c:337:1|98(61)[0123] type=0x6508 x=0(0) :65 00 08
garmin_mdr.c:337:1|99(62)[0126] type=0x650B x=0(0) :65 00 0B
garmin_mdr.c:337:1|100(63)[0129] type=0x650D x=1(1) :65 01 0D
garmin_mdr.c:337:1|101(64)[012C] type=0x6511 x=0(0) :65 00 11
garmin_mdr.c:337:1|102(65)[012F] type=0x6604 x=0(0) :66 00 04
garmin_mdr.c:337:1|103(66)[0132] type=0x660A x=1(1) :66 01 0A
garmin_mdr.c:337:1|104(67)[0135] type=0x6614 x=0(0) :66 00 14
garmin_mdr.c:337:1|105(68)[0138] type=0x6616 x=0(0) :66 00 16

in mdr9:
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


>
>> MDR10 - POIs indexed by type
>> 1 bytes - subtype
> Ha - I realised today it was subtype and not type, but I see you
> said it first.
>
>> 2/3 bytes - POI index in MDR11 - index have 0x8000 or 0x800000 flag->
>> if the point is indexed or not
>
> I think this flag is actually to say if the name is new or not.  If
> the flag is not set, then the name of the POI is the same as the
> name of the previous poi.
>
> Thanks I think I will be able to write mdr9 tommorow and hopefully
> everything will stop being a city!

Good luck!

-- 
have fun,
alex



More information about the mkgmap-dev mailing list