In the past it was easy to dump sludge into landfills or the ocean.
A 1988 ban ended the practice by many counties of dumping sludge in the Atlantic Ocean.
The city had dumped sludge at a site 12 miles offshore until 1988, when Congress banned the practice.
The composting plants are being built at the insistence of Federal regulators who sought to stop the city's dumping sludge into the ocean.
Lots of countries have now made laws so that people cannot dump sludge.
By mid-1992, the city must stop dumping sludge into the ocean and dispose of it on land.
He even went to jail for dumping sludge from a polluted beach into the toilets of an oil company's headquarters.
"No one can argue that dumping sludge in the ocean is a good idea," he said.
New York City and other localities have been using the 12-mile site to dump sludge since 1938.
Any authority still dumping sludge in the ocean by 1993 would have to pay penalties besides the fees.