Mastering PostGIS and OpenStreetMap

Mastering PostGIS and OpenStreetMap is the book to learn spatial SQL with PostGIS by using real world OpenStreetMap data. This is the ultimate guide to help learn and spatial data wrangling with PostGIS, PostgreSQL and OpenStreetMap.

Book cover for Mastering PostGIS and OpenStreetMap.  The image shows a route (dotted green line) through Denver, Colorado starting
                at Union Station and ending at McNichols Civic Center Building. This route is the example used in Chapter 15!
Inside the Book Buy Author Blog

Inside the Book

You will learn

  • Querying with spatial SQL
  • How to import and use OpenStreetMap data
  • PostGIS and PostgreSQL tips and tricks
  • pgRouting
  • Performance considerations

Real data

This book uses real data along with all its messy quality issues on purpose.

Learn more about the data used.


Enter your email address to join the mailing list! This list receives email updates on the book and special promotions.

About the Author

Hi! My name is Ryan Lambert and I have worked professionally with PostgreSQL, PostGIS and OpenStreetMap for more than a decade. My database experience started with MySQL, MS SQL and Oracle DB starting a few years prior to discovering the PostGIS ecosystem. My interest in technology is tightly coupled with my passion for education and sharing my excitement!

I started writing technical content for RustProof Labs' blog in 2013. In the time since I have continued writing about a range of technology, though the majority of my content for at least a couple years has been focused on PostgreSQL, PostGIS and OpenStreetMap.

I maintain a few open source projects that are illustrated and explored throughout the book. PgOSM Flex works with osm2pgsql's new Flex output to provide high quality OpenStreetMap data in PostGIS. The SRID bounding boxes project provides a table of polygons associated with a few thousand of the most common SRIDs used within PostGIS. PgDD (PostgreSQL Data Dictionary) enables easy access through simple SQL queries against easy to remember views. The goal of each of these projects is to make it easier to understand and use the technology covered withing the book.