I have coordinates for different geometric shapes like rhombus, polygon, rectangle and etc. I need exact coordinates for bounding box around them. My coordinates for points 1,2,3,4 & 5 can start from clockwise or anticlockwise. But bounding box should be accurate. How can I get the coordinates for the rectangle around the shapes?

Best example I can give is the link below. Draw any shape on the map using polygon tool in this below link and you will get the rectangle around it. So I need coordinates for this rectangle. Link here
Example coordinates for 1 polygon:
(x1,y1) = (8.375, 127.5258)
(x2,y2) = (26.1326, 127.5258)
(x3,y3) = (26.375, 130.5258)
(x4,y4) = (23.6995, 141.2277)
(x5,y5) = (8.375, 137.3966)
For an $n$-gone you have $$x_{\text{min}} = \min \{ x_k \mid k = 1, \ldots, n \}$$ and similar for $x_{\text{max}}, y_{\text{min}}, y_{\text{max}}, z_{\text{min}}, z_{\text{max}}.$
In pseudo-code: