Introduction
Beyond being a spatial database with the capacity to store and query spatial data, PostGIS is a very powerful analytical tool. What this means to the user is a tremendous capacity to expose and encapsulate deep spatial analyses right within a PostgreSQL database.
The recipes in this chapter can roughly be divided into four main sections:
- Highly optimized queries:
- Improving proximity filtering with KNN
- Improving proximity filtering with KNN – advanced
- Using the database to create and modify geometries:
- Rotating geometries
- Improving ST_Polygonize
- Translating, scaling, and rotating geometries – advanced
- Getting detailed building footprints from LiDAR
- Creating a fixed number of clusters from a set of points:
- Using the PostGIS function,
ST_ClusterKMeans
, to create K clusters from a set of points - Using a minimum bounding circle to visually represent the clusters with the
ST_ MinimumBoundingCircle
function
- Using the PostGIS function,
- Calculating a Voronoi diagram:
- Using the
ST_VoronoiPolygon
function in order to calculate...
- Using the