Chapter 11. Using PostGIS in web applications
This chapter covers
- Shortcomings of conventional web solutions
- MapServer and GeoServer
- OpenLayers
In a short span of 15 years, the World Wide Web has emerged as the leading method of information delivery, threatening to replace printed media altogether. For GIS, this has been a godsend; not only did the web introduce GIS to the popular imagination, it also affords a delivery mechanism for GIS data that wouldn’t have been possible via traditional printed media. Only 20 years ago, a GIS practitioner wishing to share his data would have had to print out large maps on oversized printers. And then came the web.
To deliver textual data and image data, conventional web technologies suffice, but for the ultimate GIS web-surfing experience, we need additional tools, both on the delivery end (the server) and on the receiving end (the client).
In this chapter we’ll cover web tools that work with PostGIS. We’ll start with two server tools, MapServer and GeoServer, which can read data from PostGIS and serve images or data according to OGC standards. We’ll then move on to the client side of the equation, where we look at OpenLayers, a JavaScript-based tool that greatly enriches the viewing experience for the user. Along with OpenLayers, we’ll check out the new GeoExt extension to OpenLayers based on the new ExtJS JavaScript framework.