- Set up a regular pgsnapshot/PostGIS OSM database, see the following documents:
- Run the
sql/owl_schema.sql
script in that database.
- Use the
--write-pgsql
Osmosis task to load inital data.
OWL plugin for Osmosis is needed for the --write-owldb-change
task which populates OWL tables with data. To install
the plugin just drop the file from osmosis-plugin
directory to the lib
directory in your Osmosis installation (e.g.
/usr/share/osmosis
).
In order to start populating OWL tables, you need to process OsmChange files against your database. The easiest way to do this is to set up the Osmosis interval replication.
First, initialize replication directory.
Then, setup (e.g. in crontab) the replication pipeline:
osmosis --read-replication-interval workingDirectory=<dir> --tee-change --write-owldb-change authFile=<authFile> --write-pgsql-change authFile=<authFile>
This commands does couple of things:
- Downloads OsmChange file for a specific replication interval (minute/hour/day) - according to the configuration in
configuration.txt
. - First, the change stream goes to the OWL Osmosis plugin - it populates change tables.
- Then the stream goes to the regular
--write-pgsql-change
task that makes modifications in the data tables.