Method: projects.locations.tables.create
创建一个可用于呈现“表格”数据的 ID。
此属性与 GetTableFeatures
结合使用。调用 tables.create
会提供一个表达式和一些输出选项。tables.create
的结果是一个 ID,表示表格,该表格是评估该表达式并应用这些选项的结果。随后,可以调用 GetTableFeatures
来获取整个生成表的表数据。该 ID 的有效期为中等时间(几小时)。
这对端点的最常见用例是通过 POST 向 tables.create
提供复杂表达式,然后通过 GET 向 GetTableFeatures
提取计算表。与 ComputeFeatures
相比,这种两步流程可在更多情况下使用。具体而言:- ComputeFeatures
的结果需要分页才能获取所有地图项。此外,系统只会返回单个 Feature
。- ComputeFeatures
只能由已获授权的用户使用适当范围的 OAuth 令牌调用。tables.create
也存在相同的限制,但可以使用包含 API 密钥的网址调用 GetTableData
,因此调用它的网址可以更广泛地使用。
HTTP 请求
POST https://earthengine.googleapis.com/v1alpha/{parent=projects/*/locations/*}/tables
网址采用 gRPC 转码语法。
路径参数
参数 |
parent |
string
必需。将在其中创建表的位置的父级(例如,“projects/*”)。
|
查询参数
参数 |
workloadTag |
string
用户提供的用于跟踪此计算的代码。
|
响应正文
如果成功,响应正文将包含一个新创建的 Table
实例。
授权范围
需要以下 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。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-06。
[null,null,["最后更新时间 (UTC):2025-03-06。"],[[["`tables.create` generates a temporary ID representing a table derived from a provided expression and output options."],["This ID can be used with `GetTableFeatures` to retrieve the entire table data, facilitating complex data fetching."],["This two-step process offers advantages over `ComputeFeatures`, such as bypassing pagination and broader access via API keys."],["Authorization is required for `tables.create`, using OAuth scopes like `https://www.googleapis.com/auth/earthengine` or similar."],["The API endpoint for this functionality is `POST https://earthengine.googleapis.com/v1alpha/{parent=projects/*/locations/*}/tables`."]]],["`tables.create` generates an ID representing a table from an expression and output options. This ID, valid for a few hours, is used with `GetTableFeatures` to retrieve the entire table data. `tables.create` and `GetTableFeatures` allow for complex expressions and broader access through API keys, unlike `ComputeFeatures` that is limited to OAuth tokens and requires pagination to fetch the features entirely. The POST request to `tables.create` contains an instance of a Table, and upon success, the response returns a new Table instance.\n"]]