Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
Method: projects.image.computePixels
Stay organized with collections
Save and categorize content based on your preferences.
Computes a tile of pixels by performing an arbitrary computation on image data.
Requests 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).
If successful, the response body contains the requested pixel data in the encoding specified in the fileFormat
field of the request.
HTTP request
POST https://earthengine.googleapis.com/v1alpha/{project=projects/*}/image:computePixels
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
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 permission on the specified resource project :
earthengine.computations.create
|
Request body
The request body contains data with the following structure:
Fields |
expression |
object (Expression )
The expression to compute.
|
fileFormat |
enum (ImageFileFormat )
The output file format in which to return the pixel values.
|
grid |
object (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.
|
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.
|
visualizationOptions |
object (VisualizationOptions )
If present, a set of visualization options to apply to produce an 8-bit RGB visualization of the data.
|
workloadTag |
string
User supplied tag to track this computation.
|
Response body
If successful, the response is a generic HTTP response whose format is defined by the method.
Authorization scopes
Requires one of the following OAuth scopes:
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
For more information, see the OAuth 2.0 Overview.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-03-06 UTC.
[null,null,["Last updated 2025-03-06 UTC."],[[["\u003cp\u003eThis API computes a tile of pixels by performing a calculation on image data, returning the pixel data in a specified file format.\u003c/p\u003e\n"],["\u003cp\u003eRequests are restricted to 48MB of uncompressed data, 32K pixels in each dimension, and 1024 bands, with larger requests resulting in errors.\u003c/p\u003e\n"],["\u003cp\u003eUsers specify an expression, output format, and optional reprojection/clipping, band selection, and visualization options.\u003c/p\u003e\n"],["\u003cp\u003eAuthentication is required 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\u003eSuccessful responses contain the requested pixel data encoded as specified, delivered via a generic HTTP response format.\u003c/p\u003e\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/v1alpha/{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/v1alpha/Expression) }, \"fileFormat\": enum (/earth-engine/reference/rest/v1alpha/ImageFileFormat), \"grid\": { object (/earth-engine/reference/rest/v1alpha/PixelGrid) }, \"bandIds\": [ string ], \"visualizationOptions\": { object (/earth-engine/reference/rest/v1alpha/VisualizationOptions) }, \"workloadTag\": string } ``` |\n\n| Fields ||\n|------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `expression` | `object (`[Expression](/earth-engine/reference/rest/v1alpha/Expression)`)` The expression to compute. |\n| `fileFormat` | `enum (`[ImageFileFormat](/earth-engine/reference/rest/v1alpha/ImageFileFormat)`)` The output file format in which to return the pixel values. |\n| `grid` | `object (`[PixelGrid](/earth-engine/reference/rest/v1alpha/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/v1alpha/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)."]]