Creating WMS and WFS services with MapServer
In this recipe, you will see how to create a Web Map Service (WMS) and Web Feature Service (WFS) from a PostGIS layer, using the popular MapServer open-source web-mapping engine.
You will then use the services, testing their exposed requests, using first a browser and then a desktop tool such as QGIS (you could do this using other software, such as uDig, gvSIG, and OpenJUMP GIS).
Getting ready
Follow these steps before getting ready:
Create a schema for this chapter within the
postgis_cookbook
database using the following command:postgis_cookbook=# create schema chp09;
Be sure to have Apache HTTP installed (MapServer will run on it as a CGI), and check whether or not it is working by visiting its home page at
http://localhost
(typically, an "It works!" message will be displayed if you still have not customized any features).Install MapServer as per its installation guide (http://mapserver.org/en/installation/).
Note
A handy way to have MapServer up...