I have an app that uses slippy maps. The tiles I'm currently using contain a lot of information that is superfluous to my users.

I've been investigating generating replacement map tiles that contain only very basic features such as country/province boundaries, rivers, lakes, EEZ lines (the application focuses more on water than land) and maybe railways and major motorways when at high zoom levels.

First I tried loading planet.osm.bz2 (a 21GB file) into Maperitive. This appeared to be a bad idea as the process memory usage rose quickly beyond that which my machine could tolerate. I've tried again on smaller files (such as Antarctica alone) and have more success, but I really need to generate tiles for the entire Earth.

Most of the features in these large OSM data files are not of interest to me.

Can someone please recommend an approach that should run on my x64 Win7 PC with 4GB RAM?

  • 2
    To what depth are you going to generate the tiles? If you go to zoom level 18 or beyond for the entire planet you might run out of file handles. I ran into this problem for a much smaller area than the entire planet. On zoom level 18 we are already talking about 68.719.476.736 tiles and thus files (unless you are planning to generate them on the fly).
    – mrg
    Jan 6, 2012 at 16:28
  • @mrg, generally folks won't be needing to zoom in too far, and if they do then I will fall back to the current tiles. The main issue I'm trying to address is that when looking at entire continents/countries/oceans, the detail on land is distracting from the content I'm showing. So I expect I could cap tile generation at level 12 or so. Thanks for your input. Jan 6, 2012 at 16:36

2 Answers 2


Maperitive only works with small map areas, not the whole planet, since it loads all of the map data into RAM. If you need to cover the whole Earth, you should use Mapnik or TileMill.

  • Hi @Igor, thanks for chiming in, especially as you're the author of Maperitive! That's unfortunate, as I like what I've seen on the rendering done my Maperitive compared to Mapnik. I haven't heard of TileMill before, so I'll check that out. Jan 6, 2012 at 16:43
  • 2
    Future versions of Maperitive will support generating tiles from DB storage like PostGIS, but they will probably never match the performance of Mapnik when it comes to whole-Earth coverage. There are simply too many compromises that need to be made when you want to cover such a large dataset. And you also need an increasingly powerful hardware for such a task, since the planet.osm size increases daily.
    – Igor Brejc
    Jan 6, 2012 at 16:59
  • The documentation of Mapnik says that with the option -s (slim) it should run on the amount of memory you give it. However in my experience i still get out of memory exceptions with 8GB and/or it operates so slow that i fear it isn't doing anything useful anymore.
    – mrg
    Jan 6, 2012 at 17:31


You can use osmosis to filter out certain elements of OSM data that you don't want and it will output a smaller .osm file for you.

Specifically to only retain nodes and ways with your specific keys and values, use the task -way-key-value (--wkv) in http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage

(also be sure to read the note on the bottom of the first link, which may apply to as a WIN7 x64 user).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.