Sign up for our COVID-19 newsletter to stay up-to-date on the latest coronavirus news throughout New York City

The seeds of New York’s rooftop farming industry, planted over the past decade, have yielded a harvest in recent years.

It has grown from a niche industry to a large-scale phenomenon, according to experts, thanks to a change in city regulations and a subsequent spur of investment.

And there’s potential for expansion in the years ahead, especially in Brooklyn and Queens.

“These large-scale greenhouses are advanced and expensive, but more and more consumers and businesses are supporting them,” said Nicole Baum, spokeswoman for Gotham Greens, a rooftop farm operator in Brooklyn.

The city changed its zoning laws in 2012 to allow rooftop greenhouses certain exemptions from limits on height and floor size on commercial and industrial properties. As a consequence, landlords have come to view them as a potential amenity and opportunity for profit.

“The landlords now see a way to use their space wisely,” said Annie Novak, a farmer who helped create the Eagle Street Rooftop Farm in Greenpoint in 2009. “Now there is a positive shift from the community who want to see these spaces.”

While the latest data on the number of urban farms comes from the U.S. Census — which said the city saw 11 new farms between 2007 and 2012 — agricultural experts point to a boom in the facilities on rooftops as evidence of the industry’s growth.

Sales from rooftop farms’ most common produce — collards, spinach, kale and other greens — have netted hundreds of thousands of dollars for farmers, with the average Brooklyn farm (on a rooftop or the ground) seeing $199,302 in sales in 2012, according to the Census.

For years, the biggest obstacle to rooftop farming was the cost.

An ideal space for a major harvest yield takes up 44,000 square feet, roughly an acre, according to an urban farming study released by Columbia University’s Earth Institute in 2013.

The space doesn’t come cheap; Brooklyn Grange’s 40,000-square-foot rooftop farm in Long Island City, for example, required $200,000 in startup capital in 2010.

After opening a successful 15,000-square-foot greenhouse on a rooftop in Greenpoint in 2011, Gotham Greens capitalized on the attention it was getting to grow its business.

“That was really a proof of concept,” Baum said of the initial facility.

The company reached various partnerships, including a deal with Whole Foods, that allowed it to build a 20,000-square-foot rooftop greenhouse on top of the Gowanus store in 2013.

Two years later, it opened a 60,000-square-foot facility on a Hollis, Queens, building and expanded to Chicago.

The city offers plenty of ready-made locations to allow for the industry’s further expansion, according to the Columbia University analysis.

It concluded that there were more than 5,701 private and public roofs in 2013 that, combined, were capable of holding 3,000 acres of rooftop farms. That’s nearly three and a half times the size of Central Park. Neighborhoods with the most rooftop space were Maspeth, Long Island City, Greenpoint and Sunset Park, according to the report.

Gabby Warshawer, the director of research for the real estate listing site CityRealty, said she’s hopeful building owners will use that potential as a selling point.

“This is another cool added value to the neighborhood,” she said.