Class MaximumInscribedAARectangle

java.lang.Object
micycle.pgs.commons.MaximumInscribedAARectangle

public class MaximumInscribedAARectangle extends Object
Computes the largest inscribed axis-aligned rectangle within a convex hull. Credits: Daniel Sud for the Inscribed Rectangle algorithm http://cgm.cs.mcgill.ca/~athens/cs507/Projects/2003/DanielSud/
Author:
Peter (pborissow), Adapted by Michael Carleton
  • Constructor Details

    • MaximumInscribedAARectangle

      public MaximumInscribedAARectangle(org.locationtech.jts.geom.Geometry polygon, double f)
  • Method Details

    • getInscribedRectangle

      public int[] getInscribedRectangle()
      Returns the largest rectangle that will fit inside a convex hull
      Returns:
      int[x, y, w, h]