Returns the nearest approach distance between the spatiotemporal box and the geometry (internal function)