public void testMinimumDiameter6() throws Exception {
doMinimumDiameterTest(false, "LINESTRING ( 39 119, 162 197, 135 70, 95 35, 33 66, 111 82, 97 131, 48 160, -4 182, 57 195, 94 202, 90 174, 75 134, 47 114, 0 100, 59 81, 123 60, 136 43, 163 75, 145 114, 93 136, 92 159, 105 175 )", new Coordinate(64.46262341325811, 196.41184767277855), new Coordinate(95, 35));
}
private void doMinimumDiameterTest(boolean convex, String wkt, Coordinate c0, Coordinate c1) throws ParseException {
Coordinate[] minimumDiameter = new MinimumDiameter(new WKTReader().read(wkt), convex).getDiameter().getCoordinates();
double tolerance = 1E-10;
assertEquals(c0.x, minimumDiameter[0].x, tolerance);
assertEquals(c0.y, minimumDiameter[0].y, tolerance);
assertEquals(c1.x, minimumDiameter[1].x, tolerance);
assertEquals(c1.y, minimumDiameter[1].y, tolerance);