Return the Smallest Surrounding Rectangle for a given array of points
The smallest SurroundingRectangle by area, or null if the given points did not produce a valid hull.
SurroundingRectangle
null
http://gis.stackexchange.com/questions/22895/finding-minimum-area-rectangle-for-given-points http://gis.stackexchange.com/questions/3739/generalisation-strategies-for-building-outlines/3756#3756
p5 --- p4| || p3 ------ p2| |p0 ------------- p1const footprint = [[0, 0], [8, 0], [8, 2], [3, 2], [3, 6], [0, 6], [0, 0]];const points = geomRotate(footprint, Math.PI / 6, [0, 0]);const ssr = geomGetSmallestSurroundingRectangle(points);// ssr.angle == Math.PI / 6 Copy
p5 --- p4| || p3 ------ p2| |p0 ------------- p1const footprint = [[0, 0], [8, 0], [8, 2], [3, 2], [3, 6], [0, 6], [0, 0]];const points = geomRotate(footprint, Math.PI / 6, [0, 0]);const ssr = geomGetSmallestSurroundingRectangle(points);// ssr.angle == Math.PI / 6
Return the Smallest Surrounding Rectangle for a given array of points