ee.Join.saveBest
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Zwraca złączenie, które łączy każdy element z pierwszej kolekcji z pasującym elementem z drugiej kolekcji. Do każdego wyniku dodawane jest dopasowanie z najlepszym wskaźnikiem łączenia jako dodatkowa właściwość. Połączenia są tworzone, gdy jako warunek połączenia używane są filtry withinDistance lub maxDifference.
Wykorzystanie | Zwroty |
---|
ee.Join.saveBest(matchKey, measureKey, outer) | Dołącz |
Argument | Typ | Szczegóły |
---|
matchKey | Ciąg znaków | Klucz używany do zapisywania dopasowania. |
measureKey | Ciąg znaków | Klucz używany do zapisywania miary warunku złączenia w przypadku dopasowania. |
outer | Wartość logiczna, domyślnie: false | Jeśli wartość to „true”, w wyniku zostaną uwzględnione wiersze podstawowe bez dopasowań. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 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. |"]]