NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum


I recently downloaded Maperitive and generated tiles from a raw OSM XML file. The average rate was approximately 70-80 tiles per second. This seems like a decent pace but when your map has 16 million tiles on a zoom level, it could take some time to generate all the necessary tiles. In a nutshell, Maperitive (Windows, .NET 4.0) works fine and I've used it to generate some test data. I could see it being a solution but there are some gotchas.

Over the last few days, I've been reading articles & blog posts trying to find the best approach for processing raw OSM XML files. At this point, my requirements are minimal: a) the process must take a raw OSM XML file and, at the end of the process, give me map tiles, and b) the process runs on my hardware (no SAAS). Other than that, I'm not too concerned about the actual process.

The process could run on Ubuntu or Windows 7/8, client machine or, if absolutely necessary, server. I'm not too familiar with Linux so that would require more detailed steps but I'm willing to learn.

I understand multiple products may be necessary to process the XML files. If that is the case, I can handle that. One product would be easiest but if several products are required, one for each step of the process, I can live with that.

Lastly, the area of my study is not available as a pre-built dataset from some of the websites. For example, my map will not cover the metro area of Chicago or New York. Its wider and doesn't fit nicely in a single state, metropolitan area, and maybe not even a single country. Therefore, I've been getting the raw data directly from and this will not change due to the geographic extents of the project.

So where an I find the best practice approach (preferably a document / tutorial / blog posts / video / ???) to processing raw OSM XML data into map tiles and which tools should I use?


asked 29 Sep '14, 18:34

Squatchy's gravatar image

accept rate: 0%

edited 29 Sep '14, 18:55

Would it be possible to give an idea of the rough size of bounding box that you're interested in (perhaps using )? Also what tile zoom levels?

Do you want to use a map style that you've already designed (e.g. in Maperitive), an existing Mapnik one (e.g. openstreetmap-carto, used by the "standard" layer on the OSM website) or something else?

Also, reading between the lines of the question a bit, do you want something that you can easily automate on a client machine over which you don't have direct control?

(29 Sep '14, 20:19) SomeoneElse ♦

The rough size is the State of Minnesota. Zoom level 4 - 19, but that may be limited to 17 / 18 depending on size and ability to generate the tiles in a reasonable amount of time. Currently completing Level 17 and it's pushing my definition of "reasonable time". At the moment, out of the box styles are sufficient as I haven't created any yet in Maperitive. Custom styles may be something I attempt in the future. I would like to automate the process. Now, for example, I'd like to spin up a few cloud VMs and process each zoom level in its own vm.

(30 Sep '14, 02:00) Squatchy

Seeing as I've just done something a bit like this for a project of mine, I'll explain what I did. It might not match exactly what you want (hence the questions in the comment) but hopefully you'll find it useful:

1) Load the data into a switch2osm-style rendering database. What I actually did is described here.

2) In my case I wanted to use the "standard" openstreetmap-carto style, but loaded via a lua tag transform similar to this one to modify the data on the way into the database, as described here. You could of course use a modified style of some sort (perhaps by using TileMill).

3) I then used from here to generate the actual tiles that I wanted (in my case just .pngs). I had to edit "openstreetmap-carto"'s mapnik.xml slightly to not reference fonts that I didn't have installed (see here) but that's very easy to do manually.

The reason that I took this approach is that I already had (1) and (2) set up, so only actually needed to do (3). If you have instead already got a Maperitive style that does what you want, that may be easier for you.

permanent link

answered 29 Sep '14, 20:37

SomeoneElse's gravatar image

SomeoneElse ♦
accept rate: 16%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 29 Sep '14, 18:34

question was seen: 8,800 times

last updated: 30 Sep '14, 02:00

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum