Python Geospatial Development
Python Geospatial Development
Summary:
Introduction
The book "Python Geospatial Development" (third edition, 2016) by Erik Westra is one of the most comprehensive practical guides to building geospatial applications in Python. In an era when location-based data surrounds us everywhere — from navigation services to climate change analysis — the ability to work with geodata is becoming a critical skill for developers. Westra, known for his books on Python and geoinformatics, offers the reader not just a set of recipes, but a holistic methodology: from the basics of geospatial concepts to deploying a full-fledged web application. The book was published by Packt Publishing, has 450 pages, and is aimed at Python 3.x.
What this book is about
"Python Geospatial Development" covers the full lifecycle of working with geodata: collection, processing, analysis, and visualization. The author systematically introduces the reader to key libraries in the ecosystem: Shapely (geometric operations), Fiona (reading/writing vector formats), PyProj (working with projections), GDAL/OGR (working with raster and vector data), PostGIS (spatial extensions for PostgreSQL), and Mapnik (map creation). Special attention is given to practical projects: building interactive maps using TileStache and Leaflet, importing data from OpenStreetMap, geocoding addresses, and analyzing spatial relationships (buffers, intersections, clustering).
Book structure
The edition consists of 10 chapters, each ending with a practical exercise. The first chapters lay the theoretical foundation: coordinate systems, data formats (Shapefile, GeoJSON, KML, PostGIS). The author then moves on to programming: reading and writing geodata with Fiona, geometric operations in Shapely, working with raster images via GDAL. The middle of the book is dedicated to creating a map server and web interface. The final chapters demonstrate how to combine all components into a single application for population density analysis and nearest neighbor search.
Who this book is for
The book is intended for intermediate-level Python developers who are already familiar with the basics of the language (functions, classes, file handling) and want to specialize in geospatial development. It will be useful for:
- web developers looking to add maps and geo-features to their projects;
- data analysts working with spatial datasets (e.g., census data, logistics);
- students and researchers in the field of geoinformatics;
- specialists in urban planning, ecology, and transportation who need software tools for analysis.
Important: the book does not teach Python from scratch — it assumes the reader already knows how to write scripts and install packages via pip.
What the reader will learn
After reading and completing the exercises, the reader will be able to:
- Understand core geospatial concepts: coordinate systems (WGS84, UTM), datums, projections, data formats (vector and raster).
- Install and configure a full stack of geo-tools: GDAL, PostGIS, Mapnik, TileStache.
- Read and convert geodata from Shapefile, GeoJSON, KML, CSV with coordinates.
- Perform spatial queries: finding points inside a polygon, calculating distances, building buffer zones, intersecting geometries.
- Work with raster data: loading satellite imagery, extracting pixel values, reprojecting.
- Create web maps using Leaflet and TileStache, configure layer styles, add pop-up tooltips.
- Deploy a geoinformation system based on PostGIS and a Python backend