Here are answers to some questions frequently asked about CartoType.
Will CartoType run on any platform?
Yes, as long as that platform has a C++ compiler supporting C++17.
Can I add my own data to the map?
Yes, you can add your own points, lines and polygons; in fact you can add any type of map object at run-time (except bitmap objects, which are used for terrain shading and similar things); objects can be added to any layer, or you can create new layers.You can add extra styles for these objects, either at run-time, or by adding them to your custom style sheet.
Why is a CTM1 file twice the size of a PBF file?
A CTM1 file is a file in CartoType's own map file format. A PBF file contains OpenStreetMap data encoded compactly using the protocol buffer system.
A CTM1 file is normally about twice the size of a PBF file. The actual main data (layer data) is roughly the same size as the PBF file, but there are several other tables necessary to make things work, or speed things up. The main ones are
- the low-resolution layer data: when you zoom right out you don't want to incur the cost of loading detailed polygons like (say) the entire eastern coastline of the USA. The lower resolution copies remove any features which would be less than a pixel in size when drawn. Turn this off using /lowreslayers=no as a makemap argument, at the cost of slower drawing.
- the full-text index; turn it off using /textindex=no, at the cost of poor or slow address searching.
- the route network; turn it off using /route=no, at the cost of not being able to create routes.
Here's an example of how things break down, using a map of the eastern part of the US state of Virginia. I obtained the data using the mapinfo tool, which you can download: https://www.cartotype.com/assets/downloads/mapinfo.exe. Linux and MacOS versions of mapinfo are also available: https://www.cartotype.com/assets/downloads/mapinfo_linux and https://www.cartotype.com/assets/downloads/mapinfo_mac.
east_virginia.pbf = 253Mb
east_virginia.ctm1 = 424Mb
extract from ctm1_info report:
table 0: global information (166 bytes, 0.00Mb)
table 1: layer data (266637835 bytes, 254.29Mb)
table 4: projection table (99 bytes, 0.00Mb)
table 5: table of compressed strings (776336 bytes, 0.74Mb)
table 6: low-resolution layer data (41879150 bytes, 39.94Mb)
table 8: index used for text searching (57499012 bytes, 54.84Mb)
table 10: routing network (A*) (56946763 bytes, 54.31Mb)
table 12: extra information for the routing network (A*) (9493 bytes, 0.01Mb)
I want to create maps of countries including parts of bordering countries
If you want to create a map of a European country (for example) with a bounding box in degrees which contains parts of bordering countries, it's not practical to download the OSM data for the whole of Europe, then use the /extent parameter with makemap, because makemap loads all the data before clipping it to the bounds; and that takes a long time and about 100Gb of RAM. Here is what you should do instead:
1. Download the OpenStreetMap data for the entire planet in PBF format. It is currently (in November 2026) 76Gb in size. You can then keep it updated using osmupdate.
2. Extract rectangular or polygonal regions using osmconvert on planet.pbf. The best thing to do is to ask it to write the extracts as PBF files, which are more compact than OSM files.
3. Run makemap on the PBF files you have extracted. You can use osmconvert to convert to OSM format and pipe the output to makemap, like this:
osmconvert denmark.pbf | makemap -project=laea -.osm denmark.ctm1
The special input filename _.osm tells makemap to read from standard input.
Can I use CartoType with Qt?
Yes. In fact our multi-platform Maps App is written in Qt, using the CartoType C++ API. The source code is availble for your use under the MIT license.
Using the CartoType Windows SDK, link your app with bin\18.0\x64\ReleaseDLL\cartotype.lib and bin\18.0\x64\ReleaseDLL\CartoTypeQtMapRenderer.lib.
Using the CartoType Linux SDK, link your app with bin/libcartotype.a and bin/libCartoTypeQtMapRenderer.a.
Please contact us if you would like to use CartoType with Qt on other platforms.
How can I set the color of a map object when I insert it using InsertMapObject()?
Lines and polygons
You can give every map object that is a line or a polygon its own main color and border color, overriding any colors set in the style sheet. Formerly (before CartoType 7.4) that was possible only for icons. The new feature is principally useful when inserting map objects at run time ('dynamic map objects') but can be used when building the CTM1 file by inserting appropriate logic in the .makemap rules.
The colors are set using the map object attributes _color and _border_color. Colors can use any color expression that is valid in a style sheet. For example: 'blue', 'orange+0.25white', '#A00', '#08123456'. A color expression consists of one or more sections separated by plus signs. The format of a section is
{ '+' { blend-ratio } } hex-color | color-name
where blend-ratio is an optional number; if it's between 0 and 1 inclusive it's treated as a fraction, otherwise as a number of 255ths; and hex-color is either #RGB, #RGBA, #RRGGBB or #RRGGBBAA. The plus sign and blend-ratio are legal only if there is a previous color to blend with.
Icons
You can set the color of an icon using the _color attribute. It sets the overall color of an icon by 'colorising' it: converting it to grey-scale then drawing it in the selected color. For best results when setting icon colors in this way use monochrome black icons.
Can I rotate an icon to point in any direction?
You can draw icons along a line object using the repeatedSymbol element in a layer. The documentation (also see this article) is the same as for <oneWayArrow>, but <oneWayArrow> works only for one-way streets, while <repeatedSymbol> works for all linear objects. Note that gap='0' causes a single element only to be drawn.
Icons for point objects can be made to point in a fixed direction relative to true north by using the 'angle' attribute in the <icon> element in a style sheet, or using the _angle attribute (note the leading underscore, which prevents the angle being found in a text search) in a map object. Angles are given in degrees clockwise from true north.

