# download osmosis svn export http://svn.openstreetmap.org/applications/utils/osmosis/trunk/ osmosis-trunk # enter the source directory cd osmosis-trunk # download the history plugin svn export http://svn.toolserver.org/svnroot/mazder/osmhist/osmosis-plugin/history/ # enable the history plugin patch -p0 < history/script/source-activation.patch # compile ant clean publish # reate a postgis user, if not already done sudo -u postgres createuser osmosis # create an empty database with hstore and postgis capabilities, if not already done sudo -u postgres createdb -E UTF8 -O osmosis osmosis-history sudo -u postgres createlang plpgsql osmosis-history # create the simple schema database psql -U osmosis osmosis-history < package/script/pgsql_simple_schema_0.6.sql # add the history extension to the database psql -U osmosis osmosis-history < history/script/pgsql_simple_schema_0.6_history.sql # the following lines add extra features to the database # execute before them before the import # they are experimental and very memory intensive # use only with small data sets # enable the node version builder #psql -U osmosis osmosis-history < history/script/pgsql_simple_schema_0.6_history_way_nodes_version.sql # enable the bbox builder #psql -U osmosis osmosis-history < package/script/pgsql_simple_schema_0.6_bbox.sql # enable the linestring builder #psql -U osmosis osmosis-history < package/script/pgsql_simple_schema_0.6_linestring.sql # import a sample xml package/bin/osmosis --read-xml history/test/data/template/v0_6/node-move-way-tag.osm --write-pgsql-history database="osmosis-history" user="osmosis"