Skip to main content
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/
Source Link

A complete answer can be found herehere however in summary:

  • [S] rotate the polygon to match one of its edges with X axis
  • compute minmax of X and Y for vertices
  • this gives you a candidate for minimum area rectangle (MAR) or MBR
  • store the area of (x2-x1)*(y2-y1)
  • repeat from [S] for all edges
  • find the minimum area which corresponds to MBR
  • rotate found [[x1,y1],[x2,y2]] by -angle applied in [S]

Done.

A complete answer can be found here however in summary:

  • [S] rotate the polygon to match one of its edges with X axis
  • compute minmax of X and Y for vertices
  • this gives you a candidate for minimum area rectangle (MAR) or MBR
  • store the area of (x2-x1)*(y2-y1)
  • repeat from [S] for all edges
  • find the minimum area which corresponds to MBR
  • rotate found [[x1,y1],[x2,y2]] by -angle applied in [S]

Done.

A complete answer can be found here however in summary:

  • [S] rotate the polygon to match one of its edges with X axis
  • compute minmax of X and Y for vertices
  • this gives you a candidate for minimum area rectangle (MAR) or MBR
  • store the area of (x2-x1)*(y2-y1)
  • repeat from [S] for all edges
  • find the minimum area which corresponds to MBR
  • rotate found [[x1,y1],[x2,y2]] by -angle applied in [S]

Done.

Source Link
Developer
  • 3.4k
  • 4
  • 30
  • 34

A complete answer can be found here however in summary:

  • [S] rotate the polygon to match one of its edges with X axis
  • compute minmax of X and Y for vertices
  • this gives you a candidate for minimum area rectangle (MAR) or MBR
  • store the area of (x2-x1)*(y2-y1)
  • repeat from [S] for all edges
  • find the minimum area which corresponds to MBR
  • rotate found [[x1,y1],[x2,y2]] by -angle applied in [S]

Done.