Python is a highly expressive language that makes it easy to write sophisticated programs. Combining high-quality geospatial data with Python geospatial libraries will give you a powerful toolkit for solving a range of geospatial programming tasks.The book begins with an introduction to geospatial analysis and programming and explains the ideas behind geospatial data. You will explore Python libraries for building your own geospatial applications. You will learn to create a geospatial database for your application using PostGIS and the psycopg2 library, and see how the Mapnik library can be used to create attractive and useful maps.Finally, you will learn to use the Shapely and NetworkX libraries to create, analyze, and manipulate complex geometric objects, before implementing a system to match GPS recordings against a database of roads to produce a heatmap of the most frequently used roads.