ee.data.computeFeatures (Python only)
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
คำนวณรายการฟีเจอร์โดยใช้การคำนวณกับฟีเจอร์
ผลลัพธ์:
รายการฟีเจอร์ GeoJSON ที่ฉายซ้ำเป็น EPSG:4326 โดยมีขอบระนาบ
การใช้งาน | การคืนสินค้า |
ee.data.computeFeatures(params) | รายการ |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
params | วัตถุ | ออบเจ็กต์ที่มีพารามิเตอร์ที่มีค่าที่เป็นไปได้ต่อไปนี้
expression - นิพจน์ที่จะคำนวณ
pageSize - จำนวนผลการค้นหาสูงสุดต่อหน้า เซิร์ฟเวอร์อาจแสดงรูปภาพน้อยกว่าที่ขอ หากไม่ได้ระบุ ขนาดหน้า
เริ่มต้นคือ 1, 000 ผลลัพธ์ต่อหน้า
fileFormat - หากมี จะระบุรูปแบบเอาต์พุตสำหรับ
ข้อมูลตาราง ฟังก์ชันจะส่งคำขอเครือข่ายสำหรับแต่ละหน้าจนกว่าจะมีการดึงข้อมูลตารางทั้งหมด จำนวนการดึงข้อมูลจะขึ้นอยู่กับ
จำนวนแถวในตารางและ pageSize
ระบบจะไม่สนใจ pageToken รูปแบบที่รองรับ ได้แก่
PANDAS_DATAFRAME สำหรับ Pandas DataFrame และ
GEOPANDAS_GEODATAFRAME สำหรับ GeoPandas GeoDataFrame
pageToken - โทเค็นที่ระบุหน้าผลลัพธ์ที่เซิร์ฟเวอร์ควร
แสดง
workloadTag - แท็กที่ผู้ใช้ระบุเพื่อติดตามการคำนวณนี้ |
ตัวอย่าง
การตั้งค่า Python
ดูข้อมูลเกี่ยวกับ Python API และการใช้ geemap
เพื่อการพัฒนาแบบอินเทอร์แอกทีฟได้ที่หน้า
สภาพแวดล้อม Python
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...
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003e\u003ccode\u003eee.data.computeFeatures\u003c/code\u003e applies a computation to features and returns a list of GeoJSON features.\u003c/p\u003e\n"],["\u003cp\u003eThe returned features are reprojected to EPSG:4326 and have planar edges.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eee.data.computeFeatures\u003c/code\u003e accepts parameters like expression, pageSize, fileFormat, pageToken, and workloadTag.\u003c/p\u003e\n"],["\u003cp\u003eExample code demonstrates using \u003ccode\u003eee.data.computeFeatures\u003c/code\u003e to extract image band values for a point location over a time series and convert an ImageCollection to a FeatureCollection.\u003c/p\u003e\n"]]],["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"],null,["# ee.data.computeFeatures (Python only)\n\n\u003cbr /\u003e\n\nComputes a list of features by applying a computation to features.\n\n\u003cbr /\u003e\n\nReturns:\nA list of GeoJSON features reprojected to EPSG:4326 with planar edges.\n\n| Usage | Returns |\n|-----------------------------------|---------|\n| `ee.data.computeFeatures(params)` | List |\n\n| Argument | Type | Details |\n|----------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `params` | Object | An object containing parameters with the following possible values: `expression` - The expression to compute. `pageSize` - The maximum number of results per page. The server may return fewer images than requested. If unspecified, the page size default is 1000 results per page. `fileFormat` - If present, specifies an output format for the tabular data. The function makes a network request for each page until the entire table has been fetched. The number of fetches depends on the number of rows in the table and `pageSize`. `pageToken` is ignored. Supported formats are: `PANDAS_DATAFRAME` for a Pandas DataFrame and `GEOPANDAS_GEODATAFRAME` for a GeoPandas GeoDataFrame. `pageToken` - A token identifying a page of results the server should return. `workloadTag` - User supplied tag to track this computation. |\n\nExamples\n--------\n\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\nfrom pprint import pprint\n\n# Region of interest.\npt = ee.Geometry.Point([-122.0679107870136, 36.983302098145906])\n# Imagery of interest.\nimages = (ee.ImageCollection('LANDSAT/LC08/C02/T1_L2')\n .filterBounds(pt).filterDate('2021-01-01', '2021-12-31'))\n\ndef point_overlay(image):\n \"\"\"Extracts image band values for pixel-point intersection.\"\"\"\n return ee.Feature(pt, image.reduceRegion('first', pt, 30))\n\n# Convert an ImageCollection to a FeatureCollection.\nfeatures = images.map(point_overlay)\n\nfeatures_dict = ee.data.computeFeatures({'expression': features})\n\npprint(features_dict)\n# Do something with the features...\n```"]]