The Domino Sugar construction site on the Brooklyn waterfront is about as close to the water as you can get.

"When you came here in 2012, you could almost reach down and touch the East River, and now you're considerably above it," said David Lombino, a managing director at development firm Two Trees, standing on a concrete pier that juts out 50 feet over the water.

The developer bought this waterfront site for $185 million in 2012 after falling in love with the expansive views of the Manhattan skyline and the Williamsburg Bridge.

A month later, the storm surge from Sandy flooded most of the property.

Lombino says the company spent the next two years totally reworking its plans. It raised the grade of the entire site between 2 and 7 feet and moved the footprint of new buildings back at least 50 feet farther from the river.

That was expensive. But Lombino says it was worth it to reduce the risk of future flood damage.

"It's not a matter of if it will flood again," Lombino said. "It's a matter of when and how quickly we can bounce back the next time."

It's not just developers who are planning for the next storm. Since Sandy, New York City has made big changes to its building and zoning codes for structures of all kinds — from luxury apartments to single-family homes — aimed at getting expensive heating and electrical systems out of basements and off the ground.

"We're replacing less-safe buildings with more-safe buildings," said Daniel Zarrilli, New York's senior director of climate policy and programs. "So that means we're elevating the house. We're elevating the core infrastructure — the mechanicals, the electrical equipment, the meter. All of that is being raised out of harm's way and out of the flood plain."

Even the city's critics concede New York has moved quickly since Sandy.

"The city has done a lot of things that really help for the current situation," said Klaus Jacob, a research scientist at Columbia University. "What I think is missing: that we have a long-term vision."

Jacob thinks these new resilient building practices are great. But he worries they won't be enough if sea levels rise 6 feet by the end of the century, as some models suggest.

"Those buildings themselves may be OK because they are actually constructed in such a way that they can flood," Jacob said. "But people may not be able to get in and out of those buildings because the streets are flooded."

Jacob thinks the city should be talking now about the idea of "managed retreat" — steering new development away from the water and turning some low-lying areas into park or even marshland.

In Staten Island, residents of a few coastal neighborhoods have taken voluntary buyouts and left. In most parts of the city, though, homeowners are rebuilding in neighborhoods that flooded. And high-end real estate developers in Brooklyn and Manhattan are still building right up to the water's edge. But some are changing what might have done five years ago.

"It's about just building more or less the same building as you always do," said Simon Koster, a principal with JDS Development Group, "but just placing things a little bit differently or being a little bit more thoughtful about what those materials are."

Koster says his company incorporated some key lessons from Sandy into the American Copper Buildings, a pair of new luxury apartment towers that sit just a few hundred feet from the East River in Manhattan.

Before Sandy, a room on 48th floor of the west tower might have been a penthouse apartment. Instead, it's occupied by five large backup generators that can supply emergency power to 760 apartments.

"You would have enough power to charge your phone," Koster said. "You'd be able to keep food in your refrigerator, at a bare minimum. You would be able to flush your toilet and you would have an elevator that goes up to the floor you live on."

Copyright 2017 NPR. To see more, visit http://www.npr.org/.