After two weeks of scouring the District for sites for a new city prison, federal officials are expected to give two old standby locations -- the old D.C. Jail tract and St. Elizabeths Hospital -- the highest rankings, primarily because construction at either could begin quickly, according to sources familiar with the search.

Although locations in every quadrant of the District have been examined during the search, sources said that it could take many months to obtain other sites from the agencies that now own them, exacerbating the inmate crowding problems that the city is under court order to relieve.

Among the sites examined by a special search team of city and federal officials are portions of the Agriculture Department's National Arboretum in Northeast and several National Park Service tracts in Northwest and Northeast, including the Langston Golf Course at 26th Street and Benning Road, and the site of the shelter for the homeless operated by the Community for Creative Non-Violence at Second and D streets NW.

The search team has also researched several sites in Southeast, including tracts at the Washington Navy Yard and near the new shelter for the homeless at 1900 Anacostia Dr. SE.

The search has been complicated by the city's lack of detail about the size and type of prison the city intends to build, sources said. Some sources indicate that two facilities, one medium security and another minimum security, each housing about 700 inmates, will be needed to accommodate the number of prisoners that city expects to incarcerate during the next decade. However, they note, the two facilities could be built at one 30- to 35-acre location.

City officials have refused to comment on the site selection process and the type of prison they are considering, except to say that a high priority will be given to construction of a drug treatment center.

Still, federal officials said they believe they are making "real progress" in their talks with the city and expect to forward to city officials a list of possible sites in the next few days.

The District's current prison crisis was prompted by the federal government's decision to end its agreement to house D.C. prisoners temporarily, an agreement that enabled the city to meet court-ordered inmate population ceilings at the D.C. Jail and three facilities at Lorton Reformatory, its prison in Fairfax County.

At the time the agreement was revoked the jail housed 1,555, and on Friday the number had reportedly grown to 1,623, 71 persons fewer than the ceiling set Aug. 22 by U.S. District Court Judge William B. Bryant. Yesterday, the jail reportedly housed 1,610.

In a meeting Jan. 16 with Mayor Marion Barry, Deputy Attorney General D. Lowell Jensen said the federal government might reconsider its decision when the city has made significant progress toward building a new prison.

The city has also announced plans to build modular housing for 400 persons at Lorton's Central facility as an "interim" measure to ease crowding until a new prison can be built. Actual construction of a new facility is expected to take about three years, although that time could be shortened if a minimum-security facility is built.

Congress has appropriated $30 million for a new prison in the District, but a study by a prominent criminologist estimates it will cost at least twice that amount to build the prison space needed.

According to a recent report on the D.C. prison system by Sean McConville, a professor at the University of Illinois, the D.C. Department of Corrections and the federal General Accounting Office "have both forecast an increase . . . that will require two new prisons by 1990."

Construction of a prison on the old D.C. Jail site, between the D.C. Armory and D.C. General Hospital, could begin immediately because Congress has previously designated the land for such a facility. But on Dec. 17, Barry approved plans for a new ambulatory care wing and emergency room for D.C. General Hospital, which is expected to take up 25 percent of the site. Construction on the hospital addition is scheduled to begin this year.

On the other hand, Congress has already decided to transfer St. Elizabeths Hospital to the District and federal and local officials believe that they could easily obtain congressional permission to use a portion of the 364-acre site for a new prison.

Obtaining other federal tracts for use as a prison site could be much more complicated and stretch over many months, sources said.

For example, the size and relative isolation of Langston and a former golf course adjacent to Fort Dupont Park in Southeast make both locations desirable, but both sites are owned by the National Park Service and "once it's park land it's very hard to get," according to a federal official.

"It's not impossible," the official said, "but to get the park land we would have to have other land to swap for it." Because that would involve two parcels of land controlled by separate federal agencies, the process could lengthen with delays, a federal official pointed out.

There are various problems with other sites studied. At the 444-acre National Arboretum, according to director Marc Cathey, officials examined a site that includes an old brickyard that runs along New York Avenue NE.

"It was put on the National Historic Register in 1968 and 1978 and cannot be demolished," Cathey said.

In addition, he said, the arboretum is in the 100-year flood plain of the Anacostia River and "I don't think they can legally build on it."