Chapter 2. Spatial data types

This chapter covers:

Geometry, geography, and raster spatial types and subtypes

Geometry and geography type modifiers

Spatial catalog tables

How to create spatial columns and populate them

In the first chapter, we teased you with the potential that you can unlock with PostGIS. This chapter will start to show you how, by delving deeper into the core spatial data types bundled with PostGIS. We’ll discuss each spatial type in detail. Once you’ve completed this chapter, you’ll know how to create table columns of these various types and how to populate them with spatial data.

Do keep in the back of your mind that PostgreSQL has its own built-in geometric types. These are point, polygon, lseg, box, circle, and path. PostgreSQL ...

Get PostGIS in Action, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.