[OSM-dev] Using NULL values in mapnik / postgres DB

Jon Burgess jburgess777 at googlemail.com
Tue Feb 20 23:43:28 GMT 2007


On Tue, 2007-02-20 at 22:12 +0000, Artem Pavlenko wrote:
> Jon,
> 
> Sounds good to me! Also, it might be a good idea to split osm data into 
> multiple tables in postgresql and only keep fields that are required :
> 
> 1. roads (LINESTRING) :  osm_id,highway,level,name ...
> 2. all points (POINT) : osm_id, amenity,...
> 3. all polygons (POLYGONS): osm_id, natural, leisure etc.
> 
> Thoughts?

I've given this a few minutes of thought and my initial conclusion is
that pre-processing the data on the input to the DB could possibly save
a lot of time if it makes the rendering faster.

We run the render over the for each zoom level, so anything we can do
once on input to the DB is something we can avoid doing 10+ times when
rendering at different zooms.

It takes ~20 minutes to push the planet.osm into a DB and many days to
render the tiles. Any trade-off which could (for sake of argument) halve
the tile rendering time at the expense of doubling the import time would
be a big win overall. 

The one caveat, as I mentioned before, is that we potentially restrict
the flexibility of the osm.xml file if we've removed data by
pre-processing before the DB.

	Jon






More information about the dev mailing list