ee.ImageCollection.reduce
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ใช้ตัวลดขนาดกับรูปภาพทั้งหมดในคอลเล็กชัน
หากตัวลดมีอินพุตเดียว ระบบจะใช้ตัวลดแยกกันกับแต่ละแบนด์ของคอลเล็กชัน มิฉะนั้นตัวลดต้องมีจำนวนอินพุตเท่ากับจำนวนแบนด์ของคอลเล็กชัน
ชื่อเอาต์พุตของตัวลดจะกำหนดชื่อของแถบเอาต์พุต โดยตัวลดที่มีอินพุตหลายรายการจะใช้ชื่อเอาต์พุตโดยตรง ส่วนตัวลดที่มีอินพุตรายการเดียวจะนำหน้าชื่อเอาต์พุตด้วยชื่อแถบอินพุต (เช่น "10_mean", "20_mean")
การใช้งาน | การคืนสินค้า |
---|
ImageCollection.reduce(reducer, parallelScale) | รูปภาพ |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
ดังนี้ collection | ImageCollection | คอลเล็กชันรูปภาพที่จะลด |
reducer | ตัวลดตำแหน่ง | ตัวลดที่จะใช้กับคอลเล็กชันที่ระบุ |
parallelScale | Float, ค่าเริ่มต้น: 1 | ปัจจัยการปรับขนาดที่ใช้เพื่อจำกัดการใช้หน่วยความจำ การใช้ parallelScale ที่ใหญ่ขึ้น (เช่น 2 หรือ 4) อาจเปิดใช้การคำนวณที่หน่วยความจำหมดด้วยค่าเริ่มต้น |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[null,null,["อัปเดตล่าสุด 2025-07-27 UTC"],[[["\u003cp\u003eApplies a reducer function across all images within an ImageCollection, resulting in a single output Image.\u003c/p\u003e\n"],["\u003cp\u003eReducers can operate on individual bands or multiple bands simultaneously, determining the output band names accordingly.\u003c/p\u003e\n"],["\u003cp\u003eUtilizes a parallelScale factor to manage memory consumption during computation.\u003c/p\u003e\n"],["\u003cp\u003eAccess this functionality via the \u003ccode\u003eImageCollection.reduce()\u003c/code\u003e method, providing the reducer and optional parallelScale as parameters.\u003c/p\u003e\n"]]],[],null,["# ee.ImageCollection.reduce\n\nApplies a reducer across all of the images in a collection.\n\n\u003cbr /\u003e\n\nIf the reducer has a single input, it will be applied separately to each band of the collection; otherwise it must have the same number of inputs as the collection has bands.\n\nThe reducer output names determine the names of the output bands: reducers with multiple inputs will use the output names directly, while reducers with a single input will prefix the output name with the input band name (e.g., '10_mean', '20_mean').\n\n| Usage | Returns |\n|------------------------------------------------------|---------|\n| ImageCollection.reduce`(reducer, `*parallelScale*`)` | Image |\n\n| Argument | Type | Details |\n|--------------------|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `collection` | ImageCollection | The image collection to reduce. |\n| `reducer` | Reducer | The reducer to apply to the given collection. |\n| `parallelScale` | Float, default: 1 | A scaling factor used to limit memory use; using a larger parallelScale (e.g., 2 or 4) may enable computations that run out of memory with the default. |"]]