code: public static LinearRing removeDuplicateCoordinates(LinearRing linearRing, double tolerance) {
          Coordinate[] coords = CoordinateUtils.removeRepeatedCoordinates(linearRing.getCoordinates(), tolerance, true);
          return FACTORY.createLinearRing(coords);
      }
docs: Removes duplicated coordinates within a linearRing.
  
  @param linearRing
  @param tolerance to delete the coordinates
  @return