Package micycle.pgs.commons
Class MaximumInscribedAARectangle
java.lang.Object
micycle.pgs.commons.MaximumInscribedAARectangle
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 Summary
ConstructorsConstructorDescriptionMaximumInscribedAARectangle
(org.locationtech.jts.geom.Geometry polygon, double f) -
Method Summary
Modifier and TypeMethodDescriptionint[]
Returns the largest rectangle that will fit inside a convex hull
-
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]
-