Chapter 6. Geometry and geography functions
This chapter covers
- Output functions
- Constructor functions
- Accessor and setter functions
- Measurement functions
- Composition and decomposition functions
- Simplification functions
In previous chapters, we’ve discussed PostGIS spatial types—how to create them, and how to add them to your database. In this chapter, we’ll introduce the core set of functions that work with spatial types. This chapter concentrates on functions that work with single geometries and geographies.
PostGIS offers lots of functions and operators, and in this chapter we’ve grouped them by intent of use. This is by no means a rigorous classification, nor one that will neatly sort each function into a unique group without ambiguity, but grouping functions by the type of tasks you’re trying to accomplish is the handiest approach, in our experience. We’ll refer to geometries and geographies as spatial objects when discussing both. This is the classification scheme we’ll use: