code: public static LinearRing convert(LineString lineString,int dimension) {
          return gf.createLinearRing(convertSequence(lineString.getCoordinates(),dimension));
      }
docs: Force the dimension of the LineString and update correctly the coordinate
  dimension
  @param lineString
  @param dimension
  @return