Book Image

PostGIS Cookbook

Book Image

PostGIS Cookbook

Overview of this book

Table of Contents (18 chapters)
PostGIS Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Consuming WFS-T services with OpenLayers


In this recipe, you will create the Transactional Web Feature Service (WFS-T) from a PostGIS layer with the GeoServer open-source web-mapping engine, and then an OpenLayers basic application that will be able to use this service.

This way, the user of the application will be able to manage transactions on the remote PostGIS layer. WFS-T allows the creation, deletion, and updation of features. In this recipe, you will allow the user only to add features, but this recipe should put you on your way to creating more composite use cases.

If you are new to GeoServer and OpenLayers, you should first read the Creating WMS and WFS services with GeoServer and Consuming WMS services with OpenLayers recipes, and then return to this one.

Getting ready

  1. Create the proxy script and deploy it to your web server (that is, httpd or IIS), as indicated in the Getting ready section of the Consuming WMS services with OpenLayers recipe.

  2. Create the following PostGIS points layer...