pycsw Home | Demos | Documentation | Issue Tracker | FAQ | Download

Metadata Repository Setup

pycsw supports the following databases:

  • SQLite3
  • PostgreSQL
  • MySQL (partial)

To expose your geospatial metadata via pycsw, perform the following actions:

  • setup the database
  • import metadata
  • publish the repository

Supported Information Models

By default, pycsw supports the csw:Record information model.

Setting up the Database

$ cd /path/to/pycsw
$ export PYTHONPATH=`pwd`
$ python ./sbin/setup_db.py sqlite:////path/to/records.db

This will create the necessary tables and values for the repository.

Importing Metadata

$ python ./sbin/load_records.py /path/to/records sqlite:////path/to/records.db

This will import all *.xml records from /path/to/records into records.db and configure the repository to expose queryables as per Table 53 of OGC:CSW.

Note

Records can also be imported using CSW-T (see Transactions).

Publishing the Repository

To expose the repository, setup a repository section as specified in Configuration.

Database Specific Notes

PostgreSQL

  • pycsw makes uses of PL/Python functions. To enable PostgreSQL support, the database user must be able to create functions within the database.