As reported in https://github.com/libgeos/geos/issues/679, the result computed by the MinimumDiameter.minimumRectangle method is not always correct. This is because the algorithm assumes the minimum diameter is also the height of the minimum-area rectangle. But this is not always the case, since the perpendicular to the diameter may be long enough that another rectangle is smaller in area.
As reported in https://github.com/libgeos/geos/issues/679, the result computed by the
MinimumDiameter.minimumRectangle
method is not always correct. This is because the algorithm assumes the minimum diameter is also the height of the minimum-area rectangle. But this is not always the case, since the perpendicular to the diameter may be long enough that another rectangle is smaller in area.A reproducer is:
The fix is to create a new MinimumRectangle class using the classic Rotating Calipers algorithm.