公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取。如未在 2025 年 9 月 26 日前完成驗證,存取權可能會暫停。
ee.data.computeFeatures (Python only)
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
對特徵套用計算,藉此計算特徵清單。
傳回:
重新投影至 EPSG:4326 的 GeoJSON 功能清單,並附上平面邊緣。
| 用量 | 傳回 |
ee.data.computeFeatures(params) | 清單 |
| 引數 | 類型 | 詳細資料 |
params | 物件 | 物件,內含下列可能值的參數:
expression - 要計算的運算式。
pageSize:每頁的結果數上限。伺服器傳回的圖片數量可能會少於要求數量。如未指定,預設頁面大小為每頁 1000 個結果。
fileFormat - 如果存在,指定表格資料的輸出格式。函式會為每個網頁發出網路要求,直到擷取整個表格為止。擷取次數取決於資料表中的資料列數和 pageSize。系統會忽略 pageToken。支援的格式包括:
PANDAS_DATAFRAME (適用於 Pandas DataFrame) 和
GEOPANDAS_GEODATAFRAME (適用於 GeoPandas GeoDataFrame)。
pageToken:伺服器應傳回的結果頁面識別碼。
workloadTag - User supplied tag to track this computation. |
範例
Python 設定
請參閱
Python 環境頁面,瞭解 Python API 和如何使用 geemap 進行互動式開發。
import ee
import geemap.core as geemap
Colab (Python)
from pprint import pprint
# Region of interest.
pt = ee.Geometry.Point([-122.0679107870136, 36.983302098145906])
# Imagery of interest.
images = (ee.ImageCollection('LANDSAT/LC08/C02/T1_L2')
.filterBounds(pt).filterDate('2021-01-01', '2021-12-31'))
def point_overlay(image):
"""Extracts image band values for pixel-point intersection."""
return ee.Feature(pt, image.reduceRegion('first', pt, 30))
# Convert an ImageCollection to a FeatureCollection.
features = images.map(point_overlay)
features_dict = ee.data.computeFeatures({'expression': features})
pprint(features_dict)
# Do something with the features...
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-10-25 (世界標準時間)。
[null,null,["上次更新時間:2025-10-25 (世界標準時間)。"],[],["The `ee.data.computeFeatures` function computes and returns a list of GeoJSON features, reprojected to EPSG:4326. It applies a user-defined computation (specified in the `expression` parameter) to features. Key parameters include `pageSize` for controlling results per page, `fileFormat` for specifying tabular output formats like Pandas or GeoPandas DataFrames, `pageToken` for paginated results, and `workloadTag` for computation tracking. The provided example demonstrates extracting band values from an `ImageCollection` using a point's intersection.\n"]]