code: public LinearRing createLinearRing(Coordinate[] coordinates) {
  		if (coordinates == null || coordinates.length == 0) {
  			return new LinearRing(srid, precision);
  		}
  		boolean isClosed = true;
  		if (coordinates.length == 1 || !coordinates[0].equals(coordinates[coordinates.length - 1])) {
  			isClosed = false;
  		}
  
  		Coordinate[] clones;
  		if (isClosed) {
  			clones = new Coordinate[coordinates.length];
  		} else {
  			clones = new Coordinate[coordinates.length + 1];
  		}
  		for (int i = 0; i < coordinates.length; i++) {
  			clones[i] = (Coordinate) coordinates[i].clone();
  		}
  		if (!isClosed) {
  			clones[coordinates.length] = (Coordinate) clones[0].clone();
  		}
  		return new LinearRing(srid, precision, clones);
  	}
docs: Create a new {@link LinearRing}, given an array of coordinates.
  
  @param coordinates
  An array of {@link Coordinate} objects. This function checks if the array is closed, and does so
  itself if needed.
  @return Returns a {@link LinearRing} object.