ee.Geometry.Rectangle.closestPoints
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Zwraca słownik zawierający maksymalnie 2 wpisy reprezentujące punkt na każdej geometrii wejściowej, który jest najbliżej drugiej geometrii wejściowej. Jeśli którykolwiek z tych obiektów geometrycznych jest pusty, zwracany jest pusty słownik. Jeśli obie geometrie są nieograniczone, słownik zawiera dowolny punkt dla obu wartości „left” i „right”. Jeśli jedna z geometrii jest nieograniczona, słownik zawiera dowolny punkt zawarty w ograniczonej geometrii zarówno w przypadku „left”, jak i „right”.
Wykorzystanie | Zwroty |
---|
Rectangle.closestPoints(right, maxError, proj) | Obiekt |
Argument | Typ | Szczegóły |
---|
to: left | Geometria | Geometria używana jako lewy operand operacji. |
right | Geometria | Geometria używana jako prawy operand operacji. |
maxError | ErrorMargin, domyślnie: null | Maksymalna dopuszczalna wartość błędu podczas wykonywania niezbędnej reprojekcji. |
proj | Prognoza, domyślnie: null | Projekcja, w której ma zostać wykonana operacja. Jeśli nie zostanie podana, operacja zostanie wykonana w sferycznym układzie współrzędnych, a odległości liniowe będą podawane w metrach na sferze. |
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\u003eReturns a dictionary representing the closest points between two geometries, containing entries for 'left' and 'right'.\u003c/p\u003e\n"],["\u003cp\u003eIf either input geometry is empty, an empty dictionary is returned.\u003c/p\u003e\n"],["\u003cp\u003eFor unbounded geometries, arbitrary points may be returned for 'left' and 'right'.\u003c/p\u003e\n"],["\u003cp\u003eAccepts optional \u003ccode\u003emaxError\u003c/code\u003e and \u003ccode\u003eproj\u003c/code\u003e arguments to control reprojection and coordinate system.\u003c/p\u003e\n"]]],["The function `closestPoints` identifies the nearest points between two geometries (`left` and `right`), returning them in a dictionary. The dictionary can have up to two point entries. An empty dictionary signifies empty input geometries. For unbounded geometries, arbitrary points are returned. The operation allows specification of `maxError` and `proj` for accuracy control, defaulting to spherical coordinates if `proj` is null.\n"],null,["# ee.Geometry.Rectangle.closestPoints\n\nReturns a dictionary containing up to two entries representing a point on each input geometry that is closest to the other input geometry. If either geometry is empty, an empty dictionary is returned. If both geometries are unbounded, the dictionary has an arbitrary point for both 'left' and 'right'. If one geometry is unbounded, the dictionary has an arbitrary point contained in the bounded geometry for both 'left' and 'right'.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------------------------------------------|---------|\n| Rectangle.closestPoints`(right, `*maxError* `, `*proj*`)` | Object |\n\n| Argument | Type | Details |\n|--------------|----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `left` | Geometry | The geometry used as the left operand of the operation. |\n| `right` | Geometry | The geometry used as the right operand of the operation. |\n| `maxError` | ErrorMargin, default: null | The maximum amount of error tolerated when performing any necessary reprojection. |\n| `proj` | Projection, default: null | The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere. |"]]