world

It's sometimes useful to have a base map of the world on which you can overlay more detailed maps. It's impractical to create a fully detailed map of the world - it would be too large and makemap would take too long to run - but it's quite easy to create a world map containing coastlines, major administrative boundaries, and major roads only.

First you'll need the planet file containing the whole OpenStreetMap data, which (at the time of writing: January 2018) is about 37Gb in size in its PBF version, which is the most compact. Once you've completed this enormous download you can keep it up to date using the osmupdate tool. It's easiest to do this on Linux. Running the command osm_update --verbose --day --drop-author planet.pbf planet_new.pbf every week or two, then deleting planet.pbf and renaming planet_new.pbf to planet.pbf, is all you need do.

You will also need the coastline data. See the section 'How to add coastlines to a CTM1 file' in the main article on creating maps for details of how to obtain it and use it.

Now you can create the world base map. The best platform to use is Linux; the tools are subject to some limitations on Windows.

1. Convert planet.pbf to an o5m file using osmconvert:

osmconvert --verbose --drop-version planet.pbf -o=planet.o5m

2. Use osmfilter (which can't operate directly on pbf files) to extract the data subset:

osmfilter planet.o5m --verbose --keep="( boundary=administrative and ( admin_level=2 or admin_level=3 ) ) or highway=motorway or highway=trunk or highway=primary or place=state" -o=planet-base.osm

3. Create a map using the CartoType makemap tool:

makemap /largefile=yes planet-base.osm world_base_map.ctm1

The makemap command line doesn't specify a projection, so the default web mercator projection is used. You can use any projection you like, but remember that any maps overlaid on or combined with the base map will have to be created using the same projection.

The resulting map is about 8Gb in size. If you want a smaller map you could omit the roads by changing the osmfilter command line to 'osmfilter planet.o5m --verbose --keep="boundary=administrative or place=state" -o=planet-base.osm'.