owscat: OGC Web Services Catalog

Tom Kralidis

Senior Systems Scientist
Geospatial Coordination Office, Information Management, Chief Information Officer Branch
Environment Canada


4905 Dufferin Street
Toronto
Ontario
M3H 5T4
Canada
+01-416-739-4907


Table of Contents

1. Introduction
2. Requirements
3. Database Setup
4. Installation
5. Configuration
6. Adminstration
Add Service
Delete Service
List Services
Search Services
Show Statistics
DB Admin
7. Peering
8. API Access
INSERTSERVICE
UPDATESERVICE
DELETESERVICE
INSERTPEER
DELETEPEER
9. Client Access
10. GeoRSS
11. OpenSearch
12. Examples
13. Help
14. Links of Interest

Chapter 1. Introduction

owscat is an approach to registering, harvesting and cataloguing OGC Web Services metadata, in support of resource and service discovery. owscat facilitates the behaviour of an OGC Web Services Catalog for clients to develop against. owscat is driven by an underlying database model which separates service metadata from resource metadata to optimize metadata storage. The underlying database model (as shown below) can be applied to any database or information system.

Since owscat is an underlying database model, this enables a number access methods (see Client Access section).

Chapter 2. Requirements

The following components are required before installing owscat:

  1. PostgreSQL (version 8 and up)

  2. PostGIS (version 1 and up)

  3. Apache Tomcat (version 6.0.18 and up)

This documentation does not detail installation and configuration procedures of the required components. Please check the documentation for the respective packages.

Chapter 3. Database Setup

Before installing owscat, if you have a new PostgreSQL/PostGIS install, you must ensure that an empty database is created via PostgreSQL and PostGIS:

$ /usr/local/pgsql/bin/createdb --encoding=LATIN1 --owner=db_username db_name
$ /usr/local/pgsql/bin/createlang plpgsql db_name
$ /usr/local/pgsql/bin/psql -d db_name -f lwpostgis.sql
$ /usr/local/pgsql/bin/psql -d db_name -f spatial_ref_sys.sql

Note that the PostGIS documentation discusses the install in detail

Chapter 4. Installation

To install owscat, simply do the following:

$ tar xfz owscat-x.y.z.tar.gz

Add the following to $CATALINA_HOME/conf/server.xml:

<Context path="urlpath/to/dir" docBase="/path/to/dir" crossContext="false" debug="0" reloadable="false"/>

Where path/to/dir is the directory where you unpacked the distribution. Note that if you are running mod_jk2, you will also have to add this in your Apache conf/workers2.properties file:

[uri:/urlpath/to/dir/*]

Restart tomcat:

$CATALINA_HOME/bin/shutdown.sh
$CATALINA_HOME/bin/startup.sh

Note that if you are running tomcat via mod_jk2, you will also have to restart your Apache:

$APACHE_HOME/bin/apachectl restart

Chapter 5. Configuration

Edit the following variables in etc/config.jsp:

  1. username: a username associated with the catalog

  2. source_catalog: an authority URL of the maintainter of the catalog. Typically a fully qualified domain to identify the provider

  3. stylesheet: URL pointer to a CSS stylesheet (can be absolute or relative)

  4. wfs_server_url: the WFS instance associated with this catalog. Note that this will be the URL with which clients will interact with

  5. org_name: the name of the organization maintaining this catalog. Note that this org will be used to provide custom stats on the host organization

  6. org_searchterm: minimal search term to query the database when running stats. Note that this string will be LIKE'd in SQL

  7. org_url: a website indicative of the host organization

  8. org_image: a full URL to an images indicative of the host organization

  9. db_name: name of database to connect to

  10. db_username: username of database to connect to

  11. db_password: password of database to connect to

  12. title: human readable title for the application. Used for HTML meta tags

  13. lang: Combined ISO 639 2-letter language code and ISO 3166 country code for the application (e.g. en-CA, fr-CA). Used for HTML meta tags

  14. author: person or organization responsible for the application. Used for HTML meta tags

  15. description: abstract for the application. Used for HTML meta tags

  16. keywords: keywords (comma separated) for the application. Used for HTML meta tags

  17. copyright: copyright statement for the application. Used for HTML meta tags

  18. georss_maxitems: for GeoRSS output, the number of items to display

  19. hostname: the hostname the install (i.e. http://foo/)

  20. baseurl: the base location for the install (i.e. /owscat)

At this point, you should now be able to access the interface at http://host/urlpath/to/dir/index.jsp

Chapter 6. Adminstration

At this point, the JSP interface has been installed and configured, but no database has been initialized. From the main interface page, go to the DB Admin page and click "Create Catalog". This will create a database with spatial objects in PostgreSQL.

Add Service

To add an OGC Web Service, go to the Add Service page, and enter the service type and the URL to the OGC Web Service, as well as the language profile of the service. NOTE that the URL you enter should be the BASE url with NO query string arguments for a GetCapabilities request. Upon clicking submit, the interface will perform a GetCapabilities request, parse the XML response and store the Capabilities XML metadata into the catalog. The interface will also check for the existence of the Web Service in the catalog, as well as HTTP errors.

Delete Service

To delete an OGC Web Service, go to the Delete Service page, and enter the service ID of catalog service entry. You can acquire the service_id identifier by going to the List Services page (note that you can also delete services from this page). Upon clicking submit, the interface will delete all service endpoint and resource records from the catalog.

List Services

To list all OGC Web Services in the catalog, go to the List Services page. The interface will list all OGC Web Services in the catalog, along with options to delete, refresh, or acquire further details about the entry.

Search Services

owscat provides a simple search interface which constructs a valid OGC:WFS GetFeature with Filter request. If you have a OGC:WFS which connects to owscat (see Client Access), and set wfs_server_url in configuration, owscat will also perform this request on the OGC:WFS and display results on the page.

Show Statistics

The Show Statistics page provides high level summary information about the catalog, as well as number of services, resources. owscat also provides organization specific statistics.

DB Admin

The DB Admin page provides the ability to delete and create the database. If the database already exists, it will not be overwritten by clicking create. The user will also be prompted for confirmation before deleting the database entirely.

Chapter 7. Peering

owscat allows for peer-to-peer harvesting. Given an existing remote owscat instance, peering allows for harvesting of OWS metadata between owscat. Peers can be added and deleted through the Administration panel or via the API. The script util/OWSCAT_harvestPeer.pl, given a peer id, will harvest all OWS instances from that peer

$ util/OWSCAT_harvestPeer.pl --peer_id=123 # harvests peer_id, results to STDOUT
$ util/OWSCAT_harvestPeer.pl --peer_id=123 --source_catalog_id_el=gdpentryid # overrides the element name which houses the source catalog's entry id
$ util/OWSCAT_harvestPeer.pl --peer_id=123 --source_catalog_id_el=gdpentryid --logfile=log.txt # results to logfile

Chapter 8. API Access

owscat also provides an XML-based API for adding, deleting or updating a service, dataset, or peer. The XML API is available at: XML/XML_processTransaction.jsp. The API supports the following operations (INSERTSERVICE, UPDATESERVICE, DELETESERVICE). Note that the front end Administration HMI uses the XML backend to perform these operations

The API uses the OGC OWS Common 1.1.0 schemas for providing Exceptions in XML, as well as a slight extension to the OGC CSW 2.0.1 schemas for providing Transaction Reports in XML.

INSERTSERVICE

The INSERTSERVICE operation adds a new OWS to owscat. The INSERTSERVICE operation can be invoked with: request=INSERTSERVICE&service_type=$service_type&url=$url&lang=$lang

UPDATESERVICE

The UPDATESERVICE operation refreshes an existing OWS in owscat. The UPDATESERVICE operation can be invoked with: request=UPDATESERVICE&service_id=$service_id

DELETESERVICE

The DELETESERVICE operation removes an existing OWS from owscat. The DELETESERVICE operation can be invoked with: request=DELETESERVICE&service_id=$service_id

INSERTPEER

The INSERTPEER operation adds a new peer to owscat. The INSERTPEER operation can be invoked with: request=INSERTPEER&title=$title&url=$url&source_catalog=$source_catalog

DELETEPEER

The DELETEPEER operation removes an existing peer from owscat. The DELETEPEER operation can be invoked with: request=DELETEPEER&peer_id=$peer_id

Chapter 9. Client Access

Since owscat is an underlying database model, there a number of methods to provide a search interface.

  1. Write your own: you can write your own interface using JSP/JSTL, Python, Perl, PHP, etc. Note that this will take a bit of work.

  2. Use OGC Web Services: This is the easiest and most sensible approach. OGC software which works with PostGIS includes (MapServer, GeoServer, deegree). owscat has worked with MapServer to provide OGC:WMS and OGC:WFS interfaces of the catalog. The mapserv directory included in the distribution includes a sample .map file and templates to use owscat as an OGC:WMS/OGC:WFS instance with MapServer. Note that you will have to adjust various paths, URLs, and metadata in mapserv/config.map to reflect your installation.

Chapter 10. GeoRSS

owscat supports version 1.0 of the GeoRSS specification, by outputting the latest services or Layers/Feature types registered. The number of items to display in set in etc/config.jsp via the georss_maxitems variable. The GeoRSS feed is available at util/GeoRSS_getFeed.jsp. The default URL will return the latest services in owscat. To return the latest Layers / Feature Types, set typename=service_resources in the URL. See the Show Statistics page for example URLs. GeoRSS is output in both RSS2 and Atom

Chapter 11. OpenSearch

owscat supports version 1.1 of the OpenSearch specification, by providing a wrapper to WFS GetFeature requests. The admin search page will show an autodiscovery option, which will allow for adding owscat as a search engine in your web browser.

Chapter 12. Examples

Here are some examples of the use of owscat. Please feel free to send email to if you are using owscat and would like to be added to this list

  1. Demo instance

  2. ResEau is a Government On-Line demonstration initiative that focuses on water information. ResEau supports clean, safe, and secure water for all Canadians and ecosystems. Specifically, ResEau establishes partnerships and projects to demonstrate the sharing, discovery, access, and use of water information over the Internet.

  3. GeoConnections Discovery Portal is a search engine for the discovery of, and access to, geospatial data and services. Also create your own maps using the Web Mapping Tool

  4. GEMStat.org is designed to provide access to surface and groundwater quality data and statistics collected from the GEMS/Water Global Network, and warehoused in a global water quality database called GEMStat. The Global Network covers over 100 countries, more than 3,000 stations, close to four million records, and over 100 parameters.

Chapter 13. Help

owscat's homepage can be found at httphttp://devgeo.cciw.ca/trac/owscat.

Chapter 14. Links of Interest