A C++ implementation of the (unofficial) Quick Chart (.QCT) File Format Specification (v1.03) offering decoding of
.qct
map files and export to various formats
A small sample of a
.png
file exported from a .qct
file, depicting the famous Ben Nevis, the highest point in the
UK. All rights reserved by Ordnance Survey.
This project was inspired by the desire to convert a few of Ordnance Survey UK maps
that I have from the proprietary .qct
format into more widely accessible formats for use in image viewers and GIS
software. It provides a multithreaded C++ implementation of
the (unofficial) Quick Chart (.QCT) File Format Specification (v1.03)
by Craig Shelley.
- QCT File Decoding
- Multithreaded decoding
- Decoding of Huffman-Coded tiles
- Decoding of Run-Length-Encoded (RLE) tiles
- Decoding of Pixel-Packed tiles
- Note: Not implemented, as I have yet to I have yet to come across any
.qct
file with Pixel-Packed tiles. Feel free to open an issue with a sample.qct
file for implementation and testing purposes.
- Note: Not implemented, as I have yet to I have yet to come across any
- Export Formats
- Other
- Precompiled binaries for Windows, Linux, and macOS
- QCT3-file decoding
- Note: QCT3 files are not supported, as they may include encrypted data for Digital Rights Management (DRM). I may add support for these in the future, for the unencrypted portion that is.
The command-line interface (CLI) provides a straightforward way to decode .qct
files and export them to supported
formats. A path to the .qct
file is required. Optionally, one may export the .qct
file to various formats. If no
export options are specified, the tool decodes the file and prints its metadata.
<path/to/map.qct>
: Path to the input.qct
file (required)--force
: To attempt decoding anyways if the metadata is invalid or shows incompatible file
--export-kml-path <path>
: Export map boundaries to a.kml
file
--export-geotiff-path <path>
: Export georeferenced map to a.tiff
(GeoTIFF) file--geotiff-georef-method
: Specify the georeferencing method for GeoTIFF export:auto
: Automatically determine the most suitable georeferencing method. This is the default method.gcp
: Use GCPs (Ground Control Points) for georeferencing. This uses all the georeferencing coefficients (incl. higher order) from the.qct
file, yielding a more accurate result, when the higher order coefficients are non-zero. Note, not all GIS software support this method and that additional gdalwarp may be required for GIS software compatibility.linear
: GDAL GeoTransform using constant and first order polynomial coefficients. If the higher order georeferencing coefficients in the.qct
file are zero, this method is sufficient and recommended, as a wide range of GIS software support this method.
--export-png-path <path>
: Export map image to a.png
file
On Windows:
qct-convert.exe <path\to\map.qct> --export-kml-path <path\to\map.kml> --export-geotiff-path <path\to\map.tiff> --export-png-path <path\to\map.png>
On Linux/macOS:
qct-convert <path/to/map.qct> --export-kml-path <path/to/map.kml> --export-geotiff-path <path/to/map.tiff> --export-png-path <path/to/map.png>
This project would not be possible without the incredible work of Craig Shelley and Mark Bryant on the (unofficial) Quick Chart (.QCT) File Format Specification v1.03.