公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
Method: projects.imageCollection.computeImages
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
通过对一个或多个表中的特征应用任意计算来计算一组特征。结果会作为图片列表返回。
HTTP 请求
POST https://earthengine.googleapis.com/v1/{project=projects/*}/imageCollection:computeImages
网址采用 gRPC 转码语法。
路径参数
参数 |
project |
string
应被视为此请求的服务使用方的 Google Cloud Platform 项目的项目 ID 或项目编号。格式为 projects/{project-id} 。
必须对指定的资源 project 具有以下 IAM 权限才能进行授权:
earthengine.computations.create
|
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
"expression": {
object (Expression )
},
"pageSize": integer,
"pageToken": string,
"workloadTag": string
} |
字段 |
expression |
object (Expression )
要计算的表达式。
|
pageSize |
integer
每页的结果数上限。服务器返回的图片数量可能少于请求的数量。如果未指定,则默认每页显示 1, 000 条结果。
|
pageToken |
string
标识服务器应返回的结果页面的令牌。 通常,这是上次调用 imageCollection.computeImages 方法返回的 ComputeImagesResponse.next_page_token 值。
|
workloadTag |
string
用户提供的用于跟踪此计算的代码。
|
响应正文
EarthEngineService.ComputeImages 的响应消息。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"images": [
{
object (EarthEngineAsset )
}
],
"nextPageToken": string
} |
字段 |
images[] |
object (EarthEngineAsset )
与查询匹配的图片列表。
|
nextPageToken |
string
用于检索下一页结果的令牌。在对 imageCollection.computeImages 方法的后续调用中,将此值传入 ComputeImagesRequest.page_token 字段,以检索下一页结果。
|
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/earthengine
https://www.googleapis.com/auth/earthengine.readonly
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/cloud-platform.read-only
如需了解详情,请参阅 OAuth 2.0 Overview。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThe \u003ccode\u003eimageCollection.computeImages\u003c/code\u003e method computes features from one or more tables using an arbitrary computation and returns results as a list of images.\u003c/p\u003e\n"],["\u003cp\u003eUsers can specify the \u003ccode\u003eexpression\u003c/code\u003e to define the computation, \u003ccode\u003epageSize\u003c/code\u003e to limit results per page, \u003ccode\u003epageToken\u003c/code\u003e for pagination, and \u003ccode\u003eworkloadTag\u003c/code\u003e for tracking.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful responses include a list of \u003ccode\u003eimages\u003c/code\u003e (EarthEngineAssets) and a \u003ccode\u003enextPageToken\u003c/code\u003e for retrieving additional results.\u003c/p\u003e\n"],["\u003cp\u003eAuthentication requires specific OAuth scopes like \u003ccode\u003ehttps://www.googleapis.com/auth/earthengine\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e.\u003c/p\u003e\n"]]],["The `computeImages` method processes features from tables using a user-defined expression. A POST request is sent to a specific URL, including the project ID. The request body contains the computation `expression`, `pageSize` to control result count, `pageToken` for pagination, and a `workloadTag` for tracking. The response returns a list of `images` and a `nextPageToken` for subsequent result pages. Authorization requires specific OAuth scopes. An IAM permission (`earthengine.computations.create`) is required on the specified project.\n"],null,["# Method: projects.imageCollection.computeImages\n\nComputes a set of features by applying an arbitrary computation to features in one or more tables. Results are returned as a list of images.\n\n### HTTP request\n\n`POST https://earthengine.googleapis.com/v1/{project=projects/*}/imageCollection:computeImages`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `project` | `string` The project id or project number of the Google Cloud Platform project that should be treated as the service consumer for this request. Format is `projects/{project-id}`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `project`: - `earthengine.computations.create` |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"expression\": { object (/earth-engine/reference/rest/v1/Expression) }, \"pageSize\": integer, \"pageToken\": string, \"workloadTag\": string } ``` |\n\n| Fields ||\n|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `expression` | `object (`[Expression](/earth-engine/reference/rest/v1/Expression)`)` The expression to compute. |\n| `pageSize` | `integer` The maximum number of results per page. The server may return fewer images than requested. If unspecified, the page size default is 1000 results per page. |\n| `pageToken` | `string` A token identifying a page of results the server should return. Typically, this is the value of [ComputeImagesResponse.next_page_token](/earth-engine/reference/rest/v1/projects.imageCollection/computeImages#body.ComputeImagesResponse.FIELDS.next_page_token) returned from the previous call to the `imageCollection.computeImages` method. |\n| `workloadTag` | `string` User supplied tag to track this computation. |\n\n### Response body\n\nResponse message for EarthEngineService.ComputeImages.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"images\": [ { object (/earth-engine/reference/rest/v1/projects.assets#EarthEngineAsset) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `images[]` | `object (`[EarthEngineAsset](/earth-engine/reference/rest/v1/projects.assets#EarthEngineAsset)`)` The list of images matching the query. |\n| `nextPageToken` | `string` A token to retrieve the next page of results. Pass this value in the [ComputeImagesRequest.page_token](/earth-engine/reference/rest/v1/projects.imageCollection/computeImages#body.request_body.FIELDS.page_token) field in the subsequent call to the `imageCollection.computeImages` method to retrieve the next page of results. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/earthengine`\n- `\n https://www.googleapis.com/auth/earthengine.readonly`\n- `\n https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/cloud-platform.read-only`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]