Status Update
Comments
ca...@google.com <ca...@google.com> #2
Thanks for your suggestion!
We'll be reviewing this for further consideration. Please star this issue to get updates and leave comments for additional information. Please note that starring the issue also provides our product team with valuable feedback on the importance of the issue to our customers.
da...@civica-soft.com <da...@civica-soft.com> #3
Hi, I am experiencing a similar case and I think I have found both root cause & a possible workaround
@google I'd appreciate if you could please check my answer below and provide feedback :)
TLDR; use requiredQuality=LOW and exactQualityRequired=FALSE parameters
-Issue: when making a Solar API request, you may occasionally get a 404 error
-How to reproduce:
curl --location --globoff 'https://solar.googleapis.com/v1/dataLayers:get?location.latitude=38.40970839445829&location.longitude=-4.501318710722837&radiusMeters=100&view=FULL_LAYERS&requiredQuality=LOW&exactQualityRequired=true&pixelSizeMeters=0.5&key=••••••'
-Error received:
{
"error": {
"code": 404,
"message": "Requested entity was not found.",
"status": "NOT_FOUND"
}
}
-Apparent root cause: there is no matching data for that specific location AND that specific resolution
-Expected result: tbd by Google (maybe return a more explanatory message "no matching imaginary resolution"?)
-Possible workaround:
- set parameter requiredQuality to the lowest possible resolution: e..g requiredQuality=LOW
- set parameter exactQualityRequired=false
-Expected result from this workaround: Google API will return the highest available resolution in spite of you asking for a lower one
E.g. this call will return imageryQuality = HIGH
curl --location --globoff 'https://solar.googleapis.com/v1/dataLayers:get?location.latitude=37.12137645540546&location.longitude=-3.6246941622257833&radiusMeters=100&view=FULL_LAYERS&requiredQuality=low&exactQualityRequired=false&pixelSizeMeters=0.5&key=••••••'
Description
Hello,
I'm trying to use Solar API in a MEDIUM range resolution buildings. However it's not working on any of them in any part of the world. Whether I try to use demo fromhttps://solar-potential-kypkjw5jmq-uc.a.run.app/ or my own version cloned from github: https://github.com/googlemaps-samples/js-solar-potential
I'm not sure but according to this code block it should be working even for low resolutions, however it works only for HIGH resolutions. Only works for orange places from this map:https://developers.google.com/maps/documentation/solar/coverage?hl=pl
export async function getDataLayerUrls( location: LatLng, radiusMeters: number, apiKey: string, ): Promise<DataLayersResponse> { const args = { 'location.latitude': location.latitude.toFixed(5), 'location.longitude': location.longitude.toFixed(5), radius_meters: radiusMeters.toString(), // The Solar API always returns the highest quality imagery available. // By default the API asks for HIGH quality, which means that HIGH quality isn't available, // but there is an existing MEDIUM or LOW quality, it won't return anything. // Here we ask for at least LOW quality, but if there's a higher quality available, // the Solar API will return us the highest quality available. required_quality: 'LOW' };
Is there any other place where it is defined?
Thanks, Tomasz