/** * Simplify the input coordinate list. * If the distance tolerance is positive, * concavities on the LEFT side of the line are simplified. * If the supplied distance tolerance is negative, * concavities on the RIGHT side of the line are simplified. * * @param distanceTol simplification distance tolerance to use * @return the simplified coordinate list */ public Coordinate[] simplify(double distanceTol) { this.distanceTol = Math.abs(distanceTol); if (distanceTol < 0) angleOrientation = CGAlgorithms.CLOCKWISE; // rely on fact that boolean array is filled with false value isDeleted = new byte[inputLine.length]; boolean isChanged = false; do { isChanged = deleteShallowConcavities(); } while (isChanged); return collapseLine(); }
/** * Simplify the input coordinate list. * If the distance tolerance is positive, * concavities on the LEFT side of the line are simplified. * If the supplied distance tolerance is negative, * concavities on the RIGHT side of the line are simplified. * * @param distanceTol simplification distance tolerance to use * @return the simplified coordinate list */ public Coordinate[] simplify(double distanceTol) { this.distanceTol = Math.abs(distanceTol); if (distanceTol < 0) angleOrientation = CGAlgorithms.CLOCKWISE; // rely on fact that boolean array is filled with false value isDeleted = new byte[inputLine.length]; boolean isChanged = false; do { isChanged = deleteShallowConcavities(); } while (isChanged); return collapseLine(); }