Method: projects.assets.listFeatures

列出表格資產中的特徵。這個方法可讓呼叫端將時空和屬性篩選器套用至資料表。結果會以 GeoJSON 地圖項目物件清單的形式傳回。

HTTP 要求

GET https://earthengine.googleapis.com/v1alpha/{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 權限:

  • earthengine.assets.get

查詢參數

參數
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