# How to find the minimum perimeter oriented bounding box?

I would like to know an algorithm to calculate the minimum perimeter oriented bounding box of a point set or polygon. I know that if I use the rotating calipers, I am able to get the minimum area oriented bounding box. However, I would like the bounding box considering the perimeter, or the width.

An example of this is given in ArcGIS.

• Are you looking for a result in arcgis? How do geos and C relate to the question? Commented Dec 23, 2016 at 6:13
• @BradHards I am looking for solutions implemented in C or found in the GEOS library. The Figure from ArcGIS is here only to illustrate my question. Commented Dec 23, 2016 at 10:15
• I still don't get it. Of the five options in your diagram, which do you want? Convex hull would appear to be the smallest perimeter distance, but I don't get how width comes into it, or what the other alternatives have to do with it. I'm also not familiar with rotating calipers - you might want to explain that too. Commented Dec 23, 2016 at 20:38

Here is Python Code to determine the MBR by minimum Area. It seems easy to change the criteria to minimum Width or Perimeter. https://github.com/dbworth/minimum-area-bounding-rectangle/blob/master/python/min_bounding_rect.py

• Yes, I agree. But, is this implementation using the rotating calipers? Commented Dec 22, 2016 at 22:09
• I'm not sure what rotating calipers algorithm is. The code seems to create a rectangle at the angle of each edge, comparing length,width,area. Commented Dec 22, 2016 at 22:14