要仅为集合中的每个元素保存最佳匹配,请使用 ee.Join.saveBest()
. 在saveBest()
以同等方式的连接功能的saveAll()
加入,除了在每个元素 primary
集合,它保存从元素secondary
与最佳匹配的集合。主集合中不匹配的元素将被删除。假设目的是找到时间上最接近primary
集合中每个 Landsat 图像的气象图像。要执行此连接, ee.Filter
必须为单个连接条件重新定义(组合过滤器将无法使用,saveBest()
因为如何组合来自多个子过滤器的排名是不明确的):
函数:
ee.Join.saveBest(matchKey, measureKey, outer)
返回将第一个集合中的每个元素与第二个集合中的匹配元素配对的连接。与最佳连接度量的匹配作为附加属性添加到每个结果中。当使用 insideDistance 或 maxDifference 过滤器作为连接条件时,会生成连接度量。
Returns 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 withinDistanc