A federal judge in Baltimore has blocked construction of the subway line to Rosecroft Raceway in Prince George's County, saying the Metro board failed to give notice of a public hearing on the proposal to change the destination of the line from Branch Avenue to Rosecroft Raceway.

As a result of Friday's ruling by U.S. District Court Judge Norman P. Ramsey, the subway line will go to Branch Avenue, the route that was originally proposed and approved, unless the Metro board holds a new public hearing on the proposed line to Rosecroft Raceway and advertises the hearing properly.

County officials said yesterday they will encourage the transit authority to hold the necessary hearings. "I presume that will happen now is that we will hold hearings and do whatever else is necessary and probably reach the same policy conclusion," said County Council Chairman Parris Glendening.

The suit was brought by seven businessmen and homeowners who live near the proposed Branch Avenue Metro stop. They have said the decision to change the route was made without notification of a public hearing, and that the decision would result in their losing business or otherwise being inconvenienced. One of the businesses, for example, Bill Cairns Pontiac, spent almost $2 million to purchase land for an auto dealership near the end of the Branch Avenue line, only to find out the line would not go there, according to the suit.

From 1968 until 1978, maps of Metro routes showed that the "F" route would go to Branch Avenue, not Rosecroft Raceway. But in 1978, at the urging of then-county executive Winfield Kelly, the County Council voted to change the Metro route to Rosecroft Raceway. The vote was clouded in controversy over whether Peter O'Malley, a lawyer for Rosecroft Raceway and the adjacent landowners, had influenced the council's votes. O'Malley was a party strategist for the Democratic council and county executive, who were then running for reelection.

The transit authority then followed the council's decision, but did not give adequate public notice of a hearing to consider the proposed route change, according to the court ruling.

"For the reason that the notice here [of a hearing] does not specify that possible rerouting of 'F' route was to be discussed at the Dec. 20 hearing, the notice is defective," Judge Ramsey wrote in his ruling. "This puts the 'F' plan back to Branch Avenue with a pending amendment to change to Rosecroft open and ready for a hearing."

Del. Lorraine Sheehan, who asked the council to reconsider its decision to move the Metro stop, said she was "delighted" by the court ruling. "I just hope the wishes of the citizens of southern Prince George's will now be considered and the line will be moved to where they want it," she said, referring to Branch Avenue.

But county officials said yesterday that they expect the transit authority to hold a public hearing on the Rosecroft Metro stop within 90 days. The officials said they were unsure whether construction would be slowed by the necessity of a new transit authority hearing.

The Rosecroft Raceway line had been scheduled to open in 1989, but the schedule is not likely to be met because of insufficient funding by the federal government during the past two years. In addition, President Reagan has put a low priority on funding new rail construction.

Darrell Trent, deputy secretary of transportation, said last week all rail construction projects around the country would be postponed.

The Rosecroft line would result in the government taking many homes and part of a Knights of Columbus hall. The station would serve no major facility well, but would come within a long walk of Greater Southeast Community Hospital and the Rosecroft Raceway.One section of the line would run at window level only 50 feet from some homes.

The Branch Avenue line was planned to serve an established business community and the Suitland Federal Center. But part of the line was to run in the center of Suitland Parkway, a plan opposed by the National Park Service.