Osm2pgsql
From OpenCITT
osm2pgsql is a tool to import openstreetmap planet files into a postgis db. for more info see [1]
The following procedure creates and prepares the database and imports a planet file.
wget http://trac.openstreetmap.org/browser/applications/utils/export/osm2pgsql/900913.sql?format=raw -O 900913.sql createdb -E UTF8 -U postgres gis createlang -U postgres plpgsql gis psql -U postgres -d gis -f /usr/share/postgresql/8.4/contrib/_int.sql psql -U postgres -d gis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql psql -U postgres -d gis -f ./900913.sql osm2pgsql -m -s -d gis -U postgres planet.osm.bz2
