Add extent function for computing bounding boxes.