private LinearRing normalized(LinearRing ring, boolean clockwise) { LinearRing res = (LinearRing) ring.copy(); normalize(res, clockwise); return res; }
@Test public void testNoDecimation() { // acute triangle LinearRing g = gf.createLinearRing(csf.create(new double[] {0, 0, 0, 10, 2, 10, 2, 0, 0, 0})); LinearRing original = (LinearRing) g.copy(); assertTrue(g.isValid()); Decimator d = new Decimator(-1, -1); d.decimate(g); g.geometryChanged(); assertTrue(g.isValid()); assertTrue(original.equalsExact(g)); }