Announcement: All noncommercial projects registered to use Earth Engine beforeApril 15, 2025 mustverify noncommercial eligibility to maintain access. If you have not verified by September 26, 2025, your access may be on hold.

Method: projects.image.computePixels

  • ThecomputePixels method computes a tile of pixels based on an arbitrary computation on image data.

  • Requests are limited in uncompressed data size, pixel dimensions, and number of bands, with exceeding these limits resulting in a 400 BAD_REQUEST error.

  • Successful requests return the requested pixel data in the specified encoding.

  • The HTTP request uses a POST method to the specified URL with the project as a path parameter.

  • The request body contains parameters likeexpression,fileFormat, andgrid to define the computation and output.

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 thefileFormat field of the request.

HTTP request

POST https://earthengine.googleapis.com/v1alpha/{project=projects/*}/image:computePixels

The URL usesgRPC 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 isprojects/{project-id}.

Authorization requires the followingIAM permission on the specified resourceproject:

  • earthengine.computations.create

Request body

The request body contains data with the following structure:

JSON representation
{"expression":{object (Expression)},"fileFormat":enum (ImageFileFormat),"grid":{object (PixelGrid)},"bandIds":[string],"visualizationOptions":{object (VisualizationOptions)},"workloadTag":string}
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 byexpression 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 evaluatingexpression. If not present, all bands resulting fromexpression 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 theOAuth 2.0 Overview.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-03-06 UTC.