Optimize intersection area calculation
Optimize intersection area calculation

Instead of unioning both features and other_features before intersecting, we union only features (to minimize the number of rows in the cartiesian cross product). This allows ST_Intersection to untilize the spatial index to determine the intersection with other_features. This yields performance gains of 2x.

culturecode/spatial_features