OSM Map On Garmin/GMP Subfile Format

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — OSM Map On Garmin/GMP Subfile Format
Afrikaans Alemannisch aragonés asturianu azərbaycanca Bahasa Indonesia Bahasa Melayu Bân-lâm-gú Basa Jawa Baso Minangkabau bosanski brezhoneg català čeština dansk Deutsch eesti English español Esperanto estremeñu euskara français Frysk Gaeilge Gàidhlig galego Hausa hrvatski Igbo interlingua Interlingue isiXhosa isiZulu íslenska italiano Kiswahili Kreyòl ayisyen kréyòl gwadloupéyen kurdî latviešu Lëtzebuergesch lietuvių magyar Malagasy Malti Nederlands Nedersaksies norsk norsk nynorsk occitan Oromoo oʻzbekcha/ўзбекча Plattdüütsch polski português português do Brasil română shqip slovenčina slovenščina Soomaaliga suomi svenska Tiếng Việt Türkçe Vahcuengh vèneto Wolof Yorùbá Zazaki српски / srpski беларуская български қазақша македонски монгол русский тоҷикӣ українська Ελληνικά Հայերեն ქართული नेपाली मराठी हिन्दी অসমীয়া বাংলা ਪੰਜਾਬੀ ગુજરાતી ଓଡ଼ିଆ தமிழ் తెలుగు ಕನ್ನಡ മലയാളം සිංහල ไทย မြန်မာဘာသာ ລາວ ភាសាខ្មែរ ⵜⴰⵎⴰⵣⵉⵖⵜ አማርኛ 한국어 日本語 中文(简体)‎ 吴语 粵語 中文(繁體)‎ ייִדיש עברית اردو العربية پښتو سنڌي فارسی ދިވެހިބަސް

OSM Map On Garmin

A reverse-engineering of Garmin's GMP Subfile format

GMP Header

Common Header

The structure of the common header is the same in all subfiles.

Byte Offset Length (bytes) Description
0x000 2 Header length. So far only '0x31' and '0x35' has been seen.
0x002 10 Type GARMIN GMP
0x00C 1 0x01 ?
0x00D 1 0x00
0x00E 2 Creation year
0x010 1 Creation month
0x011 1 Creation day
0x012 1 Creation hour
0x013 1 Creation minute
0x014 1 Creation second

Specific GMP Header

Byte Offset Length (bytes) Description
0x015 4 Offset?? Only seen 0x0000 in here so far
0x019 4 Absolute offset of start of .TRE header
0x01D 4 Absolute offset of start of .RGN header
0x021 4 Absolute offset of start of .LBL header
0x025 4 Absolute offset of start of .NET header
0x029 4 Absolute offset of start of .NOD header
0x02D 4 Absolute offset of start of .DEM header
0x031 4 Absolute offset of start of .MAR header (Bluechart G2)

Copyright Message Section

Byte Offset Length (bytes) Description
after GMP header ?? Copyright messages. This is a section of ASCII text, null-terminated. There may be several null-terminated sentences present here. The copyright messages fill the .GMP file up to the start of the first subfile present.

The offsets

Each offset present in the GMP Header is the absolute position in the .GMP file where you'd expect to find the first byte of the Common Garmin Header for that subfile. The Common Header of each subfile tells you exactly what type of file it is part of, though the offsets in the GMP Header seem always to be in the same order.

No idea what the offset at 0x0015 might indicate.

Presumably, any of the offsets could be zero if the .GMP file doesn't have that sort of subfile amongst its contents?