logo separator

[mkgmap-dev] RGN Section 6 and part of TRE Section 7

From thomas at ankarsvik.nu thomas at ankarsvik.nu on Wed Mar 15 18:43:13 GMT 2023

Hi,

Sorry if this is slightly of topic.

This is a typical dump from a file without Huffman encoding. (RGN 
Section 5)

TRE - Section 7 dump

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 
18 19 1A 1B 1C
--------------------------------------------------------------------------------------
  Sec 2     | Sec 3     | Sec 4     |  |Columns related to RGN Section 6
00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 06 00 00 00 13 00 00 
00 15 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 06 00 00 00 13 00 00 
00 15 00 00 00
0B 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 06 00 00 00 13 00 00 
00 15 00 00 00
17 00 00 00 00 00 00 00 06 00 00 00 01 00 00 00 00 06 00 00 00 13 00 00 
00 15 00 00 00
24 00 00 00 12 00 00 00 0C 00 00 00 01 00 00 00 00 06 00 00 00 13 00 00 
00 15 00 00 00
32 00 00 00 26 00 00 00 12 00 00 00 01 00 00 00 00 06 00 00 00 13 00 00 
00 15 00 00 00
41 00 00 00 3D 00 00 00 18 00 00 00 00 06 00 00 00 13 00 00 00 15 00 00 
00 1B 00 00 00

All rows except the last row is related to it's sublevel, Row 2 to 
sublevel 2 and so on.

Explanation to last row
41 00 00 00 = RGN Section 2 Length
             3D 00 00 00 = RGN Section 3 Length
                         18 00 00 00 = RGN Section 4 Length
                                     01 = Flag (Not allways first 
sublevel per zoom-level)
                                        06 00 00 00 = End of first part 
RGN Section 6
                                                    13 00 00 00 = End of 
second part in RGN Section 6
                                                                15 00 00 
00 = End of third part in RGN Section 6
                                                                          
   1B 00 00 00 = Total Length of RGN Section 6
RGN Section 6 dump

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
-----------------------------------------------
0B 11 72 2C E5 36 19 11 04 4C 91 D7 FC 4B 11 BE
CC 8F 1E E0 00 0B 11 72 2C E5 36

0B 11 72 2C E5 36                       : 0B >> 1 gives following byte 
length of 5
19 11 04 4C 91 D7 FC 4B 11 BE CC 8F 1E  : 19 >> 1 gives byte length of 
12 decimal
E0 00                                   : Seen E0 00 in other files
0B 11 72 2C E5 36                       : 0B >> 1 gives following byte 
length of 5

Shifting the first byte to give following byte length seems to be valid 
if the value is odd.
This is also valid within a byte array (amount of bytes in a sublevel) 
stated in TRE Section 7.

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
-----------------------------------------------
15 11 70 7C 76 6F ED 1A 3E 2F 34 15 11 E0 AF F7
12 A7 CB CD 17 34 0D 11 8C 5A F9 2F 01 0D 11 E0
CF 70 D9 3A 0F 12 68 7C CC E6 F0 00 0D 12 E0 1E
80 79 1F 11 11 D4 0B 3E 19 00 17 0C 0D 01 78 B2
41 DB 11 0D 11 F4 D0 F3 D8 01 0D 11 24 7F 30 D7


15 11 70 7C 76 6F ED 1A 3E 2F 34
15 11 E0 AF F7 12 A7 CB CD 17 34
0D 11 8C 5A F9 2F 01
0D 11 E0 CF 70 D9 3A
0F 12 68 7C CC E6 F0 00
0D 12 E0 1E 80 79 1F
11 11 D4 0B 3E 19 00 17 0C
0D 01 78 B2 41 DB 11
0D 11 F4 D0 F3 D8 01



In a Huffman encoded file looks RGN Section 6 much more "random".


00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
-----------------------------------------------
F9 9F 7F F8 3E 80 98 7D FC 09 45 F0 7C E6 E4 00
83 FF 7C 0A C8 E5 1F 40 40 FF 41 E4 80 CF FF C6
FF 7E C0 C9 40 F4 21 F2 FE 02 FF 33 F8 20 40 FF
FC FF E1 21 1F 7E 06 FF FD 00 FC FF A1 8F 29 FB

According to this file TRE Section 7 it should be splitted as

F9 9F 7F F8 3E
80 98 7D FC 09 45 F0 7C
E6 E4 00



The question is:
Do anyone know what it might be in RGN Section 6.
Even a bit more than what I found so far is of interest.
Any hint in this topic is much appreciated.

Best Regards

/Thomas


More information about the mkgmap-dev mailing list