17 Using PostGIS in web applications
This chapter covers:
- Shortcomings of conventional web solutions
- MapServer, GeoServer, QGIS Server
- pg_tileserv and pg_featureserv
- OpenLayers 6, Leaflet 1
In the short span of 25 years, the World Wide Web has emerged as the leading method of information delivery, largely replacing printed media. For GIS, this has been a godsend. Not only did the web introduce GIS to the popular imagination, but it also provides a delivery mechanism for GIS data that wouldn’t have been possible via traditional printed media. In the past a GIS practitioner wishing to share data would have had to print out large maps on oversized printers or send over copies of data on disk media. And then came the web.
Conventional web technologies suffice to deliver textual and image data, but for the ultimate GIS web-surfing experience, you need additional tools, both on the delivery end (the server) and on the receiving end (the client).
Quite recently with the advent of PostGIS mapbox vector tiles (MVT) support and the richer PostgreSQL/PostGIS JSON support, both detailed in Chapter 8, many more people are discovering the freedom of being able to expose data directly from their database stored functions, queries, and tables with minimal middle-ware.