公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ee.Geometry.LinearRing
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
建構描述 LinearRing 的 ee.Geometry。如果最後一個點不等於第一個點,系統會在結尾新增第一個點的副本。
為方便起見,如果所有引數都是數字,可以使用 varargs。這樣一來,只要提供偶數個引數,就能建立測地線 EPSG:4326 LinearRing,例如 ee.Geometry.LinearRing(aLng, aLat, bLng, bLat, ..., aLng, aLat)。
用量 | 傳回 |
---|
ee.Geometry.LinearRing(coords, proj, geodesic, maxError) | Geometry.LinearRing |
引數 | 類型 | 詳細資料 |
---|
coords | List<Geometry>|List<List<Number>>|List<Number> | 環狀區域中的點清單。可以是 GeoJSON「LinearRing」格式的座標清單、至少三個描述點的 ee.Geometry 物件清單,或是至少六個定義至少三個點 [x,y] 座標的數字清單。 |
proj | 投影 (選用) | 這個幾何圖形的投影。如未指定,則預設為輸入 ee.Geometry 的投影,如果沒有 ee.Geometry 輸入,則為 EPSG:4326。 |
geodesic | 布林值 (選填) | 如果為 false,投影畫面中的邊緣會是直線。如果是 true,邊緣會彎曲,以遵循地球表面的最短路徑。預設值為輸入內容的測地線狀態,如果輸入內容為數字,則為 true。 |
maxError | ErrorMargin (選用) | 輸入幾何圖形必須重新投影至明確要求的結果投影或測地狀態時,可能發生的最大誤差。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eDefines a closed ring on the Earth's surface, ensuring the last point connects back to the first.\u003c/p\u003e\n"],["\u003cp\u003eAllows simplified creation of geodesic (EPSG:4326) rings using a series of longitude and latitude values.\u003c/p\u003e\n"],["\u003cp\u003eAccepts various input formats for ring coordinates, including GeoJSON, ee.Geometry objects, or raw numerical coordinates.\u003c/p\u003e\n"],["\u003cp\u003eProjection and geodesic behavior can be customized; defaults to input projection or EPSG:4326 with geodesic edges if unspecified.\u003c/p\u003e\n"],["\u003cp\u003eIncludes an optional parameter to control error during reprojection for precise geometry handling.\u003c/p\u003e\n"]]],["This code constructs a `LinearRing` geometry. It takes a list of coordinates (`coords`), an optional projection (`proj`), an optional geodesic setting, and an optional maximum error (`maxError`). If the last point in `coords` isn't the same as the first, it adds a duplicate. Varargs can be used with numbers, creating geodesic EPSG:4326 LinearRings. `coords` can be a list of coordinates, point geometries, or numbers. `geodesic` determines if edges are straight or curved.\n"],null,["# ee.Geometry.LinearRing\n\n\u003cbr /\u003e\n\nConstructs an ee.Geometry describing a LinearRing. If the last point is not equal to the first, a duplicate of the first point will be added at the end.\n\n\u003cbr /\u003e\n\nFor convenience, varargs may be used when all arguments are numbers. This allows creating geodesic EPSG:4326 LinearRings given an even number of arguments, e.g. ee.Geometry.LinearRing(aLng, aLat, bLng, bLat, ..., aLng, aLat).\n\n| Usage | Returns |\n|--------------------------------------------------------------------------|---------------------|\n| `ee.Geometry.LinearRing(coords, `*proj* `, `*geodesic* `, `*maxError*`)` | Geometry.LinearRing |\n\n| Argument | Type | Details |\n|------------|----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `coords` | List\\\u003cGeometry\\\u003e\\|List\\\u003cList\\\u003cNumber\\\u003e\\\u003e\\|List\\\u003cNumber\\\u003e | A list of points in the ring. May be a list of coordinates in the GeoJSON 'LinearRing' format, a list of at least three ee.Geometry objects describing a point, or a list of at least six numbers defining the \\[x,y\\] coordinates of at least three points. |\n| `proj` | Projection, optional | The projection of this geometry. If unspecified, the default is the projection of the input ee.Geometry, or EPSG:4326 if there are no ee.Geometry inputs. |\n| `geodesic` | Boolean, optional | If false, edges are straight in the projection. If true, edges are curved to follow the shortest path on the surface of the Earth. The default is the geodesic state of the inputs, or true if the inputs are numbers. |\n| `maxError` | ErrorMargin, optional | Max error when input geometry must be reprojected to an explicitly requested result projection or geodesic state. |"]]