Book Review: PostGIS Cookbook

The PostGIS Cookbook by Paolo Conti, Thomas J Kraft, Stephen Vincent Mather, and Bborie Park (buy from Packt) is a collection of how-to recipes for the PostGIS extension for Postgres. It is recommended for intermediate and even advanced PostGIS users. Novice Postgres/PostGIS users may also find it useful, but they will need to use it alongside a good PostGIS reference or tutorial.

In recent years, Postgres has been gaining ground over MySQL as the open source relational database (RDBMS) of choice, and is now arguably the open source RDBMS of choice. One of the reasons for this gain is the geospatial support provided by the PostGIS extensions. Although recent versions of MySQL do provide some geospatial support, these are very limited when compared to PostGres or a commercial database (e.g. Oracle and Microsoft SQL Server). PostGIS is supported by a wide range of geospatial tools and systems, including most, if not all, of the major open source geospatial projects.

The PostGIS Cookbook follows the familiar Packt cookbook formula of: Introduction, Getting Ready, How to do it, and How it works. However, few of the recipes include a “Further Information” or “Taking it Further” section. Unlike many of these cookbooks (e.g. Google Javascript API Cookbook), the PostGIS Cookbook is not a beginner’s tutorial that assumes minimal knowledge. Although some of the recipes cover relatively simple tasks such as importing OpenStreetMaps (OSM) data, many are much more sophisticated. Also there is not a step-by-step progression that builds knowledge in a tutorial-like manner. This is not necessarily a bad thing – it makes the book more of a genuine ‘cookbook’, i.e. collection of recipes that solve typical real world problems.

This does mean the book is not for novices. It assumes the reader is already familiar with Postgres. Although it introduces and explains a lot of PostGIS functionality, if the reader is not familiar with PostGIS already, then they will also benefit from having access to a tutorial or reference (e.g. the official documentation).

The recipes cover a wide range of data types and sources. These should help users who are looking to import their specific data type. Recipes also reference other systems which can work well with PostGIS, such as Quantum GIS and GRASS. These references barely scratch the surface of what these systems can do, but they may be enough to inform the reader who can then go and research them further.

Chapter topics are:

  • Moving Data In and Out of PostGIS – CSV, GDAL, shapefiles, OSM, rasters – Structures: Geospatial views, triggers, inheritance, normaization, proportional polygon estimates
  • Vectors : Basic – GPS data, fixing geometries, simplifications, distances, intersections, clipping, etc
  • Vectors : Advanced – Efficient proximity filtering, rotations, translations, scaling, Voronoi polygons
  • Rasters – Map algebra, geometetry conversion, warping & resampling, Digital Elevation Models (DEM), Visualising
  • pgRouting –  Loading data, Dijkstra, A*, service areas, polygon centerlines
  • Nth dimension –  3d objects, LIDAR, X3D, UAV photogrammetry
  • PostGIS Programming – Psycopg (Python Postgres library), OGR Python bindings, PL/Python,  Geocoding (GeoNames, OSM, geopy, PL/Python), netCDF
  • PostGIS and the web – UMN MapServer, GeoServer, OpenLayers, Leaflet, GeoDjango
  • Maintenance, Optimization, and Performance Tuning – Backups, indexes, clustering, SQL optimization, migration
  • Desktop Clients – Quantum GIS, OpenJUMP, gvSIG, uDig.

Personally, I know the pgRouting chapter would have been useful if I had had it a couple of years ago when using PostGIS to batch calculate route distances.

Summarizing, this book is recommended for PostGIS practicioners. PostGIS novices will find it demonstrates a sophisticated set of functionality, but they will also need a PostGIS tutorial and/or reference.

 

Leave a Reply