Welcome to Manning India!

We are pleased to be able to offer regional eBook pricing for Indian residents.
All eBook prices are discounted 40% or more!
PostGIS in Action, Third Edition
Leo S. Hsu and Regina O. Obe
  • MEAP began August 2019
  • Publication in Summer 2020 (estimated)
  • ISBN 9781617296697
  • 600 pages (estimated)
  • printed in black & white
free previous edition included
An eBook copy of the previous edition of this book is included at no additional cost. It will be automatically added to your Manning Bookshelf within 24 hours of purchase.

A must-read book for novice geographers.

Daniele Andreis
PostGIS in Action, Third Edition teaches readers of all levels to write spatial queries for PostgreSQL. It first gives you a background in vector-, raster-, and topology-based GIS and then quickly moves into analyzing, viewing, and mapping data. This fully updated third edition covers key changes in PostGIS 3.0 and PostgreSQL 12, including parallelization support, partitioned tables, and new JSON functions that help in creating web mapping applications.
Table of Contents detailed table of contents

Part 1: Introduction to PostGIS

1 What is a spatial database?

1.1 Thinking spatially

1.2 Introducing PostGIS

1.3 Why PostGIS

1.3.1 Standards conformance

1.3.2 Built on top of PostgreSQL

1.3.3 Free—​as in money

1.3.4 Alternatives to PostGIS

1.3.5 Oracle Spatial

1.3.6 Microsoft SQL Server

1.4 Installing PostGIS

1.4.1 Verifying versions of PostGIS and PostgreSQL

1.5 Spatial data types

1.5.1 Geometry type

1.5.2 Geography type

1.5.3 Raster type

1.5.4 Topology type

1.6 Hello real world

1.6.1 Digesting the problem

1.6.2 Modeling

1.6.3 Loading data

1.6.4 Writing the query

1.6.5 Viewing spatial data with OpenJump

1.7 Summary

2 Spatial data types

2.1 Type modifiers

2.2 Subtype type modifiers

2.2.1 Spatial reference identifier

2.3 Geometry

2.3.1 Points

2.4 Geography

2.4.1 Differences between geography and geometry

2.4.2 Spatial catalogs for geography

2.5 Raster

2.5.1 Properties of rasters

2.5.2 Creating rasters

2.5.3 Spatial catalog for rasters

2.6 Summary

3 Spatial reference systems

3.1 Spatial reference systems: What are they?

3.2 Geoids

3.3 Ellipsoids

3.4 Datum

3.4.1 Coordinate reference system

3.4.2 Spatial reference system essentials

3.4.3 Projections

3.5 Selecting a spatial reference system for storing data

3.5.1 Pros and cons of using EPSG:4326

3.5.2 Geography data type for EPSG:4326

3.5.3 Mapping just for presentation

3.5.4 Covering the globe when distance is a concern

3.6 Determining the spatial reference system of source data

3.6.1 Guessing at a spatial reference system

3.6.2 When the spatial reference system is missing from spatial_ref_sys table

3.7 Summary

4 Working with real data

4.1 General utilities

4.1.1 PostgreSQL built-in tools

4.1.2 Downloading files

4.1.3 Querying external data using PostgreSQL foreign data wrappers

4.2 Summary

5 Using PostGIS on the desktop

Part 2: PostGIS basic operations

6 Geometry and geography functions

6.1 Output functions

6.1.1 Well-known binary (WKB) and well-known text (WKT)

6.1.2 Keyhole Markup Language (KML)

6.1.3 Geography Markup Language (GML)

6.1.4 Geometry JavaScript Object Notation (GeoJSON)

6.1.5 Scalable Vector Graphics (SVG)

6.1.6 Mapbox Vector Tile (MVT) and Protocol Buffers

6.1.7 Tiny WKB (TWKB)

6.1.8 Extensible 3D Graphics (X3D)

6.1.9 Examples of output functions

6.1.10 Geohash

6.2 Constructor functions

6.2.1 Creating geometries from text and binary formats

6.2.2 ST_GeomFromText

6.2.3 ST_GeomFromWKB and ST_GeomFromEWKB

6.2.4 ST_GeomFromGML, ST_GeomFromGeoJSON, ST_GeomFromKML, ST_GeomFromTWKB, ST_GeomFromGeoHash

6.2.5 Creating geographies from text and binary formats

6.2.6 Using text or binary representations as function arguments

6.3 Accessor and setter functions

6.3.1 Spatial reference identifiers

6.3.2 Transforming geometry to different spatial references

6.3.3 Using transformation with the geography type

6.3.4 Geometry type functions

6.3.5 Geometry and coordinate dimensions

6.3.6 Retrieving coordinates

6.3.7 Checking geometry validity

6.3.8 Number of points that defines a geometry

6.4 Measurement functions

6.4.1 Geometry planar measurements

6.4.2 Geodetic measurements

6.5 Decomposition functions

6.5.1 Bounding box of geometries

6.5.2 Boundaries and converting polygons to linestrings

6.5.3 Centroid, Median, and Point on surface

6.5.4 Returning points defining a geometry

6.5.5 Decomposing multi-geometries and geometry collections

6.6 Composition functions

6.6.1 Making points

6.6.2 Making polygons

6.6.3 ST_MakeEnvelope

6.6.4 ST_MakePolygon

6.6.5 ST_BuildArea

6.6.6 ST_Polygonize

6.6.7 Promoting single geometries to multi-geometries

6.7 Simplification functions

6.7.1 Grid snapping and coordinate rounding

6.7.2 Simplification

6.8 Summary

7 Geometry relationships

Part 3: Putting PostGIS to work

8 Proximity analysis

9 Geocoding and Reverse Geocoding

10 Geometry and geography processing

11 Raster processing

12 Building and using topologies

13 Organizing spatial data

14 Query performance tuning

Part 4: Using PostGIS with other tools

15 Extending PostGIS with pgRouting and procedural languages

16 Using PostGIS in web applications


Appendix A: Additional resources

Appendix B: Installing, compiling, and upgrading

Appendix C: SQL primer

Appendix D: PostgreSQL features

About the Technology

Processing location and topology data requires specialized know-how. PostGIS is a free spatial database extender for PostgreSQL that delivers the features and firepower you need to take on nearly any geodata task. With it, you can easily create location-aware queries in just a few lines of SQL code and build the back end for a mapping, raster analysis, or routing application with minimal effort.

About the book

PostGIS in Action, Third Edition teaches you to solve real-world geodata problems. It first gives you a background in vector-, raster-, and topology-based GIS and then quickly moves into analyzing, viewing, and mapping data. You'll learn how to optimize queries for maximum speed, simplify geometries for greater efficiency, and create custom functions for your own applications. You'll also learn how to apply your existing GIS knowledge to PostGIS and integrate with other GIS tools. Fully updated to the latest versions of PostGIS and PostgreSQL, this Third Edition covers new PostGIS features including Foreign Data Wrappers, Database as a Service, parallelization of queries, and new JSON and Vector Tiles functions that help in creating web mapping applications.

What's inside

  • An introduction to spatial databases
  • Geometry, geography, raster, and topology spatial types, functions, and queries
  • Applying PostGIS to real-world problems
  • Extending PostGIS to web and desktop applications
  • Updated for PostGIS 3 and PostgreSQL 12

About the reader

For readers familiar with relational databases and basic SQL. No prior geodata or GIS experience required.

About the authors

Regina Obe and Leo Hsu are database consultants and authors. Regina is a member of the PostGIS core development team and the Project Steering Committee.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
MEAP combo $49.99 pBook + eBook + liveBook
includes previous edition
MEAP eBook $39.99 pdf + ePub + kindle + liveBook
includes previous edition
Prices displayed in rupees will be charged in USD when you check out.

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks