ee.ImageCollection.map
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แมปอัลกอริทึมกับคอลเล็กชัน
แสดงผลคอลเล็กชันที่แมป
การใช้งาน | การคืนสินค้า |
---|
ImageCollection.map(algorithm, dropNulls) | คอลเล็กชัน |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
ดังนี้ collection | คอลเล็กชัน | อินสแตนซ์คอลเล็กชัน |
algorithm | ฟังก์ชัน | การดำเนินการเพื่อแมปรูปภาพหรือฟีเจอร์ของคอลเล็กชัน ฟังก์ชัน JavaScript ที่รับรูปภาพหรือฟีเจอร์และแสดงผลรูปภาพหรือฟีเจอร์ ระบบจะเรียกใช้ฟังก์ชันเพียงครั้งเดียวและบันทึกผลลัพธ์เป็นคำอธิบาย จึงไม่สามารถดำเนินการที่จำเป็นหรืออาศัยสถานะภายนอกได้ |
dropNulls | บูลีน ไม่บังคับ | หากเป็นจริง อัลกอริทึมที่แมปจะได้รับอนุญาตให้แสดงผลค่า Null และระบบจะทิ้งองค์ประกอบที่อัลกอริทึมแสดงผลค่า Null |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eApplies a user-defined function (algorithm) to each element within an ImageCollection.\u003c/p\u003e\n"],["\u003cp\u003eReturns a new collection containing the results of applying the algorithm to each element.\u003c/p\u003e\n"],["\u003cp\u003eOptionally allows for removing elements where the algorithm returns null values using the \u003ccode\u003edropNulls\u003c/code\u003e parameter.\u003c/p\u003e\n"]]],[],null,["# ee.ImageCollection.map\n\n\u003cbr /\u003e\n\nMaps an algorithm over a collection.\n\n\u003cbr /\u003e\n\nReturns the mapped collection.\n\n| Usage | Returns |\n|-------------------------------------------------|------------|\n| ImageCollection.map`(algorithm, `*dropNulls*`)` | Collection |\n\n| Argument | Type | Details |\n|--------------------|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `collection` | Collection | The Collection instance. |\n| `algorithm` | Function | The operation to map over the images or features of the collection. A JavaScript function that receives an image or features and returns one. The function is called only once and the result is captured as a description, so it cannot perform imperative operations or rely on external state. |\n| `dropNulls` | Boolean, optional | If true, the mapped algorithm is allowed to return nulls, and the elements for which it returns nulls will be dropped. |"]]