ee.Join.saveBest
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แสดงผลการรวมที่จับคู่แต่ละองค์ประกอบจากคอลเล็กชันแรกกับองค์ประกอบที่ตรงกันจากคอลเล็กชันที่สอง ระบบจะเพิ่มการจับคู่ที่มีการวัดการเข้าร่วมที่ดีที่สุดลงในผลลัพธ์แต่ละรายการเป็นพร็อพเพอร์ตี้เพิ่มเติม ระบบจะสร้างการรวมการวัดเมื่อใช้ตัวกรอง withinDistance หรือ maxDifference เป็นเงื่อนไขการรวม
การใช้งาน | การคืนสินค้า |
---|
ee.Join.saveBest(matchKey, measureKey, outer) | เข้าร่วม |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
matchKey | สตริง | คีย์ที่ใช้บันทึกการจับคู่ |
measureKey | สตริง | คีย์ที่ใช้เพื่อบันทึกการวัดผลของเงื่อนไขการรวมในการจับคู่ |
outer | บูลีน ค่าเริ่มต้น: false | หากเป็นจริง แถวหลักที่ไม่มีรายการที่ตรงกันจะรวมอยู่ในผลลัพธ์ |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eThe \u003ccode\u003esaveBest\u003c/code\u003e join pairs elements from two collections based on the best match according to a specified measure.\u003c/p\u003e\n"],["\u003cp\u003eA join measure, like distance or difference, is calculated when using \u003ccode\u003ewithinDistance\u003c/code\u003e or \u003ccode\u003emaxDifference\u003c/code\u003e filters in the join condition.\u003c/p\u003e\n"],["\u003cp\u003eThe best match and its corresponding measure are added as properties to the result using specified keys (\u003ccode\u003ematchKey\u003c/code\u003e, \u003ccode\u003emeasureKey\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eOptionally, unmatched primary elements can be included in the output by setting the \u003ccode\u003eouter\u003c/code\u003e parameter to \u003ccode\u003etrue\u003c/code\u003e.\u003c/p\u003e\n"]]],["This describes a join operation that pairs elements from two collections. It identifies the best match between elements based on filters like `withinDistance` or `maxDifference`, storing this match in a specified `matchKey`. The quality of the match is stored under `measureKey`. The `outer` argument determines if unmatched elements from the first collection are included in the output. The function, `ee.Join.saveBest`, returns a join object.\n"],null,["# ee.Join.saveBest\n\nReturns a join that pairs each element from the first collection with a matching element from the second collection. The match with the best join measure is added to each result as an additional property. Join measures are produced when withinDistance or maxDifference filters are used as the join condition.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------------------------------------|---------|\n| `ee.Join.saveBest(matchKey, measureKey, `*outer*`)` | Join |\n\n| Argument | Type | Details |\n|--------------|-------------------------|-----------------------------------------------------------------------|\n| `matchKey` | String | The key used to save the match. |\n| `measureKey` | String | The key used to save the measure of the join condition on the match. |\n| `outer` | Boolean, default: false | If true, primary rows without matches will be included in the result. |"]]