You can create CartoType maps (CTM1 files) from OpenStreetMap data, ESRI shapefiles, SRTM elevation data and other sources using the makemap tool.

Download makemap, the CartoType data conversion tool

You will need the program makemap, which you can download using one of the links below

By using the CartoType makemap tool (makemap.exe, makemap_mac, makemap_linux or any other variant, not necessarily having one of the names listed here), however acquired, you accept the terms of the CartoType Evaluation License and you also accept that neither CartoType Ltd, nor any owners, shareholders or officers of CartoType Ltd, or any other contributors to, authors of or maintainers of the CartoType system, are liable for any damage, direct or consequential, caused by downloading, installing or using the makemap tool, and that the makemap tool is not warranted fit for any particular use and may not be used for any commercial purpose.

The program exists in these versions:

makemap.exe for Windows

makemap_mac for the Macintosh

makemap_linux for 64-bit x86 Linux

The current version of makemap was built using CartoType 6.2.11.

To uninstall the makemap tool, delete the program from your computer.

Important changes since the release of CartoType 6.2.0


Command-line arguments

  • you can put command-line arguments in any order
  • items starting with / are options (like /project=utme) - but if the first option starts with a hyphen (-), other options must start with a hyphen, leaving you free to use items starting with / for filenames, which is useful on unix-like platforms
  • items starting with + are proj4 projection parameters
  • other items are input filenames, except for a name ending in .ctm1, which specifies the output file name (which is otherwise inferred from the first input file name)

You can use various data formats. Data formats are inferred from file extensions. Here are the main ones:

  • .osm - OpenStreetMap data (and you can use PBF data by piping the output of osmconvert to makemap: see below for details)
  • .makemap - rules for importing OSM or SHP data - affects files later on the command line
  • .hgt - USGS height data
  • .tif (if accompanied by .prj and .tfw files) - georeferenced images
  • .png (if accompanied by .prj and .pgw files) - georeferenced images
  • XX.txt - a postcode data file from; XX is the country code

Data from several data sets can be combined into a single map: just put as many filenames as you like on the command line. 

The map data files (CTM1 files) are usable by any version of CartoType.

Automatic options

makemap does as much as possible automatically. For example, if you use this command:

makemap myfile.osm

it will automatically

  • use the options /project=m /clip=yes /route=yes /lowreslayers=yes /textindex=full /compress=as /input=coastlines.makemap
  • generate the extent of the data from the contents of myfile.osm and clip the coastlines to that extent
  • write the output to myfile.ctm1

Large files

Ordinary CTM1 files are limited to 4Gb, but if you need to create a file larger than that (you'll get an error message from makemap telling you if that's necessary) you should use the command-line option /largefile=yes. That option stores internal file positions in 5 bytes instead of 4 bytes, and thus allows files up to 2^40 bytes or 1 terabyte in size.

However, you need a lot of RAM: over 10Gb to create a map of the whole of Germany or France; and makemap may take an hour or two to run. Use a version of makemap built using CartoType 5.12.54 or later because it will use far less RAM (type 'makemap' with no parameters on the command line to print the version).

Here's an example of RAM use and time taken when building a large file. This test was done on 10th May 2020 using a Lenovo W530 Windows computer with 32Gb of RAM.

  • source data: OpenStreetMap data for Germany, Austria and Switzerland downloaded on 10th May 2020, USGS height data, and postcode data.
  • command line: osmconvert dach-latest.osm.pbf | makemap /largefile=yes /project=laea /urbanareas=yes /extent=5.6,45.7,17.4,55.1 /input=e:\postcodes\at.txt /input=e:\postcodes \ch.txt /input=e:\postcodes\de.txt /input=e:\ctm1\coastlines.makemap /usgs=e:\new-height-data /terrain=height-metres /usgs=e:\new-height-data -.osm /name="Germany, Austria and Switzerland" germany_austria_and_switzerland.ctm1
  • time taken: 1h:53m:54s
  • peak RAM use: 21Gb.
  • size of output CTM1 file: 8.7Gb.

Large files can be used with the Windows, iOS and .NET SDKs but not yet with Android.

PBF data

You can use PBF data as input to makemap by using the osmconvert program to translate it to OSM format. This is the easiest way to use data obtained from Geofabrik, because PBF files are even smaller than OSM files compressed using bzip2. For example, here's a Windows command line to create a map of Britain and Ireland (omitting some command-line options not needed for this example):

osmconvert64 british-isles-latest.osm.pbf | makemap /project=osgb /urbanareas=yes /extent=-15,47,7,63 /input=e:\ctm1\coastlines.makemap -.osm britain_and_ireland.ctm1

Compressed OSM data

If you have obtained OSM data in compressed form, for example as an .osm.bz2 downloaded from Geofabrik, there is no need to decompress it to a file before using it in makemap. Instead, you can decompress it to standard output using bunzip2, and send it straight to makemap without storing it anywhere. For example, the data for North America takes over 10Gb when compressed, and you probably don't want to decompress it to a file, taking up about 60Gb of hard disk space.

This Windows command line can be used to decompress to standard output and feed that data to makemap (omitting some command-line options not needed for this example):

bunzip2 north-america-latest.osm.bz2 -c | makemap /largefile=yes /extent=-180,0,-40,85 /input=coastlines.makemap -.osm north-america.ctm1


  • The -c command-line option tells bunzip2 to write to standard output.
  • The ('pipe') operator redirects standard output to be the input to the next command, makemap.
  • Using -.osm as an input file name tells makemap to read from standard input.

Use OpenStreetMap data

This method uses data from OpenStreetMap, a organisation that is creating a world-wide street map from data collected by volunteers using GPS devices.

Download OSM files from one of the links here

or you can make OSM files for any area:

Use the Export button in the main OpenStreetMap map page. Unless the area you want is very small you'll see a message stating that the area is 'too large to be exported as OpenStreetMap XML Data'. In that case, just click on 'Overpass API':

getting osm data

Note: there is a bug (logged as ticket 5169 in the OSM issue tracker) in the script used by OSM for its Overpass query. It can cause lakes and other large polygon areas to be omitted if they overlap the bounds. If that happens (as it will, for example, when exporting greater Stockholm, Sweden), use this query, with your values for the bounds w, s, e and n:

<osm-script timeout="10000" element-limit="1073741824">
   <union into="_">
      <bbox-query into="_" w="17.8" s="59.2" e="18.3" n="59.5"/>
      <recurse from="_" into="_" type="up"/>
      <recurse from="_" into="_" type="down"/>
 <print from="_" limit="" order="id"/>

Paste it directly into the upper query box at


Use the command

makemap map.osm


makemap_x64 map.osm

This will create a .ctm1 file that can be loaded by any of the CartoType demonstration programs. As standard (you can change this using command-line options: see below) it uses the web Mercator projection.


On the Apple Macintosh makemap_mac needs to be run in the 'bash' shell, which can be accessed by opening a terminal window. You need to give the program executable permission before you first use it:

chmod a+x makemap_mac

then run it like this:

./makemap_mac map.osm

This will create a .ctm1 file that can be loaded by any of the CartoType demonstration programs. As standard (you can change this using command-line options: see below) it uses the web Mercator projection.

How to add coastlines to a CTM1 file

The best way is to use coastline data created by Jochen Topf, a member of the OpenStreetMap community.

  1. Get the coastlines in ESRI shapefile format from The best file to use is the one containing complete polygons in WGS84 latitude and longitude format. (Don't use the version which splits large polygons, because the way they are split causes them to leave gaps when used in non-Mercator projections.) Unpack the files and put them in a folder called \coastlines.
  2. Create a file called coastlines.makemap as follows:

    <?xml version="1.0" encoding="UTF-8"?>
       <file name='..\coastlines\land_polygons.shp'>
          <commit layer='outline'/>

  3. Run makemap with these extra options:

    /extent=<min-long>,<min-lat>,<max-long>,<max-lat> /clip=yes /input=coastlines.makemap

    The longitudes and latitudes for the /extent option should be big enough to enclose all the rest of your map data. The /extent option tells makemap to select only coastlines in that region from the coastline data. If you don't specify an extent, the extent is generated automatically from the bounds of the other map data.

  4. Use either of the standard style sheets provided by CartoType, or use your own style sheet and provide a style for the 'outline' layer.

If your coastlines.makemap file is in the directory you run makemap in, you don't need to specify it on the command line: makemap will notice that you haven't imported coastlines and import them automatically.

Creating route data

To create standard route data for a map, use /route=yes.

To create low-memory route data to enable routing over large areas on mobile platforms like Android and iOS, using the contraction hierarchy system, use /route=tech. Be warned that creating contraction hierarchy route data can take a long time: up to several hours for a country like Germany.

The TECH (turn-expanded contraction hierarchy) routing system is faster and uses less memory, so it is generally to be preferred unless you need to change the routing profile dynamically, since it supports a fixed set of routing profiles only.

Using a .makemap file to control the conversion from OSM to CTM1 format

You can optionally control the way data is converted from OSM to CTM1 format, and which data is used, and which data is omitted, using an XML file containing rules. By convention such a file has the extension .makemap. You supply its name on the command line, before the names of any osm files it needs to affect, using /input=<rules file name>.

The .makemap rules language is described here.

The standard rules

The standard rules are stored by makemap. You can write them out, so that you can edit them and create a customised version, by using the following command:

makemap /writerules >standard.makemap

Importing SHP data using a .makemap file

You can import SHP data using a .makemap file like this:

<?xml version="1.0" encoding="UTF-8"?>
 <file name='..\coastlines-complete\land_polygons.shp'>
 <commit layer='outline'/>

See the main documentation for .makemap files for a full explanation of how to convert the fields in each map object to your desired CTM1 attributes.

Using USGS height data (.hgt files) to create terrain

Digital height data can be obtained from more than one source. A convenient one is the United States Geological Survey, which publishes data as tiles for one-degree-square sections of the world in a simple format called HGT. Here is the site containing the data and documentation. Other sources are described, reviewed and referenced at ViewFinder Panoramas.

Disclaimer: as with all map data, neither Cartography Ltd nor CartoType Ltd nor any of its officers, directors, employees or sub-contractors take responsibility for or guarantee the copyright status or intellectual property status of this data. It is the user's responsibility to obtain permission for using data.

First download SRTM3 data covering the area you are interested in. For example, the USGS data for Eurasia is here. The files will usually be zipped and have names like Unzip them and don't change the names: makemap uses the filenames to identify the correct data. The names refer to the south-west corner of the one-degree tile. Put all the files in a single directory. In the example below, the directory name is \usgs-height-data.

Then add it to your map using the /usgs command-line parameter in the makemap tool. The format is

/usgs={<extent>,}<directory> - load USGS height data (.hgt) files for the extent from the directory given

and you can specify the extent as either three numbers, giving the OpenStreetMap map tile number in the form zoom, x, y; or four numbers, min-long, min-lat, max-long, max-lat. If you omit the extent, you can specify it earlier on the command line using /extent; if you don't specify it in either place it will be generated automatically from the combined bounds of all the other data except the coastlines.

Other parameters affecting height data are:

/terrain=height|height-feet|shadow - generate height or shadow arrays from height data; affects following files; default is shadow

/interval=n umber - interval between terrain sample points in metres; default is 250; the SRTM3 data is sampled at 90m so for this data there is no advantage in using an interval less than 90. The smaller the interval, the larger the data.

Here is an example showing how to generate a map of Greece with both height in feet and shadows. (Don't use both layers unless you are happy to incur the cost of slightly slower display and larger data.)

makemap /lowreslayers=yes /compress=a /project=m /extent=18.74,34.39,29.64,42.19 /interval=100 /usgs=\usgs-height-data /terrain=height-feet /usgs=\usgs-height-data /input=coastlines.makemap greece.osm

Notes on parameters used in the example

/lowreslayers=yes - create sets of layers for different zoom levels - speeds up map display but increases data size by about 30%.

/compress=a - compress arrays: that is, compress the array objects used to store terrain using ZLIB

/project=m - use spherical Mercator projection

/extent=18.74,34.39,29.64,42.19 - set the extent, both for getting coastlines and for terrain. These bounds in lat/long cover the whole of Greece.

/interval=100 - resample the data at an interval of 100 metres

/usgs=\usgs-height-data - specify the location of the height data (.HGT) files; this parameter creates a terrain-shadow layer, which is the default

/terrain=height-feet /usgs=\usgs-height-data - these two parameters change the terrain mode to create a terrain-height-feet layer, and reload the height data

/input=coastlines.makemap - load the SHP data for the coastlines (see above)

greece.osm - load the OSM data for Greece

Importing postal codes

Postcodes are automatically imported from OpenStreetMap data by the standard import rules. However, only a few countries like Germany have complete or almost complete coverage of postcodes in their OpenStreetMap data. Therefore it is useful to be able to import postcodes from another source. They can be obtained from the GeoNames site, which has zipfiles with names made from the standard two-letter country code, plus the extension .zip. Thus the postcodes for Austria are in the file This data is available under the creative commons attribution license. Each zipfile contains a file with the extension .txt: e.g., AT.txt, BE.txt, etc.

To import postcode data from one of these files, add it as an input file in the makemap command line. For example, here's a makemap command for Austria:

makemap /project=utme /urbanareas=yes /extent=9.2,46.2,17.8,49.2 /usgs=e:\new-height-data /input=e:\ctm1\coastlines.makemap /input=e:\postcodes\AT.txt austria.osm

The postcodes in a GeoNames file are points, so this data is not quite as useful as the polygon data available for Germany and some other countries, which enables more accurate geocoding; with point data, CartoType has to assume that a place belongs to its nearest postcode point, which is not always true.

GeoNames postcode data is imported into the 'postcode' layer as point objects. The postcode itself becomes the 'pco' attribute, and the place name, if any, associated with the postcode, becomes the label of the object.

Note on GB data. One of the GeoNames files for Great Britain,, contains the file GB_full.csv. You will need to rename it to GB_full.txt before using it with makemap.

speeded up TECH routing by leaving arcs in the order in which they were created instead of sorting them