@Test
public void testRotatedRectangleIntersection() throws Exception {
if (isOSX) {
System.out.println("skipping testRotatedRectangleIntersection on OSX");
} else {
Polygon polygon1 = (Polygon) new WKTReader().read("POLYGON((20 0, 50 -30, 30 -50, 0 -20, 20 0))");
Polygon polygon2 = (Polygon) new WKTReader().read("POLYGON((40 -40, 60 -20, 20 20, 0 0, 40 -40))");
ROIGeometry geom1 = new ROIGeometry(polygon1);
ROIShape shape1 = getEquivalentROIShape(geom1);
ROIGeometry geom2 = new ROIGeometry(polygon2);
ROIShape shape2 = getEquivalentROIShape(geom2);
final ROI geomUnion = geom1.intersect(geom2);
final ROI shapeUnion = shape1.intersect(shape2);
assertROIEquivalent(geomUnion, shapeUnion, "RotatedIntersection");
}
}