On Fri, 2009-06-26 at 18:28 -0400, James McManus wrote:
> Hi - I'm trying to use osm2pgsql to extract a subset area of OSM, but
> the --bbox option does not appear to be working.  I downloaded
> planet-090617.osm.bz2 and then issued the following command:
> 
> osm2pgsql --bbox -0.5,51.25,0.5,51.75 -m -d gis planet-090617.osm.bz2
> 
> 
> At first it appears to be working producing the following output:
> 
> planet-090617.osm.bz2
> osm2pgsql SVN version 0.66-16084
> 
> Using projection SRS 900913 (Spherical Mercator)
> Applying Bounding box: -0.500000,51.250000 to 0.500000,51.750000
> 
> Setting up table: planet_osm_point
> Setting up table: planet_osm_line
> Setting up table: planet_osm_polygon
> Setting up table: planet_osm_roads
> Mid: Ram, scale=100
> 
> Reading in file: planet-090617.osm.bz2
> 
> Processing: Node(1400k) Way(0k) Relation(0k)
> 
> But it runs for hours and uses up all of my RAM.  I eventually have to kill 
> it. 
> How long should it take to subset a small area such as this?

How much RAM and swap do you have?

It take at least 2 hours to process the full planet, this is time taken
just to do the bzip2 decompression and XML parsing without even writing
anything out to the database. There is a lot of data in the full planet
file.

The algorithms in the code are optimised for the full planet import and
are not as efficient as they could be for very small areas.

Using the --slim option should fix the memory issue.

Alternatively you could start with a UK or England only extract and save
yourself a lot of bandwidth and import time.

        Jon



_______________________________________________
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk

Reply via email to