WARNING: This page documents an old version of CEDA's OWS framework. Please see CowsFramework for the latest developments

A note about Pylons terminology

In Pylons

  • controllers are classes inherited from pylons.controllers.WSGIController that reside in the controllers package of your application. Requests are routed to particular controllers via the Routes configuration.
  • actions are methods of a controller. They are also selected using Routes.

OGC Web Services

Support for implementing OGC Web Services using Pylons is provided via the ows_common package. This package provides several things:

  1. The OwsController class
  2. The OWS Controller Protocol defining standard attributes on Pylons controllers and actions
  3. Decorators on controller actions

The ows_common package

The ows_common package provides a library of objects modelling the OWS Common specification v1.1.0. Metadata required for a OWS should be represented using ows_common where ever possible to maximise code reuse. For instance, templates are provided to render ows_common objects into OWS 1.1.0 or WMS 1.3.0 compliant capabilities documents (ows_server.templates.ows.get_capabilities and ows_server.templates.ows.wms_capabilities. Implementations of other services can reuse parts of the core template.

ows_common.exceptions provides a set of exception classes that are caught by the framework and rendered as a standard OWS exception response.

ows_common.pylons provides a framework for creating OGC Web Services with the pylons web-application framework.

The OwsController class

All OWS implementations should be implemented as a Pylons controller inheriting from ows_common.pylons.ows_controller.OwsController. The method OwsController._renderCapabilities() returns a response object containing a standard OWS common 1.1.0 Capabilities document. Populating this document with service-specific metadata can be done by overriding the {{{OwsController?._loadCapabilities() method.

OWS operations are created by defining a OwsController method of the same name wrapped in the @ows_operation decorator. See OwsFramework/Decorators for more about decorators.