public void test1() throws Exception {
WKTReader reader = new WKTReader(new GeometryFactory(new PrecisionModel(1), 0));
LineString lineString = (LineString) reader.read("LINESTRING (30 220, 240 220, 240 220)");
LineString convexHull = (LineString) reader.read("LINESTRING (30 220, 240 220)");
assertTrue(convexHull.equalsExact(lineString.convexHull()));
}
public void test2() throws Exception {
WKTReader reader = new WKTReader(new GeometryFactory(new PrecisionModel(1), 0));
Geometry geometry = reader.read("MULTIPOINT (130 240, 130 240, 130 240, 570 240, 570 240, 570 240, 650 240)");