Method: projects.value.compute
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
חישוב ערך שרירותי. הפונקציה תיכשל אם התוצאה של הביטוי לא ניתנת לביטוי כערך, או אם ההערכה שלה דורשת יותר מדי משאבים. אפשר (ולא מדובר בשגיאה) לחשב כאן כל סוג של אובייקט, אבל באופן כללי, בכל Expression שמניב תוצאות שמתאימות יותר לאחד מנקודות הקצה האחרות של Compute* צריך להשתמש בנקודת הקצה הזו במקום זאת (למשל, ב-Expression שהתוצאה שלו היא קבוצת תכונות צריך להשתמש ב-ComputeFeatures).
בקשת HTTP
POST https://earthengine.googleapis.com/v1/{project=projects/*}/value:compute
כתובת ה-URL משתמשת בתחביר של Transcoding של gRPC.
פרמטרים של נתיב
פרמטרים |
project |
string
מזהה הפרויקט או מספר הפרויקט ב-Google Cloud Platform שצריך להתייחס אליו כצרכן השירות של הבקשה הזו. הפורמט הוא projects/{project-id} .
כדי לקבל הרשאה, נדרשת ההרשאה הבאה ב-IAM למשאב שצוין project :
earthengine.computations.create
|
גוף הבקשה
גוף הבקשה מכיל נתונים במבנה הבא:
ייצוג ב-JSON |
{
"expression": {
object (Expression )
},
"workloadTag": string
} |
שדות |
expression |
object (Expression )
הביטוי לחישוב.
|
workloadTag |
string
תג שהמשתמש סיפק כדי לעקוב אחרי החישוב הזה.
|
גוף התשובה
התוצאות של חישוב שרירותי.
אם הפעולה מצליחה, גוף התגובה מכיל נתונים במבנה הבא:
ייצוג ב-JSON |
{
"result": value
} |
שדות |
result |
value (Value format)
התוצאות של חישוב הערך של הביטוי.
|
היקפי הרשאה
נדרש אחד מהיקפי ההרשאות הבאים של 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.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[[["\u003cp\u003eComputes the value of an arbitrary Earth Engine expression, returning the result as a JSON \u003ccode\u003eValue\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eRecommended for expressions whose results are not better suited to other specialized endpoints like \u003ccode\u003eComputeFeatures\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eRequires specifying the expression to compute and an optional workload tag for tracking.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes the \u003ccode\u003ePOST\u003c/code\u003e method and requires specific authorization scopes for access.\u003c/p\u003e\n"],["\u003cp\u003eReturns the computed value within a \u003ccode\u003eresult\u003c/code\u003e field in the response body.\u003c/p\u003e\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/v1/{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/v1/Expression) }, \"workloadTag\": string } ``` |\n\n| Fields ||\n|---------------|--------------------------------------------------------------------------------------------------|\n| `expression` | `object (`[Expression](/earth-engine/reference/rest/v1/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)."]]