Documentation for the ogcserver.

This commit is contained in:
Jean-Francois Doyon 2006-04-11 03:00:39 +00:00
parent d4b5171efb
commit 39d14bdb5f
2 changed files with 128 additions and 4 deletions

97
docs/ogcserver/readme.txt Normal file
View file

@ -0,0 +1,97 @@
# $Id$
Mapnik OGC Server
-----------------
Introduction
------------
Mapnik provides an OGC server package to allow the publishing of maps
through open and standard interfaces. It is in implemented in Python.
Features/Caveats
----------------
- WMS 1.1.1 and 1.3.0
- CGI/FastCGI
- GetCapabilities and GetMap support only
- GIF/JPEG/PNG output
- XML error handling only
- No real layer metadata support yet
Dependencies
------------
Please properly install the following before proceeding further:
- jonpy (http://jonpy.sourceforge.net/)
- lxml (http://codespeak.net/lxml/)
- PIL (http://www.pythonware.com/products/pil)
- PROJ.4 (http://proj.maptools.org/)
Installation
------------
- Make sure you compile or re-compile Mapnik after installing PROJ.4, if this
was not done already. Mapnik includes a Python API to the PROJ.4 library
used by the ogcserver. The PROJ_INCLUDES and PROJ_LIBS parameters can
be passed to mapnik's scons build script to help with this.
You can test the availability of the PROJ.4 bindings by trying:
$ python
Python 2.3.4 (#1, Feb 22 2005, 04:09:37)
[GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from mapnik import Projection
registered datasource : raster
registered datasource : shape
registered datasource : postgis
>>>
- The executable "ogcserver" in utils/ogcserver will work for both CGI and
FastCGI operations. Where to place it will depend on your server's
configuration and is beyond this documentation. For information on FastCGI
go to http://www.fastcgi.com/.
Configuring the server
----------------------
- You will need to edit the ogcserver executable for now. It is a simple
Python text script.
1) Edit the path to the interpreter in the first line.
2) Edit the path to the config file if you don't like the default.
- Copy the sample configuration "ogcserver.conf" file in utils/ogcserver to
the location you specified in the previous step.
- Edit the file to your liking, the comments within the file will help you
further. Be sure to at the very minimum edit the "module" parameter, the
server will not work without you setting it properly first.
Creating a map for use by the ogcserver
---------------------------------------
The ogcserver obviously needs a map to publish. For now, with Mapnik, this
can only be done by writing code. In this case, a Python script will need to be
written to describe the map's layers and styles. For information on the Python
API, look in demo/python, or in docs/epydocs.
The server needs a module, and a class that looks like this:
class MapFactory:
def __init(self):
...
def getlayers(self):
...
def getstyles(self):
...

View file

@ -1,12 +1,39 @@
# $Id$
# server: This section contains software related configuration parameters.
[server]
module=rundemo
# module: The module containing the MapFactory class. See the readme for
# details.
module=CHANGEME
# service: This section contains service level metadata.
[service]
title=Test OGC Server
abstract=Blah Blah Blah
# title: The title of the server.
title=Mapnik OGC Server
# abstract: An abstract describing the server.
abstract=This abstract describes the server and its contents.
# maxwidth, maxheight: The maximum size that a map will be supplied at.
# Exceeding it will raise an error in the client.
maxheight=1024
maxwidth=1024
epsg=42304
# epsg: The epsg code defining the projection of the source data used in the
# map.
epsg=4326
# onlineresource: A service level URL most likely pointing to the web site
# supporting the service for example. This is NOT the online
# resource pointing to the CGI.
onlineresource=http://www.mapnik.org/