- HTTP request
- Query parameters
- Request body
- Response body
- Authorization scopes
- LatLngBox
- SolarPotential
- SizeAndSunshineStats
- RoofSegmentSizeAndSunshineStats
- SolarPanel
- SolarPanelOrientation
- SolarPanelConfig
- RoofSegmentSummary
- FinancialAnalysis
- Money
- FinancialDetails
- LeasingSavings
- SavingsOverTime
- CashPurchaseSavings
- FinancedPurchaseSavings
- Try it!
Locates the closest building to a query point. Returns an error with code NOT_FOUND
if there are no buildings within approximately 50m of the query point.
HTTP request
GET https://solar.googleapis.com/v1/buildingInsights:findClosest
The URL uses gRPC Transcoding syntax.
Query parameters
Parameters | |
---|---|
location |
Required. The longitude and latitude from which the API looks for the nearest known building. |
requiredQuality |
Optional. The minimum quality level allowed in the results. No result with lower quality than this will be returned. Not specifying this is equivalent to restricting to HIGH quality only. |
Request body
The request body must be empty.
Response body
Response message for Solar.FindClosestBuildingInsights
. Information about the location, dimensions, and solar potential of a building.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "name": string, "center": { object ( |
Fields | |
---|---|
name |
The resource name for the building, of the format |
center |
A point near the center of the building. |
boundingBox |
The bounding box of the building. |
imageryDate |
Date that the underlying imagery was acquired. This is approximate. |
imageryProcessedDate |
When processing was completed on this imagery. |
postalCode |
Postal code (e.g., US zip code) this building is contained by. |
administrativeArea |
Administrative area 1 (e.g., in the US, the state) that contains this building. For example, in the US, the abbreviation might be "MA" or "CA." |
statisticalArea |
Statistical area (e.g., US census tract) this building is in. |
regionCode |
Region code for the country (or region) this building is in. |
solarPotential |
Solar potential of the building. |
imageryQuality |
The quality of the imagery used to compute the data for this building. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
LatLngBox
A bounding box in lat/lng coordinates.
JSON representation |
---|
{ "sw": { object ( |
Fields | |
---|---|
sw |
The southwest corner of the box. |
ne |
The northeast corner of the box. |
SolarPotential
Information about the solar potential of a building. A number of fields in this are defined in terms of "panels". The fields panelCapacityWatts
, panelHeightMeters
, and panelWidthMeters
describe the parameters of the model of panel used in these calculations.
JSON representation |
---|
{ "maxArrayPanelsCount": integer, "panelCapacityWatts": number, "panelHeightMeters": number, "panelWidthMeters": number, "panelLifetimeYears": integer, "maxArrayAreaMeters2": number, "maxSunshineHoursPerYear": number, "carbonOffsetFactorKgPerMwh": number, "wholeRoofStats": { object ( |
Fields | |
---|---|
maxArrayPanelsCount |
Size of the maximum array - that is, the maximum number of panels that can fit on the roof. |
panelCapacityWatts |
Capacity, in watts, of the panel used in the calculations. |
panelHeightMeters |
Height, in meters in portrait orientation, of the panel used in the calculations. |
panelWidthMeters |
Width, in meters in portrait orientation, of the panel used in the calculations. |
panelLifetimeYears |
The expected lifetime, in years, of the solar panels. This is used in the financial calculations. |
maxArrayAreaMeters2 |
Size, in square meters, of the maximum array. |
maxSunshineHoursPerYear |
Maximum number of sunshine hours received per year, by any point on the roof. Sunshine hours are a measure of the total amount of insolation (energy) received per year. 1 sunshine hour = 1 kWh per kW (where kW refers to kW of capacity under Standard Testing Conditions). |
carbonOffsetFactorKgPerMwh |
Equivalent amount of CO2 produced per MWh of grid electricity. This is a measure of the carbon intensity of grid electricity displaced by solar electricity. |
wholeRoofStats |
Total size and sunlight quantiles for the part of the roof that was assigned to some roof segment. Despite the name, this may not include the entire building. See |
buildingStats |
Size and sunlight quantiles for the entire building, including parts of the roof that were not assigned to some roof segment. Because the orientations of these parts are not well characterised, the roof area estimate is unreliable, but the ground area estimate is reliable. It may be that a more reliable whole building roof area can be obtained by scaling the roof area from |
roofSegmentStats[] |
Size and sunlight quantiles for each roof segment. |
solarPanels[] |
Each |
solarPanelConfigs[] |
Each |
financialAnalyses[] |
A |
SizeAndSunshineStats
Size and sunniness quantiles of a roof, or part of a roof.
JSON representation |
---|
{ "areaMeters2": number, "sunshineQuantiles": [ number ], "groundAreaMeters2": number } |
Fields | |
---|---|
areaMeters2 |
The area of the roof or roof segment, in m^2. This is the roof area (accounting for tilt), not the ground footprint area. |
sunshineQuantiles[] |
Quantiles of the pointwise sunniness across the area. If there are N values here, this represents the (N-1)-iles. For example, if there are 5 values, then they would be the quartiles (min, 25%, 50%, 75%, max). Values are in annual kWh/kW like |
groundAreaMeters2 |
The ground footprint area covered by the roof or roof segment, in m^2. |
RoofSegmentSizeAndSunshineStats
Information about the size and sunniness quantiles of a roof segment.
JSON representation |
---|
{ "stats": { object ( |
Fields | |
---|---|
stats |
Total size and sunlight quantiles for the roof segment. |
center |
A point near the center of the roof segment. |
boundingBox |
The bounding box of the roof segment. |
pitchDegrees |
Angle of the roof segment relative to the theoretical ground plane. 0 = parallel to the ground, 90 = perpendicular to the ground. |
azimuthDegrees |
Compass direction the roof segment is pointing in. 0 = North, 90 = East, 180 = South. For a "flat" roof segment ( |
planeHeightAtCenterMeters |
The height of the roof segment plane, in meters above sea level, at the point designated by |
SolarPanel
SolarPanel describes the position, orientation, and production of a single solar panel. See the panelHeightMeters
, panelWidthMeters
, and panelCapacityWatts
fields in SolarPotential
for information on the parameters of the panel.
JSON representation |
---|
{ "center": { object ( |
Fields | |
---|---|
center |
The centre of the panel. |
orientation |
The orientation of the panel. |
yearlyEnergyDcKwh |
How much sunlight energy this layout captures over the course of a year, in DC kWh. |
segmentIndex |
Index in |
SolarPanelOrientation
The orientation of a solar panel. This must be interpreted relative to the azimuth of the roof segment that the panel is placed on.
Enums | |
---|---|
SOLAR_PANEL_ORIENTATION_UNSPECIFIED |
No panel orientation is known. |
LANDSCAPE |
A LANDSCAPE panel has its long edge perpendicular to the azimuth direction of the roof segment that it is placed on. |
PORTRAIT |
A PORTRAIT panel has its long edge parallel to the azimuth direction of the roof segment that it is placed on. |
SolarPanelConfig
SolarPanelConfig describes a particular placement of solar panels on the roof.
JSON representation |
---|
{
"panelsCount": integer,
"yearlyEnergyDcKwh": number,
"roofSegmentSummaries": [
{
object ( |
Fields | |
---|---|
panelsCount |
Total number of panels. Note that this is redundant to (the sum of) the corresponding fields in |
yearlyEnergyDcKwh |
How much sunlight energy this layout captures over the course of a year, in DC kWh, assuming the panels described above. |
roofSegmentSummaries[] |
Information about the production of each roof segment that is carrying at least one panel in this layout. |
RoofSegmentSummary
Information about a roof segment on the building, with some number of panels placed on it.
JSON representation |
---|
{ "panelsCount": integer, "yearlyEnergyDcKwh": number, "pitchDegrees": number, "azimuthDegrees": number, "segmentIndex": integer } |
Fields | |
---|---|
panelsCount |
The total number of panels on this segment. |
yearlyEnergyDcKwh |
How much sunlight energy this part of the layout captures over the course of a year, in DC kWh, assuming the panels described above. |
pitchDegrees |
Angle of the roof segment relative to the theoretical ground plane. 0 = parallel to the ground, 90 = perpendicular to the ground. |
azimuthDegrees |
Compass direction the roof segment is pointing in. 0 = North, 90 = East, 180 = South. For a "flat" roof segment ( |
segmentIndex |
Index in |
FinancialAnalysis
Analysis of the cost and benefits of the optimum solar layout for a particular electric bill size.
JSON representation |
---|
{ "monthlyBill": { object ( |
Fields | |
---|---|
monthlyBill |
The monthly electric bill this analysis assumes. |
defaultBill |
Whether this is the bill size selected to be the default bill for the area this building is in. Exactly one |
averageKwhPerMonth |
How much electricity the house uses in an average month, based on the bill size and the local electricity rates. |
financialDetails |
Financial information that applies regardless of the financing method used. |
leasingSavings |
Cost and benefit of leasing the solar panels. |
cashPurchaseSavings |
Cost and benefit of buying the solar panels with cash. |
financedPurchaseSavings |
Cost and benefit of buying the solar panels by financing the purchase. |
panelConfigIndex |
Index in |
Money
Represents an amount of money with its currency type.
JSON representation |
---|
{ "currencyCode": string, "units": string, "nanos": integer } |
Fields | |
---|---|
currencyCode |
The three-letter currency code defined in ISO 4217. |
units |
The whole units of the amount. For example if |
nanos |
Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If |
FinancialDetails
Details of a financial analysis. Some of these details are already stored at higher levels (e.g., out of pocket cost). Total money amounts are over a lifetime period defined by the panelLifetimeYears
field in SolarPotential
. Note: The out of pocket cost of purchasing the panels is given in the outOfPocketCost
field in CashPurchaseSavings
.
JSON representation |
---|
{ "initialAcKwhPerYear": number, "remainingLifetimeUtilityBill": { object ( |
Fields | |
---|---|
initialAcKwhPerYear |
How many AC kWh we think the solar panels will generate in their first year. |
remainingLifetimeUtilityBill |
Utility bill for electricity not produced by solar, for the lifetime of the panels. |
federalIncentive |
Amount of money available from federal incentives; this applies if the user buys (with or without a loan) the panels. |
stateIncentive |
Amount of money available from state incentives; this applies if the user buys (with or without a loan) the panels. |
utilityIncentive |
Amount of money available from utility incentives; this applies if the user buys (with or without a loan) the panels. |
lifetimeSrecTotal |
Amount of money the user will receive from Solar Renewable Energy Credits over the panel lifetime; this applies if the user buys (with or without a loan) the panels. |
costOfElectricityWithoutSolar |
Total cost of electricity the user would have paid over the lifetime period if they didn't install solar. |
netMeteringAllowed |
Whether net metering is allowed. |
solarPercentage |
Percentage (0-100) of the user's power supplied by solar. Valid for the first year but approximately correct for future years. |
percentageExportedToGrid |
The percentage (0-100) of solar electricity production we assumed was exported to the grid, based on the first quarter of production. This affects the calculations if net metering is not allowed. |
LeasingSavings
Cost and benefit of leasing a particular configuration of solar panels with a particular electricity usage.
JSON representation |
---|
{ "leasesAllowed": boolean, "leasesSupported": boolean, "annualLeasingCost": { object ( |
Fields | |
---|---|
leasesAllowed |
Whether leases are allowed in this juristiction (leases are not allowed in some states). If this field is false, then the values in this message should probably be ignored. |
leasesSupported |
Whether leases are supported in this juristiction by the financial calculation engine. If this field is false, then the values in this message should probably be ignored. This is independent of |
annualLeasingCost |
Estimated annual leasing cost. |
savings |
How much is saved (or not) over the lifetime period. |
SavingsOverTime
Financial information that's shared between different financing methods.
JSON representation |
---|
{ "savingsYear1": { object ( |
Fields | |
---|---|
savingsYear1 |
Savings in the first year after panel installation. |
savingsYear20 |
Savings in the first twenty years after panel installation. |
presentValueOfSavingsYear20 |
Using the assumed discount rate, what is the present value of the cumulative 20-year savings? |
savingsLifetime |
Savings in the entire panel lifetime. |
presentValueOfSavingsLifetime |
Using the assumed discount rate, what is the present value of the cumulative lifetime savings? |
financiallyViable |
Indicates whether this scenario is financially viable. Will be false for scenarios with poor financial viability (e.g., money-losing). |
CashPurchaseSavings
Cost and benefit of an outright purchase of a particular configuration of solar panels with a particular electricity usage.
JSON representation |
---|
{ "outOfPocketCost": { object ( |
Fields | |
---|---|
outOfPocketCost |
Initial cost before tax incentives: the amount that must be paid out-of-pocket. Contrast with |
upfrontCost |
Initial cost after tax incentives: it's the amount that must be paid during first year. Contrast with |
rebateValue |
The value of all tax rebates. |
savings |
How much is saved (or not) over the lifetime period. |
paybackYears |
Number of years until payback occurs. A negative value means payback never occurs within the lifetime period. |
FinancedPurchaseSavings
Cost and benefit of using a loan to buy a particular configuration of solar panels with a particular electricity usage.
JSON representation |
---|
{ "annualLoanPayment": { object ( |
Fields | |
---|---|
annualLoanPayment |
Annual loan payments. |
rebateValue |
The value of all tax rebates (including Federal Investment Tax Credit (ITC)). |
loanInterestRate |
The interest rate on loans assumed in this set of calculations. |
savings |
How much is saved (or not) over the lifetime period. |