Method: dataLayers.get
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
取得某個位置周圍區域的太陽能資訊。如果位置不在涵蓋範圍內,則會傳回代碼 NOT_FOUND
的錯誤。
HTTP 要求
GET https://solar.googleapis.com/v1/dataLayers:get
這個網址使用 gRPC 轉碼語法。
查詢參數
參數 |
location |
object (LatLng )
必要欄位。要取得資料的區域中心位置經緯度。
|
radiusMeters |
number
必要欄位。半徑 (以公尺為單位),定義該中心點周圍的區域,系統會傳回該區域的資料。此值的限制如下:
- 您可以指定任何值 (上限為 100 公尺)。
- 只要
radiusMeters <= pixelSizeMeters * 1000 ,即可指定超過 100 公尺的值。
- 不過,如果值超過 175 公尺,請勿在要求中加入月度流量或每小時陰影的
DataLayerView 。
|
view |
enum (DataLayerView )
(非必要) 要傳回的資料子集。
|
requiredQuality |
enum (ImageryQuality )
(非必要) 結果中允許的最低品質等級。系統不會傳回品質低於此值的結果。如未指定,則系統會只限制高品質。
|
pixelSizeMeters |
number
(非必要) 傳回資料的最小比例 (以每像素公尺為單位)。系統支援的值為 0.1 (如果未明確設定此欄位,則為預設值)、0.25、0.5 和 1.0。如果圖像元件的正常解析度小於 pixelSizeMeters ,系統會以 pixelSizeMeters 指定的解析度傳回圖像元件;如果圖像元件的正常解析度等於或大於 pixelSizeMeters ,系統會以該正常解析度傳回圖像元件。
|
exactQualityRequired |
boolean
(非必要) 是否要求圖像的確切品質。如果設為 false,系統會將 requiredQuality 欄位解讀為最低要求的品質,因此當 requiredQuality 設為 MEDIUM 時,系統可能會傳回高品質圖像。如果設為 true,系統會將 requiredQuality 解讀為確切的必要品質,且只有在 requiredQuality 設為 MEDIUM 時,才會傳回 MEDIUM 品質的圖像。
|
experiments[] |
enum (Experiment )
(非必要) 指定要啟用的正式發布前實驗。
|
回應主體
如果成功,回應主體會包含 DataLayers
的執行例項。
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/cloud-platform
DataLayerView
列舉 |
DATA_LAYER_VIEW_UNSPECIFIED |
等同於 FULL。 |
DSM_LAYER |
僅取得 DSM。 |
IMAGERY_LAYERS |
取得 DSM、RGB 和遮罩。 |
IMAGERY_AND_ANNUAL_FLUX_LAYERS |
取得 DSM、RGB、遮罩和年度流量。 |
IMAGERY_AND_ALL_FLUX_LAYERS |
取得 DSM、RGB、遮罩、年度流量和月度流量。 |
FULL_LAYERS |
取得所有資料。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-29 (世界標準時間)。
[null,null,["上次更新時間:2025-08-29 (世界標準時間)。"],[[["\u003cp\u003eRetrieves solar information for a specified region using latitude, longitude, and radius.\u003c/p\u003e\n"],["\u003cp\u003eAllows customization of data retrieval with parameters like \u003ccode\u003eview\u003c/code\u003e, \u003ccode\u003erequiredQuality\u003c/code\u003e, \u003ccode\u003epixelSizeMeters\u003c/code\u003e, and \u003ccode\u003eexactQualityRequired\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eReturns an error if the location is outside the coverage area or if radius exceeds limitations.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eResponse includes a \u003ccode\u003eDataLayers\u003c/code\u003e object containing the requested solar data subset if successful.\u003c/p\u003e\n"]]],["This content details how to retrieve solar information for a specific region via a `GET` request to `https://solar.googleapis.com/v1/dataLayers:get`. The request requires parameters like `location` (latitude/longitude), `radiusMeters`, and optional parameters including `view`, `requiredQuality`, `pixelSizeMeters` and `exactQualityRequired`. The body is empty and a successful response will provide solar data via `DataLayers`. Specific authorization scope `https://www.googleapis.com/auth/cloud-platform` is required. `DataLayerView` allows one to define the solar information subset to be retrieved.\n"],null,["# Method: dataLayers.get\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [DataLayerView](#DataLayerView)\n- [Try it!](#try-it)\n\nGets solar information for a region surrounding a location. Returns an error with code `NOT_FOUND` if the location is outside the coverage area.\n\n### HTTP request\n\n`GET https://solar.googleapis.com/v1/dataLayers:get`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `location` | `object (`[LatLng](/maps/documentation/solar/reference/rest/v1/LatLng)`)` Required. The longitude and latitude for the center of the region to get data for. |\n| `radiusMeters` | `number` Required. The radius, in meters, defining the region surrounding that centre point for which data should be returned. The limitations on this value are: - Any value up to 100m can always be specified. - Values over 100m can be specified, as long as `radiusMeters` \\\u003c= `pixelSizeMeters * 1000`. - However, for values over 175m, the `DataLayerView` in the request must not include monthly flux or hourly shade. |\n| `view` | `enum (`[DataLayerView](/maps/documentation/solar/reference/rest/v1/dataLayers/get#DataLayerView)`)` Optional. The desired subset of the data to return. |\n| `requiredQuality` | `enum (`[ImageryQuality](/maps/documentation/solar/reference/rest/v1/dataLayers#ImageryQuality)`)` 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. |\n| `pixelSizeMeters` | `number` Optional. The minimum scale, in meters per pixel, of the data to return. Values of 0.1 (the default, if this field is not set explicitly), 0.25, 0.5, and 1.0 are supported. Imagery components whose normal resolution is less than `pixelSizeMeters` will be returned at the resolution specified by `pixelSizeMeters`; imagery components whose normal resolution is equal to or greater than `pixelSizeMeters` will be returned at that normal resolution. |\n| `exactQualityRequired` | `boolean` Optional. Whether to require exact quality of the imagery. If set to false, the `requiredQuality` field is interpreted as the minimum required quality, such that HIGH quality imagery may be returned when `requiredQuality` is set to MEDIUM. If set to true, `requiredQuality` is interpreted as the exact required quality and only `MEDIUM` quality imagery is returned if `requiredQuality` is set to `MEDIUM`. |\n| `experiments[]` | `enum (`[Experiment](/maps/documentation/solar/reference/rest/v1/Experiment)`)` Optional. Specifies the pre-GA experiments to enable. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [DataLayers](/maps/documentation/solar/reference/rest/v1/dataLayers#DataLayers).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nDataLayerView\n-------------\n\nWhat subset of the solar information to return.\n\n| Enums ||\n|----------------------------------|--------------------------------------------------------|\n| `DATA_LAYER_VIEW_UNSPECIFIED` | Equivalent to FULL. |\n| `DSM_LAYER` | Get the DSM only. |\n| `IMAGERY_LAYERS` | Get the DSM, RGB, and mask. |\n| `IMAGERY_AND_ANNUAL_FLUX_LAYERS` | Get the DSM, RGB, mask, and annual flux. |\n| `IMAGERY_AND_ALL_FLUX_LAYERS` | Get the DSM, RGB, mask, annual flux, and monthly flux. |\n| `FULL_LAYERS` | Get all data. |"]]