Marrakech, Morocco (CNN) If you've ever thought about putting solar panels on your roof, you know that the process doesn't exactly qualify as an impulse purchase.

Typically, it involves multiple visits from solar installers.

The standard practice in the industry is to go up on the rooftop with a fish-eye camera, then take a picture from each of the four corners to make an estimate of the solar potential of the roof.

What if you could do that from your computer instead, and all by yourself?

Enter Project Sunroof, a Google tool that uses high-resolution 3D data and artificial intelligence to allow you to do exactly that.

A better (Google) Earth

Project Sunroof shares some of its technology with the familiar Google Maps and Google Earth, and then adds its own spin to it.

"The centerpiece of the technology is a 3D model of the world that does shadowcasting, which means that for every point of a roof we can determine whether there will be shade or not, for every time of the day, every day of the year," Joel Conkling, Google's principal of energy and sustainability, told CNN, from the COP22 climate change conference, in Marrakech.

Users in covered areas -- 42 US states and about 43 million buildings at the moment -- can go to the Sunroof Project website, enter their address and see an estimate of the energy production potential of their roof right away, and the actual savings based on weather data (less sunny areas will yield less power) and the price of electricity from the local utility.

"We connect directly to the providers, so customers can immediately get a quote. You can ask for your proposal within two minutes," says Conkling.

Google Project Sunroof estimates that a roof in the city of Somerville, Massachusetts experiences 1,479 hours of usable sunlight per year. This amounts to an estimated $18,000 in net savings for the roof with a 20-year lease.

Machine learning

To make this possible, Google uses advanced machine learning algorithms to analyze the data.

"Our system can automatically identify buildings and then extract information about the roof, including how it's angled, the direction it's pointing, and whether there are trees in its vicinity," said Conkling.

The end result is at least as accurate as going up on the roof, according to Conkling.

The only catch is that the source data must be very detailed: Project Sunroof doesn't use satellite photos, because the resolution isn't enough, but high quality imagery which is available only where Google has flown airplanes to collect aerial shots.

"For that reason we probably won't ever get to cover all the buildings in the US, or any country for that matter. That's why we focus on the most populous areas," said Conkling.

"We hope to expand abroad but we have no concrete plans to do so as of yet. The data is available for around 30 to 40 other countries already."

UN award winner

The project spawns from Google's "20 Percent Time" scheme, which allows engineers at the company to spend one day a week on whatever they find interesting. The scheme has incubated some famous Google products, like Gmail and Google News.

After launching in 2015 in just three cities, Project Sunroof has attracted millions of users so far, according to Conkling.

It's one of the winners of the 2016 United Nations "Momentum for Change" award, which every year shines a light on innovative, scalable and replicable examples of what people are doing to address climate change. As such, it was showcased at the UN's climate change conference, COP22, in Marrakech, Morocco.

New this year is something called the "Data Explorer:" whereas Sunroof's original incarnation focuses on the solar potential of a specific house, the Data Explorer takes it up a level to aggregate data about a city, a county or a state.

"It's targeted at city or state leaders and other governmental figures who want to learn about the solar potential for their whole jurisdiction to set data driven solar policies," said Conkling.

Green commitment

Google has a strong commitment to renewable energy.

To date, it says it has invested $2.5 billion in wind and solar projects around the world, which can generate over 3.7 GW a year, enough to power one million US homes. It is the largest non-utility purchaser of renewable energy in the world.