公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ee.Geometry.BBox.closestPoints
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
傳回的字典最多包含兩個項目,分別代表每個輸入幾何體上最接近另一個輸入幾何體的點。如果任一幾何圖形為空,系統會傳回空白字典。如果兩個幾何體都不受限,字典會為「左」和「右」提供任意點。如果其中一個幾何圖形不受限,則字典會針對「左」和「右」兩者,在受限的幾何圖形中包含任意點。
用量 | 傳回 |
---|
BBox.closestPoints(right, maxError, proj) | 物件 |
引數 | 類型 | 詳細資料 |
---|
這個:left | 幾何圖形 | 做為運算左運算元的幾何圖形。 |
right | 幾何圖形 | 用做運算右運算元的幾何圖形。 |
maxError | ErrorMargin,預設值:null | 執行任何必要重投影時可容許的最大誤差量。 |
proj | 投影,預設值:null | 執行作業的投影。如未指定,系統會以球面座標系統執行作業,而球面上的線性距離會以公尺為單位。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eReturns a dictionary with points on each geometry closest to the other, useful for proximity analysis.\u003c/p\u003e\n"],["\u003cp\u003eHandles various geometry types, including empty and unbounded geometries, with specific behaviors for each.\u003c/p\u003e\n"],["\u003cp\u003eAllows customization of error tolerance (\u003ccode\u003emaxError\u003c/code\u003e) and projection (\u003ccode\u003eproj\u003c/code\u003e) for accurate results.\u003c/p\u003e\n"],["\u003cp\u003eAccessible via the \u003ccode\u003eclosestPoints\u003c/code\u003e method on a BBox (bounding box) object, taking the other geometry as input.\u003c/p\u003e\n"]]],["The function determines the closest points between two geometries (`left` and `right`). It returns a dictionary with up to two entries, representing a point from each geometry. Empty geometries result in an empty dictionary. Unbounded geometries lead to arbitrary points in the output. The operation can account for a maximum error (`maxError`) and be performed under a specific projection (`proj`). The function uses `BBox.closestPoints(right, maxError, proj)`.\n"],null,["# ee.Geometry.BBox.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| BBox.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. |"]]