AI-generated Key Takeaways
-
The
computePixelsmethod computes a tile of pixels by performing an arbitrary computation on image data. -
Requests are limited to 48MB in uncompressed data, 32K pixels in either dimension, and 1024 bands; exceeding these limits results in a 400 error.
-
A successful request returns the requested pixel data in the specified encoding in the response body.
-
The HTTP request uses a POST method to the specified endpoint with required path parameters and a request body containing computation details.
-
The request body includes fields such as
expression,fileFormat, and optional parameters for grid specification, band selection, visualization, and a workload tag.
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/v1beta/{project=projects/*}/image:computePixels
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
project |
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 Authorization requires the following IAM permission on the specified resource
|
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "expression": { object ( |
| Fields | |
|---|---|
expression |
The expression to compute. |
fileFormat |
The output file format in which to return the pixel values. |
grid |
Parameters describing how the image computed by |
bandIds[] |
If present, specifies a specific set of bands that will be selected from the result of evaluating |
visualizationOptions |
If present, a set of visualization options to apply to produce an 8-bit RGB visualization of the data. |
workloadTag |
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/earthenginehttps://www.googleapis.com/auth/earthengine.readonlyhttps://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/cloud-platform.read-only
For more information, see the OAuth 2.0 Overview.