お知らせ:
2025 年 4 月 15 日より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、Earth Engine へのアクセスを維持するために
非商用目的での利用資格を確認する必要があります。
Method: projects.image.computePixels
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
画像データに対して任意の計算を実行して、ピクセルのタイルを計算します。
リクエストは、リクエストのディメンション(ピクセル単位)、リクエストされた画像バンドの数、各バンドのピクセルあたりのバイト数の積として計算される、リクエストあたり 48 MB の非圧縮データに制限されます。リクエストは、いずれかのディメンションで最大 32,000 ピクセル、最大 1,024 バンドに制限されています。これらの上限を超えるリクエストは、エラーコード 400(BAD_REQUEST)になります。
成功した場合、レスポンスの本文には、リクエストの fileFormat
フィールドで指定されたエンコードでリクエストされたピクセルデータが含まれます。
HTTP リクエスト
POST https://earthengine.googleapis.com/v1beta/{project=projects/*}/image:computePixels
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
project |
string
このリクエストのサービス ユーザーとして扱う必要がある Google Cloud Platform プロジェクトのプロジェクト ID またはプロジェクト番号。形式は projects/{project-id} です。
認可には、指定されたリソース project に対する次の IAM の権限が必要です。
earthengine.computations.create
|
リクエストの本文
リクエストの本文には、次の構造のデータが含まれます。
フィールド |
expression |
object (Expression )
計算する式。
|
fileFormat |
enum (ImageFileFormat )
ピクセル値を返す出力ファイル形式。
|
grid |
object (PixelGrid )
expression によって計算された画像を再投影してクリップする方法を表すパラメータ。指定しない場合、計算された画像全体がネイティブ投影で返されます。
|
bandIds[] |
string
指定されている場合、expression の評価結果から選択される特定のバンドセットを指定します。指定しない場合、expression の結果として得られたすべてのバンドが選択されます。
|
visualizationOptions |
object (VisualizationOptions )
存在する場合は、データの 8 ビット RGB 可視化を生成するために適用する一連の可視化オプション。
|
workloadTag |
string
この計算をトラッキングするためにユーザーが指定したタグ。
|
レスポンスの本文
成功した場合、レスポンスはメソッドによって定義された形式の汎用 HTTP レスポンスになります。
認可スコープ
以下のいずれかの 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 Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 UTC。"],[[["\u003cp\u003eThis API computes a tile of pixels by performing a user-defined computation on image data using an expression.\u003c/p\u003e\n"],["\u003cp\u003eRequests are limited to 48MB of uncompressed data and specific dimensions, exceeding which results in a 400 error.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful responses contain pixel data in the specified file format, encoded within the HTTP response body.\u003c/p\u003e\n"],["\u003cp\u003eThe API requires authorization using 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"],["\u003cp\u003eUsers can define the projection, clipping, band selection, and visualization options for the computed image within the request.\u003c/p\u003e\n"]]],["This API computes a tile of pixels from image data via an arbitrary expression. Input parameters include `expression`, `fileFormat`, `grid`, `bandIds`, `visualizationOptions`, and `workloadTag`. Requests are limited to 48MB of uncompressed data, 32K pixels per dimension, and 1024 bands, returning a 400 error code if these limits are exceeded. A successful request returns pixel data in the specified `fileFormat`, with authorization requiring specific OAuth scopes.\n"],null,["# Method: projects.image.computePixels\n\nComputes a tile of pixels by performing an arbitrary computation on image data.\n\nRequests are limited to 48MB in uncompressed data per request, computed as the product of the request dimensions in pixels, the number of image bands requested, and the number of bytes per pixel for each band. Requests are also limited to at most 32K pixels in either dimension and at most 1024 bands. Requests exceeding these limits will result in an error code of 400 (BAD_REQUEST).\n\nIf successful, the response body contains the requested pixel data in the encoding specified in the `fileFormat` field of the request.\n\n### HTTP request\n\n`POST https://earthengine.googleapis.com/v1beta/{project=projects/*}/image:computePixels`\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/v1beta/Expression) }, \"fileFormat\": enum (/earth-engine/reference/rest/v1beta/ImageFileFormat), \"grid\": { object (/earth-engine/reference/rest/v1beta/PixelGrid) }, \"bandIds\": [ string ], \"visualizationOptions\": { object (/earth-engine/reference/rest/v1beta/VisualizationOptions) }, \"workloadTag\": string } ``` |\n\n| Fields ||\n|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `expression` | `object (`[Expression](/earth-engine/reference/rest/v1beta/Expression)`)` The expression to compute. |\n| `fileFormat` | `enum (`[ImageFileFormat](/earth-engine/reference/rest/v1beta/ImageFileFormat)`)` The output file format in which to return the pixel values. |\n| `grid` | `object (`[PixelGrid](/earth-engine/reference/rest/v1beta/PixelGrid)`)` Parameters describing how the image computed by `expression` should be reprojected and clipped. If not present, the full computed image is returned in its native projection. |\n| `bandIds[]` | `string` If present, specifies a specific set of bands that will be selected from the result of evaluating `expression`. If not present, all bands resulting from `expression` will be selected. |\n| `visualizationOptions` | `object (`[VisualizationOptions](/earth-engine/reference/rest/v1beta/VisualizationOptions)`)` If present, a set of visualization options to apply to produce an 8-bit RGB visualization of the data. |\n| `workloadTag` | `string` User supplied tag to track this computation. |\n\n### Response body\n\nIf successful, the response is a generic HTTP response whose format is defined by the method.\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)."]]