[OSM-dev] osm2pgsql on debian

andrzej zaborowski balrogg at gmail.com
Thu Aug 13 19:28:47 BST 2009


2009/8/13 Cornelius <cornelius.osm at csides.info>:
> I want to render my own tiles with mapnik. But I'm not able to import
> the osm data (not the whole planet file, only a part from GeoFabrik)
> into the PostgreSQL database on Debian Lenny.
>
> First I've tried to install the osm2pgsql package via aptitude. With
> this (older) version of osm2pgsql the reading of osm data failed. After
> removing the package, I've checked out the current version from svn.
> After compiling I can start osm2pgsql and it reads the osm file without
> errors. But during writing relations I get the following error:
>
>
> cornelius at me:~/osm/osm2pgsql$ ./osm2pgsql -m -d gis -U osm -W -H
> localhost ../data/nordrhein-westfalen.osm.bz2
>
> osm2pgsql SVN version
> 0.66-17039
>
> Password:
> Using projection SRS 900913 (Spherical Mercator)
> 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: ../data/nordrhein-westfalen.osm.bz2
> Processing: Node(4569k) Way(678k) Relation(8k)
> Node stats: total(4569314), max(462590125)
> Way stats: total(678915), max(38926492)
> Relation stats: total(8591), max(195251)
>
> Writing way(678k)
>
> Writing rel(7k)
> pthread_create() returned an error (12)Error occurred, cleaning up

Error 12 is ENOMEM, this is not listed in pthread_create return values
but it expands to Out Of Memory.  The log says "Mid: Ram" so I suggest
you try using pgsql for the middle storage (i.e. slim mode), even
though I'm surprised it'd run out of memory even when processing a
single province.

Cheers




More information about the dev mailing list