Introduction

In this chapter, we will try to give you an overview of how you can use PostGIS to develop powerful GIS web applications, using Open Geospatial Consortium (OGC) web standards such as Web Map Service (WMS) and Web Feature Service (WFS).

In the first two recipes, you will get an overview of two very popular open source web-mapping engines, MapServer and GeoServer. In both these recipes, you will see how to implement WMS and WFS services using PostGIS layers.

In the third recipe, you will implement a WMS Time service using MapServer to expose time-series data.

In the next two recipes, you will learn how to consume these web services to create web map viewers with two very popular JavaScript clients. In the fourth recipe, you will use a WMS service with OpenLayers, while in the fifth recipe, you will do the same thing using Leaflet.

In the sixth recipe, you will explore the power of transactional WFS to create web-mapping applications to enable editing data.

In the next two recipes, you will unleash the power of the popular Django web framework, which is based on Python, and its nice GeoDjango library, and see how it is possible to implement a powerful CRUD GIS web application. In the seventh recipe, you will create the back office for this application using the Django Admin site, and in the last recipe of the chapter, you will develop a frontend for users to display data from the application in a web map based on Leaflet.

Finally, in the last recipe, you will learn how to import your PostGIS data into Mapbox using OGR to create a custom web GPX viewer.