Anuncio: Todos los proyectos no comerciales registrados para usar Earth Engine antes del
15 de abril de 2025 deben
verificar su elegibilidad no comercial para mantener el acceso a Earth Engine.
Method: projects.value.compute
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Calcula un valor arbitrario. Esto fallará si el resultado de la expresión no es algo que se pueda expresar como un valor o si su evaluación requiere demasiados recursos. Si bien es posible (y no es un error) calcular cualquier tipo de objeto aquí, en general, cualquier expresión que produzca resultados que se adapten mejor a uno de los otros extremos de Compute* debe usar ese extremo (p.ej., una expresión cuyo resultado es un conjunto de atributos debe usar ComputeFeatures).
Solicitud HTTP
POST https://earthengine.googleapis.com/v1alpha/{project=projects/*}/value:compute
La URL usa la sintaxis de la transcodificación gRPC.
Parámetros de ruta de acceso
Parámetros |
project |
string
El ID o el número de proyecto de Google Cloud Platform que se debe considerar como el consumidor de servicios para esta solicitud. El formato es projects/{project-id} .
La autorización requiere el siguiente permiso IAM en el recurso especificado project :
earthengine.computations.create
|
Cuerpo de la solicitud
El cuerpo de la solicitud contiene datos con la siguiente estructura:
Representación JSON |
{
"expression": {
object (Expression )
},
"workloadTag": string
} |
Campos |
expression |
object (Expression )
La expresión que se debe calcular.
|
workloadTag |
string
Es la etiqueta que proporcionó el usuario para hacer un seguimiento de este cálculo.
|
Cuerpo de la respuesta
Los resultados de un cálculo arbitrario.
Si se ejecuta correctamente, el cuerpo de la respuesta contendrá datos con la siguiente estructura:
Representación JSON |
{
"result": value
} |
Campos |
result |
value (Value format)
Los resultados de calcular el valor de la expresión.
|
Permisos de autorización
Se necesita uno de los siguientes permisos de 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
Para obtener más información, consulta OAuth 2.0 Overview.
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-07-25 (UTC)
[null,null,["Última actualización: 2025-07-25 (UTC)"],[[["\u003cp\u003eComputes an arbitrary value based on a provided expression using the Earth Engine API.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes the \u003ccode\u003ePOST\u003c/code\u003e method and requires specifying the project ID in the URL.\u003c/p\u003e\n"],["\u003cp\u003eRequest body includes the expression to compute and an optional workload tag for tracking.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful responses contain the computed value in a structured format.\u003c/p\u003e\n"],["\u003cp\u003eRequires specific OAuth scopes for authorization, like \u003ccode\u003ehttps://www.googleapis.com/auth/earthengine\u003c/code\u003e.\u003c/p\u003e\n"]]],["The `compute` endpoint evaluates an arbitrary expression, returning its result as a `Value`. A POST request is made to `https://earthengine.googleapis.com/v1alpha/{project=projects/*}/value:compute`, requiring `earthengine.computations.create` IAM permission. The request body contains the `expression` to compute and an optional `workloadTag`. The response returns the `result` of the computation in `Value` format, and requires one of the provided OAuth scopes for authorization. Other `Compute*` endpoints should be used if they are better suited for the task.\n"],null,["# Method: projects.value.compute\n\nComputes an arbitrary value. This will fail if the result of the Expression is not something that is expressible as a Value, or if its evaluation requires too many resources. While it is possible (and not an error) to compute any type of object here, in general any Expression producing results that are better suited to one of the other Compute\\* endpoints should use that endpoint instead (e.g., an Expression whose result is a set of features should use ComputeFeatures).\n\n### HTTP request\n\n`POST https://earthengine.googleapis.com/v1alpha/{project=projects/*}/value:compute`\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) }, \"workloadTag\": string } ``` |\n\n| Fields ||\n|---------------|-------------------------------------------------------------------------------------------------------|\n| `expression` | `object (`[Expression](/earth-engine/reference/rest/v1alpha/Expression)`)` The expression to compute. |\n| `workloadTag` | `string` User supplied tag to track this computation. |\n\n### Response body\n\nThe results of an arbitrary computation.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------|\n| ``` { \"result\": value } ``` |\n\n| Fields ||\n|----------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| `result` | `value (`[Value](https://protobuf.dev/reference/protobuf/google.protobuf/#value)` format)` The results of computing the value of the expression. |\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)."]]