How do you erect a 19-story building in New York City?

Start with a 31-story structure. Discover zoning prohibits a building that big. Lose a three-year court battle. And receive an order to lop 12 stories off.Welcome to 108 E. 96th St., the $7.2 million high-rise set to shrink this month in the final act of a showdown between local activists and its developer, Parkview Associates. David defeated Goliath last week when the city ruled the 31-story edifice must lose its top dozen floors.

The decision will cost the developer about $10 million in addition to the fought-over floors, leaving the building owners a little queasy as they ponder continuing their fight to save those stories.

"We're going to take a while to digest this decision," said Jay A. Segal, attorney for Parkview Associates. "We won't make any decision for a week or two."

The city last week also dealt with a second Manhattan building found to be too tall. The 811-foot CitySpire project on West 54th Street was erected 14 feet above what zoning ordinances allow.

But officials spared the building a steel haircut. Developer Ian Bruce Eichner won a compromise agreement in which he will build a $2.5 million dance studio in return for a variance.

Parkview's $10 million loss includes the cost of chopping off the illegal floors, the income from the lost apartments and the cost of the building's extended vacancy. The building remains uninhabited; it would have been ready to open in late 1986.

The odds don't look good for Park-view, which has unsuccessfully taken its battle to preserve the high-rise to the city, local court, state court and U.S. Supreme Court.

The city rejected a Parkview proposal to build about 40 low-income senior citizen apartments in East Harlem in return for a zoning variance leaving the building intact.

Parkview has until April 27 to appeal its most recent loss; the developer's last option is a lawsuit against the city.