Version 4 (modified by spascoe, 13 years ago) (diff)


CEDA OGC Web Services framework


The COWS framework is a  Python software framework being developed at the  BADC for implementing Open Geospatial Consortium web service standards.

The framework aims facilitate the implementation of the latest WMS, WCS and WFS specifications on top of a single metadata and data model.

  1. All services generate OWS Common 1.1.0 compliant GetCapabilities metadata internally. This is then serialised to service-specific GetCapabilities XML by the framework.
  2. The data model is CSML for feature manipulation and  cdat_lite for fine-grained array manipulation.
  3. The web service stack is built on  Pylons, a web application framework particularly well suited to the low-level HTTP communication required by RESTful web services.
  4. Because Pylons is built from top to bottom using the  WSGI specification, COWS servers can be deployed in a wide variety of configurations from personal development servers to multithreaded/multiprocess servers embedded in apache.


You will need:

  1. Python 2.5
  2. The  setuptools package, providing the easy_install tool
  3. The  NetCDF libraries installed in a standard place or indicated with the NETCDF_HOME environment variable
  4. The following python packages that cannot be reliably auto-installed with easy_install
    •  numpy (this will install with easy_install but it needs to be installed first)
    • Python Imaging Library
    •  matplotlib


Once you have the prerequisites in place ;-), you can install COWS by invoking easy_install giving the NDG egg repository as an argument:

$ easy_install -f cows

This will download a host of dependencies including  cdat_lite, CSML and  Pylons. We recommend doing this inside a  virtualenv.

Creating a server

COWS employs paster templates to create a skeleton application for you. The default application assumes a CSML backend and serves WMS and WCS. It includes a trivial demo web application for test purposes. To create your server do:

$ paster create -t cows_server MyCowsServer csmlstore=<csml-dir>

The server will be created in the CowsServer directory. If you don't give a csmlstore argument you will be prompted for one and this can be left blank if you don't want to use CSML. Your development configuration file is in MyCowsServer/development.ini. Customise this with a suitable port then start the server with:

# From within MyCowsServer
$ paster serve development.ini

More details on how to run and configure Pylons servers are on the  Pylons website.


  • The COWS API documentation is available online  here.