Question

Maximal rectangle

  • 12 February 2015
  • 2 replies
  • 10 views

Badge +22
  • Contributor
  • 1961 replies
Has anyone implemented an oriented maximal rectangle in FME?  I'm looking for the largest rectangle that can fit within a polygon.

2 replies

Badge +3
Hi,

 

 

This is more a geometric mathematical problem.

 

 

Bruteforce types just itterate over all the possibility down to a certain resolution/accuracy.

 

One way would be to extract the overal skeleton midline and have a centrpoint travle along it, calculate circel interceptpoints and if there are 4 intercepts, calculate the area.

 

Another way would create a grid to a certain resolution and look for largest amount of griblocks covering the area whilst being a square as a total.

 

 

Finding the exact amximum on a arbitrary polygon however is a tad more complex.

 

Type in your question and check out the possibilities posed. Better polish up your math though...;)

 

There are a lot of papers you can download on this issue.

 

 
Badge +22
I've looked at the "empty rectangle" alogorithms, but they produce an axis aligned rectangle, which is not what I'm trying to get.

Reply