Joins for regular SQL tables have the real power in a relational database and spatial joins are one of the most impressive features of a spatial database engine such as PostGIS.
Basically, it is possible to correlate information from different layers on the basis of the geometric relation of each feature from the input layers. In this recipe, we will take a tour of some common use cases of spatial joins.
.kmzfile containing the information about 2012 global earthquakes from the USGS website at http://earthquake.usgs.gov/earthquakes/eqarchives/epic/kml/2012_Earthquakes_ALL.kmz. Save it in the
working/chp03directory (alternatively, ...