Benchmarking 2011/Imposm

Installation
Installation of imposm with all dependencies on the linux_db_bm host.

Installation steps
Install everything inside `/opt/imposm`:

cd /opt/ mkdir imposm sudo mkdir imposm sudo chown myusername:wms imposm

Install a recent &gt;2.4 Python version:

cd /opt/imposm/ mkdir src cd /opt/imposm/src wget http://python.org/ftp/python/2.7.1/Python-2.7.1.tgz tar xf Python-2.7.1.tgz cd Python-2.7.1 ./configure --prefix /opt/imposm make -j2 make install

Install google-protobuf for PBF format:

cd /opt/imposm/src wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2 tar xf protobuf-2.4.1.tar.bz2 cd protobuf-2.4.1 ./configure --prefix /opt/imposm make -j2 make install

Install tokyocabinet for internal import cache:

cd /opt/imposm/src sudo yum install bzip2-devel wget http://fallabs.com/tokyocabinet/tokyocabinet-1.4.47.tar.gz tar xf tokyocabinet-1.4.47.tar.gz cd tokyocabinet-1.4.47 ./configure --enable-off64 --prefix /opt/imposm make -j2 make install

Install distribute/pip to install Python packages:

cd /opt/imposm/src wget http://python-distribute.org/distribute_setup.py ../bin/python distribute_setup.py ../bin/easy_install pip

Install Imposm:

cd /opt/imposm/src export CFLAGS=-I/opt/imposm/include export LDFLAGS=-L/opt/imposm/lib export PATH=/opt/imposm/bin:$PATH bin/pip install imposm

Importing
Creating the database:

sudo su postgres createdb -E UTF8 osm createlang plpgsql osm psql -d osm -f /usr/share/pgsql/contrib/postgis-1.5/postgis.sql psql -d osm -f /usr/share/pgsql/contrib/postgis-1.5/spatial_ref_sys.sql

Download OSM extract:

cd /opt/imposm/src mkdir osm_data cd osm_data wget http://download.geofabrik.de/osm/north-america/us/colorado.osm.pbf

Run Imposm:

export LD_LIBRARY_PATH=/opt/imposm/lib imposm --read colorado.osm.pbf --write --optimize --deploy-production-tables -d osm --user postgres --overwrite-cache

Done: