Find Largest Internal Rectangle from a Polygon

Related products: FME Form

Looking for a transformer to establishing the largest rectangle that would fit inside a given polygon. The mathematics behind it is extremely complex, though would be happy if it only worked with convex polygons to simply things.

This idea isn't exactly new.
Previously raised in a few questions:
2015 - https://knowledge.safe.com/questions/4879/maximal-rectangle.html
2018 - https://knowledge.safe.com/questions/65011/maximum-inside-rectangle-from-an-polygon.html

However, I don't believe it has been raised as an idea yet.

I ended up creating something off of this https://d3plus.org/blog/behind-the-scenes/2014/07/08/largest-rect/


Thanks @jdh

I've seen that article and the code that has been used. I'm not sure if my implementation is correct but I've found instances where rectangles provided could potentially be extended further and still fit within the polygon.


Your implementation is probably correct. The algorithm is an approximation, and doesn't guarantee the largest possible polygon, just one that is close to it.