Function getBoundsFromPoints