[OSM-dev] having a regularly updated OSM database?

Paul Norman penorman at mac.com
Wed Apr 11 07:51:47 BST 2012


> -----Original Message-----
> From: Ákos Maróy [mailto:akos at maroy.hu]
> Sent: Tuesday, April 10, 2012 11:22 PM
> To: dev at openstreetmap.org
> Subject: [OSM-dev] having a regularly updated OSM database?
> 
> Hi,
> 
> I wonder what is the best way to have a regularly updated, up-to-date
> OSM database? By regularly, I mean an update about say once a month.

It depends what you want to do with the data. There's pgsnapshot databases,
osm2pgsql databases, apidb databases and plenty of others. 

> Previously I experimented with osm2pgsql, but that took me 5 days to
> import, and the 'update' process was on the same order of magnitude.
> (this is on an i7 3.2GHz system with 12GB RAM).

I expect this is limited by your disks, not by your CPU.
 
> Is there any way that allows for faster updates down the line?

If you're updating it may be easier to keep it continually up to date with
minutely replication diffs.

You might also have some more success turning off slim mode and re-importing
a new planet file each month.

> My understanding is that the osm2pgsql import will import all metadata
> as well, like changeset ids, etc. actually I only need the data itself,
> but such metadata. what might also help (?) is that I don't need all map
> features, but basically just natural features and a limited number of
> man-made features, such as roads between cities, large roads inside
> cities, city & national boundaries, railroads, railway stations, &
> churches.

If you're using osm2pgsql you could edit the style to only include the
features you want.

> is there an efficient way of achieving an update of such data each month
> within a reasonable amount of time, say below 8 hours?

http://wiki.openstreetmap.org/wiki/SotM_2010_session:Tuning_the_Mapnik_Rende
ring_Chain has some information about import times from 2010. The database
is bigger since then but it should be applicable. Make sure you tune your
postgresql configuration.




More information about the dev mailing list