In a city starved for space, nothing says wealth — or luck — like a rooftop oasis. Aerial photographer Alex S. MacLean captured a rare bird’s eye view of these little slices of heaven in his new book “Up on the Roof: New York’s Hidden Skyline Spaces” (Princeton University Press).

“You get a sense that there’s a whole world going on right above us,” MacLean said. “When you’re down on the street, you have no idea.”

MacLean took the pictures from a helicopter without the knowledge of owners; his book contains no details about the spaces.

But The Post reached out to some of the rooftop denizens to see what life is like above the rabble.

Bette Midler may have the wind beneath her wings, but it could make for a rough landing on her tree-lined rooftop garden in Carnegie Hill. The “Divine Miss M” shares the Upper East Side penthouse with her longtime hubby, Martin von Haselberg. The 3,100-square-foot sprawling rooftop overlooks Central Park, and includes a glass-enclosed patio and plenty of shaded areas to park your tuches on hot days.

70 Little West St.

The city’s most impressive secret garden (more like secret farm) is 35 flights up in Battery Park at the home of high-powered financial lawyer Fred Rich. With the help of his “team,” headed up by rooftop farmer Annie Novak, his 2,000-square-foot terrace has seen a wide array of edibles: grapes, apples, pears, berries, kale, broccoli and tomatoes.

“I feel incredibly privileged to be able to pick and eat fresh fruit and vegetables in the city; the flavor of fresh-picked food is incomparable,” Rich told The Post.

There’s only one space that’s not covered in green grass: his outdoor yoga studio (the flat, cross-thatched space in the middle). The view of the Freedom Tower and Hudson River is all the sweeter in an upward-facing dog pose.

12 E. 14th St.

Peter Nakada, his wife, Ellis Wood, and their three youngsters all got game. Their oldest son, Aki, 8, loves to play hoops. So they installed a blue and orange half court on their rooftop with an adjustable net. The 200-pound base ensures it doesn’t fly off the roof. Nakada, who is in catastrophic-risk management, quipped, “The real risk is if the basketball goes over the ledge.” Not to worry; the walls are high enough. But sharing such coveted space in Union Square can mean making concessions to your neighbor in the next patch. Singer Sunny Leigh said the dribbling of the ball was driving her crazy, so the Nakadas moved the court to the other side of their enclosure.

225 Central Park West

Alan Winston is the true constant gardener. For the past 40 years, the retired primitive-arts dealer has been tending to his 83-foot-long wraparound “Eden” of marigolds, impatiens and wildflowers. But his real love can be a bit prickly — he keeps his cacti collection from the unseasonable weather inside one of his two greenhouses on the 17th floor of his penthouse apartment on the Upper West Side. He has a bird’s-eye view of the Metropolitan Museum of Art on his right and Central Park to his left. At night, he has a panorama of the skyline. “It is one of the greatest views in the world,” he says.

166 Bank St.

It was once Heidi Klum and Seal’s secret getaway — complete with a Jacuzzi. The now-estranged supermodel and singer enjoyed their penthouse and two-story roof deck until they sold it two years ago. Now the 1,600-square-foot rooftop with Hudson River views and a statue of a woman diving in a hot tub belongs to an unnamed finance exec. A neighbor who has been up to the exclusive West Village rooftop says you can’t help but “think of the poor people down below.”

684 Broadway

Plastic is a dirty word. Real-estate developer Matthew Blesso, of Blesso Properties, has an eco-friendly, 3,100-square-foot apartment in Nolita, and that includes his rooftop of sustainable harvested wood and walnut structures. A cistern under the deck reroutes the drain so the water collects into the tank and waters the plants. The soundproof insulation in the walls is made of recycled blue jeans. There’s also low-energy, fiber-optic lighting and dual-flush toilets. Of course, there’s an outdoor shower for those gritty days of summer. “I’m a water person,” Blesso said. “The outdoor hot tub and shower are my favorite part of having a rooftop space in the city. I enjoy the privacy and pleasure of being able to roam nude from one to the other. Between May and October, I never shower inside.”

5 Tudor City Place

This lush, tree-covered, two-story terrace (the left tower) is a Hollywood favorite, featured in “Spider-Man,” “The Bourne Ultimatum” and Woody Allen’s “Bullets over Broadway.” The majestic duplex (with 1,700 square feet of rooftop space) went on the market in March after the death of its owner, Harper & Row publisher Brooks Thomas. After a heated bidding war, an unnamed Midwestern businessman scooped up the property for more than its asking price of $5.895 million, according to Brown Harris Stevens senior VP Howard Morrel. That Midwesterner will now spend his nights amidst the various sculptures — grotesques, as they are called, of dragons, gargoyles and even a goat — the tall arborvitae trees, holly bushes, day lilies and geraniums, while soaking up the view of the 59th Street Bridge to the east and the Empire State Building and Chrysler Building to the west.

151 Wooster St.

When this ultra-private hedge-fund moneymaker wants to play a round of golf, he just steps out onto his patio and onto his golfing green. The luxury SoHo penthouse, which was originally two units, was merged into one in 2009 and sold for a jaw-dropping $14 million. It was bought by a private company to hide the identity of the owner.