公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
Method: projects.assets.listFeatures
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
列出表格資產中的特徵。這個方法可讓呼叫端將時空和屬性篩選器套用至資料表。結果會以 GeoJSON 地圖項目物件清單的形式傳回。
HTTP 要求
GET https://earthengine.googleapis.com/v1beta/{asset=projects/*/assets/**}:listFeatures
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
asset |
string
必要欄位。要列出的資料表資產名稱。asset 的格式為「projects/*/assets/**」(例如「projects/earthengine-legacy/assets/users/[USER]/[ASSET]」)。所有使用者擁有的素材資源都屬於「earthengine-legacy」專案 (例如「projects/earthengine-legacy/assets/users/foo/bar」)。所有其他素材資源都屬於「earthengine-public」專案 (例如"projects/earthengine-public/assets/LANDSAT").
授權需要指定資源 asset 的下列 IAM 權限:
|
查詢參數
參數 |
pageSize |
integer
每頁的結果數量上限。伺服器傳回的素材資源可能少於要求的數量。如果未指定,則每頁的預設頁面大小為 1000 個結果。
|
pageToken |
string
這個符記可識別伺服器應傳回的結果頁面。通常,這是先前對 assets.listFeatures 方法的呼叫傳回的 ListFeaturesResponse.next_page_token 值。
|
region |
string
定義查詢區域的幾何圖形,如果有此屬性,則會以 GeoJSON 幾何圖形字串指定 (請參閱 RFC 7946)。
|
filter |
string
如果有的話,則會指定其他簡單的屬性篩選條件。
|
回應主體
EarthEngineService.ListFeatures 的回應訊息。
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"type": string,
"features": [
{
object (Feature )
}
],
"nextPageToken": string
} |
欄位 |
type |
string
一律包含常數字串「FeatureCollection」,標示為 GeoJSON FeatureCollection 物件。
|
features[] |
object (Feature )
符合查詢的地圖項目清單,以 GeoJSON 地圖項目物件清單的形式呈現 (請參閱 RFC 7946),其中包含名為「type」的欄位中的「Feature」字串、名為「geometry」的欄位中的幾何圖形,以及名為「properties」的欄位中的鍵/值屬性。
|
nextPageToken |
string
用來擷取下一頁結果的符記。在後續對 assets.listFeatures 方法的呼叫中,將這個值傳遞至 ListFeaturesRequest.page_token 欄位,即可擷取下一頁的結果。
|
授權範圍
需要下列其中一種 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。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eLists features from a specified Earth Engine table asset using the \u003ccode\u003elistFeatures\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eAllows filtering of table data by spatiotemporal and property criteria using query parameters.\u003c/p\u003e\n"],["\u003cp\u003eReturns results as a GeoJSON FeatureCollection containing a list of features and a token for pagination.\u003c/p\u003e\n"],["\u003cp\u003eRequires specific IAM permissions or OAuth scopes for authorization to access and retrieve data.\u003c/p\u003e\n"]]],[],null,["# Method: projects.assets.listFeatures\n\nLists the features in a table asset. This method allows the caller to apply spatiotemporal and property filters to a table. Results are returned as a list of GeoJSON feature objects.\n\n### HTTP request\n\n`GET https://earthengine.googleapis.com/v1beta/{asset=projects/*/assets/**}:listFeatures`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `asset` | `string` Required. The name of the table asset to list. `asset` is of the format \"projects/\\*/assets/\\*\\*\" (e.g., \"projects/earthengine-legacy/assets/users/\\[USER\\]/\\[ASSET\\]\"). All user-owned assets are under the project \"earthengine-legacy\" (e.g., \"projects/earthengine-legacy/assets/users/foo/bar\"). All other assets are under the project \"earthengine-public\" (e.g., \"projects/earthengine-public/assets/LANDSAT\"). Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `asset`: - `earthengine.assets.get` |\n\n### Query parameters\n\n| Parameters ||\n|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` The maximum number of results per page. The server may return fewer assets than requested. If unspecified, the page size default is 1000 results per page. |\n| `pageToken` | `string` A token identifying a page of results the server should return. Typically, this is the value of [ListFeaturesResponse.next_page_token](/earth-engine/reference/rest/v1beta/projects.assets/listFeatures#body.ListFeaturesResponse.FIELDS.next_page_token) returned from the previous call to the `assets.listFeatures` method. |\n| `region` | `string` If present, a geometry defining a query region, specified as a GeoJSON geometry string (see RFC 7946). |\n| `filter` | `string` If present, specifies additional simple property filters. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse message for EarthEngineService.ListFeatures.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"type\": string, \"features\": [ { object (/earth-engine/reference/rest/v1beta/Feature) } ], \"nextPageToken\": string } ``` |\n\n| Fields ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `type` | `string` Always contains the constant string \"FeatureCollection\", marking this as a GeoJSON FeatureCollection object. |\n| `features[]` | `object (`[Feature](/earth-engine/reference/rest/v1beta/Feature)`)` The list of features matching the query, as a list of GeoJSON feature objects (see RFC 7946) containing the string \"Feature\" in a field named \"type\", the geometry in a field named \"geometry\", and key/value properties in a field named \"properties\". |\n| `nextPageToken` | `string` A token to retrieve the next page of results. Pass this value in the [ListFeaturesRequest.page_token](/earth-engine/reference/rest/v1beta/projects.assets/listFeatures#body.QUERY_PARAMETERS.page_token) field in the subsequent call to the `assets.listFeatures` method to retrieve the next page of results. |\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)."]]