/** * If the coordinate array argument has repeated points, * constructs a new array containing no repeated points. * Otherwise, returns the argument. * @see #hasRepeatedPoints(Coordinate[]) */ public static Coordinate[] removeRepeatedPoints(Coordinate[] coord) { if (! hasRepeatedPoints(coord)) return coord; CoordinateList coordList = new CoordinateList(coord, false); return coordList.toCoordinateArray(); }