Translating QCT (Quick Chart) Map Files

I’ve got a stash of old (2004 vintage) UK Ordnance Survey maps. They are really works of art and the the folk at the Ordnance Survey should be commended on the level of detail embedded in these maps. There’s just one small snag: the maps are in a rather obscure format. The proprietary Quick Chart (.qct extension) format is intended for use with Memory Map navigation software. If you want to use these maps for other purposes then you are stuck.

Existing Options

If you want to open these files then you can get yourself a copy of the Memory Map software. I also found that the GPXSee utility for mapping GPS paths would open these files. There are probably other options, but I could not find one that would allow me to convert these files as a batch and (importantly) do so for free (or at a nominal cost).

DIY

It looked like I’d have to roll my own solution. I found the details of the Quick Chart format which were reverse-engineered by Craig Shelley. The draft specification is detailed but complicated.

With a bit more research I found a Python script (presumably based on the format specification), qct.py, published as a Gist by @mgd020 which reads the QCT files and then exported them as PNG files. I also found something similar implemented in C++. This would probably be a lot faster, but I couldn’t get it to compile (admittedly I didn’t try very hard), so I focused on the Python script.

Updates & Improvements

The qct.py script was written for Python 2, so I updated it to work with Python 3. I also added the capability of exporting GeoTIFF files. The updated script can be found here.

Example

Let’s try out the resulting script on the Marlborough & Savernake Forest (ID 157, 1:25000) map.

qctconvert 157-marlborough-savernake-forest.qct

This results in two new files, a PNG and a GeoTIFF.

27M 157-marlborough-savernake-forest.qct
48M 157-marlborough-savernake-forest.png
47M 157-marlborough-savernake-forest.tif

The GeoTIFF file uses deflate lossless compression with a horizontal differencing predictor, which results in a file size similar to that of the PNG file.

Below is a small region of the PNG. Click on the image to open it in a new tab. Lots of interesting features in this very small piece of England:

Topographic map of vicinity of Avebury

The GeoTIFF uses the OSGB36 datum (EPSG:4277), which is tailored specifically for maps of the UK.