Earth Engine ได้เปิดตัว
ระดับโควต้าที่ไม่ใช่เชิงพาณิชย์เพื่อปกป้องทรัพยากรการประมวลผลที่ใช้ร่วมกันและรับประกันประสิทธิภาพที่เชื่อถือได้สำหรับทุกคน โปรเจ็กต์ที่ไม่ใช่เชิงพาณิชย์จะใช้ระดับชุมชนโดยค่าเริ่มต้น แต่คุณสามารถเปลี่ยนระดับของโปรเจ็กต์ได้ทุกเมื่อ
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
ee.FeatureCollection.filter
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ใช้ตัวกรองกับคอลเล็กชันนี้
แสดงผลคอลเล็กชันที่กรองแล้ว
| การใช้งาน | การคืนสินค้า |
|---|
FeatureCollection.filter(filter) | คอลเล็กชัน |
| อาร์กิวเมนต์ | ประเภท | รายละเอียด |
|---|
ดังนี้ collection | คอลเล็กชัน | อินสแตนซ์คอลเล็กชัน |
filter | ตัวกรอง | ตัวกรองที่จะใช้กับคอลเล็กชันนี้ |
ตัวอย่าง
โปรแกรมแก้ไขโค้ด (JavaScript)
// Load a collection of counties.
var counties = ee.FeatureCollection('FAO/GAUL_SIMPLIFIED_500m/2015/level2');
// Filter the collection to get Denver county.
var denverCollection = counties.filter(ee.Filter.eq('ADM2_NAME', 'Denver'));
// Or you can use a string filter (equivalent to the above):
// var denverCollection = counties.filter("ADM2_NAME == 'Denver'");
Map.centerObject(denverCollection, 9);
Map.addLayer(denverCollection, null, 'Denver');
การตั้งค่า Python
ดูข้อมูลเกี่ยวกับ Python API และการใช้ geemap เพื่อการพัฒนาแบบอินเทอร์แอกทีฟได้ที่หน้า
สภาพแวดล้อม Python
import ee
import geemap.core as geemap
Colab (Python)
# Load a collection of counties.
counties = ee.FeatureCollection('FAO/GAUL_SIMPLIFIED_500m/2015/level2')
# Filter the collection to get Denver county.
denver_collection = counties.filter(ee.Filter.eq('ADM2_NAME', 'Denver'))
# Or you can use a string filter (equivalent to the above):
# denver_collection = counties.filter("ADM2_NAME == 'Denver'")
m = geemap.Map()
m.center_object(denver_collection, 9)
m.add_layer(denver_collection, None, 'Denver')
m
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2026-06-17 UTC
[null,null,["อัปเดตล่าสุด 2026-06-17 UTC"],[],["The content details how to apply a filter to a `FeatureCollection`, which returns a filtered collection. The `filter` argument, of type `Filter`, is applied to the `Collection` instance. Examples in JavaScript and Python demonstrate filtering a collection to find the 'Denver' county polygon using `.filter()`. This filtering can be done directly using the parameter name and value or using `ee.Filter.eq()` and is applied to the \"ADM2_NAME\" parameter.\n"]]