Skip to main content
Question

Maximal rectangle

  • February 12, 2015
  • 2 replies
  • 51 views

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
Has anyone implemented an oriented maximal rectangle in FME?  I'm looking for the largest rectangle that can fit within a polygon.

2 replies

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • February 13, 2015
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.

 

 

jdh
Contributor
Forum|alt.badge.img+28
  • Author
  • Contributor
  • February 13, 2015
I've looked at the "empty rectangle" alogorithms, but they produce an axis aligned rectangle, which is not what I'm trying to get.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings