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.

I would like to compute the rectangle by width.

  • 1
    Are you looking for a result in arcgis? How do geos and C relate to the question?
    – BradHards
    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. 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.
    – BradHards
    Dec 23, 2016 at 20:38

1 Answer 1


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? 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.
    – klewis
    Dec 22, 2016 at 22:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.