While the OSM DB server is being upgraded and the data cannot be updated I thought I'd look at rendering. I've used Mapnik to do some rendering in the past. It is powerful, fast and uses the Anti-grain Geometry C++ templates which produce lovely sub-pixel rendering for clear thin lines, good colour contrasts and good quality curves and diagonals. The downside of Mapnik is its style sheets, which I don't think too many people get to grips with.
Recently I heard about TileMill so I thought I'd take a look. It installed very easily on my laptop running Ubuntu. A quick look at the results shows it is running node.js on my machine to provide the user interface through my browser. That works well and gives a slick and responsive interface. It also installed Mapnik, which is what renders the maps. TileMill can use various data sources such as shapefiles, GeoJSON, GeoTIFF and PostGIS. I already run PostGIS with some data imports for the existing rendering, so that was a place to start. This is data imported into tables in a way that makes rendering easier. I have just copied the data in the way the Standard map view on the OSM site uses it. This does not include all data from OSM for a selected area, only the data that the Mapnik style is set up to render.
When I created a new TileMill project it started by creating a layer to show the outline of the landmasses. I quickly zoomed in to see my local area. The coastline showed up the Humber Estuary and, as it should, it stopped abruptly at about the place the Humber bridge crosses. Beyond that it is not officially coastline but river. I have not yet imported any other data to show up the rest of the river system.
The first thing I tried to add were a few roads. Copying an example I created a layer that loaded some data from planet_osm_line, the dataset in the PostGIS db that holds an extract of linear things like roads. TileMill uses a language they call Carto to describe the selection and style of the objects to be displayed on the map. It is a lot like CSS. I copied a small piece of Carto code and on saving the code the map quickly redrew with some thin grey lines to show some roads. That was very satisfying. A few more lines of code and more road types appeared in various colours and thicknesses. Then I noticed a problem.
The coastline was rather crude and some roads strayed into the sea. I realised that what I needed was the OSM coastline to exactly match my OSM data. I looked around and found the processed_p shapefile which is a detailed OSM coastline. It was nearly 500MB uncompressed, but as I only want to work with GB data at the moment I loaded it into Quantum GIS and extracted the GB part and saved that separately as a shapefile. Once that shapefile was loaded as a layer in TileMill the detail jumped out and none of the roads were submerged any more. If you are interested in Birmingham none of this would matter. There may yet turn out to be a better way of using processed_p or some similar coastline.
I have a lot to look at yet but it is an interesting start. I want to be able to render an area as tiles to use in my own way with my own style and this looks very promising.