The decision to buy an encyclopedia for the family often comes under trying circumstances: It's pouring rain and someone has to go to the library to research Galileo, or there's a heated argument at the dinner table about how long the Jurassic period lasted.

Although an encyclopedia can solve such problems, don't rush into things. The price can run as high as $1,099, so consider the family's needs carefully, as well as your own pocketbook.

First of all, do you really need an encyclopedia? If you live close to a public library, perhaps you don't. A sizable branch library may offer up-to-date editions of four to six encyclopedias for children and adults. Your tax dollars purchased them. Why not use them?

If, however, getting to a library is a chore for you or your children, or if you're a family who likes to look things up and settle arguments on the spot, then you're good candidates to own an encyclopedia.

Once you decide to buy, it's a good idea to do a bit of research. After all, most people purchase only one encyclopedia in a lifetime, and a little time spent on consumer research is well spent.

The American Library Association publishes a useful book called Purchasing an Encyclopedia: 12 Points to Consider, which critiques 20 reference works (available from Order Department, ALA, 50 E. Huron St., Chicago 60611, $3). Or, ask your public library for a copy of the invaluable Encyclopedia Buying Guide, by Kenneth Kister (3rd edition, R.R. Bowker, 1981).

Kister's book is just what its subtitle claims--"A Consumer Guide to General Encyclopedias in Print"--covering 36 encyclopedias ranging from adult multivolume works to children's single-volume desk references. Kister explains how encyclopedias are marketed (usually by salespeople who come to your home) and provides a checklist of criteria to consider when examining an encyclopedia. And, perhaps most illuminating, he includes a 1978 study of preferences of U.S. and Canadian librarians. (Seventy-seven librarians participated in the survey, and their clear favorite for an all-round reference work was World Book.)

Kister's book is the place to begin your research, but the place to continue it is with the encyclopedias themselves. There is no substitute for spending time leafing through various sets: looking up topics such as gene splicing, art nouveau, or Zanzibar, just to get a notion of how clearly and attractively material is presented.

You can request that an encyclopedia salesperson leave a full set (don't settle for a partial one or any "sample" volume) in your home for a trial period. But a better way to comparison shop is, again, in the public library where you have access to several encyclopedias at once.

The computer is changing the field of encyclopedias rapidly. Already in some areas of the country subscribers to information services, such as those offered by Dow Jones, are able to tap into so-called "on-line" encyclopedias like Academic American, put out by Grolier (and also offered in conventional volumes). And, in truth, these kinds of encyclopedias can be revised continuously.

There's always the possibility that as more families purchase home computers and subscribe to electronic information services, the set of matched volumes lining the shelves in the family room may go the way of the aardvark. But should you be considering the "on-line" rather than the "on-shelf" variety, remember this: The computerized encyclopedia may offer the most up-to-date information, but you won't be able to read it in bed.