mbedchallenge: Garmin IMG Renderer

Overview

For the mbedchallenge competition I'm hacking together a library for reading Garmin IMG files (used to store mapping and routing data) and rendering them to an LCD screen.

I'm using IMG files created from Open Street Map data. The IMG format is pretty compact (especially compared to raw OSM XML data), the test file I'm using covers most of Wales including map vectors, road/place names, points of interest and routing data and is just 9MB.

This page just provides a vague log of my progress, a proper tutorial on using the library will follow upon its completion.

Progress

October 8th 2010

A Garmin IMG file is structured as a basic file system within a file, with different sub files providing different types of data. For a good introduction to the format check out John Mechalas' IMG format document. Currently the library can read in the header information for the overall file and output a few details, such as:
Description: OSM World Routable   

I've also put together some structures for handling the file allocation table which points towards all the sub-files and gives some metadata about their type, modification date, etc. So it's possible to get hold of some details about individual sub-files within the IMG, e.g.:

Files: 80
File 7: 63240290, Type: RGN

Showing the total number of file entries in the file allocation table and the filename and file type for the 7th file (RGN being a "Region" file containing lines, polygons and points).


0 comments

You need to log in to post a comment