imposm and PostGIS 2.0

I recently load OSM planet in PostGIS 2.0.  It works but you have to created manually your database:
 sudo su postgres
 createdb -E utf8 -O postgres osmplanet
 psql -d osmplanet -c "CREATE EXTENSION postgis;"
 createuser --no-superuser --no-createrole --createdb osm
 psql -d osmplanet -c "ALTER USER osm WITH PASSWORD 'osm';"
 psql -d osmplanet -f /usr/local/lib64/python2.7/site-packages/imposm/900913.sql
 psql -d osmplanet -c "ALTER TABLE geometry_columns OWNER TO osm;”
 psql -d osmplanet -c "ALTER TABLE spatial_ref_sys OWNER TO osm;"
 sudo vim /var/lib/pgsql/data/pg_hba.conf
 -->add this line "host osmplanet osm md5"

 sudo virtualenv venv
 source venv/bin/activate
 venv/bin/pip install imposm
I use multiprocessing option with "imposm" in one line command read/write
 sudo imposm -c 8 --overwrite-cache --read --write --database osmplanet planet-latest.osm.bz2
Final database is 66 GB at this moment
postgres@osm:/home/smercier> psql -c "SELECT pg_size_pretty(pg_tablespace_size('pg_default'));" osm
 66 GB
(1 row)

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current month ye@r day *