公告:凡是在
2025 年 4 月 15 日前註冊使用 Earth Engine 的非商業專案,都必須
驗證非商業用途資格,才能繼續存取 Earth Engine。
ee.Geometry.MultiPolygon
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
建構描述 MultiPolygon 的 ee.Geometry。
為方便起見,如果所有引數都是數字,可以使用 varargs。這樣一來,只要提供偶數個引數 (例如 ee.Geometry.MultiPolygon(aLng, aLat, bLng, bLat, ..., aLng, aLat)),就能以單一 Polygon 建立具有單一 LinearRing 的測地線 EPSG:4326 MultiPolygon。
用量 | 傳回 |
---|
ee.Geometry.MultiPolygon(coords, proj, geodesic, maxError, evenOdd) | Geometry.MultiPolygon |
引數 | 類型 | 詳細資料 |
---|
coords | List<Geometry>|List<List<List<List<Number>>>>|List<Number> | 多邊形清單。可以是 GeoJSON「MultiPolygon」格式的座標清單、描述多邊形的 ee.Geometry 物件清單,或是定義單一多邊形邊界的數字清單。 |
proj | 投影 (選用) | 這個幾何圖形的投影。預設值為輸入內容的投影,其中數字假設為 EPSG:4326。 |
geodesic | 布林值 (選填) | 如果為 false,投影畫面中的邊緣會是直線。如果是 true,邊緣會彎曲,以遵循地球表面的最短路徑。預設值為輸入內容的測地線狀態,如果輸入內容為數字,則為 true。 |
maxError | ErrorMargin (選用) | 輸入幾何圖形必須重新投影至明確要求的結果投影或測地狀態時,可能發生的最大誤差。 |
evenOdd | 布林值 (選填) | 如果為 true,多邊形內部會依據偶數/奇數規則判斷,也就是說,如果某個點要抵達無限遠的點,必須穿過奇數個邊緣,該點就會位於多邊形內部。否則,多邊形會使用左側內部規則,也就是沿著頂點以指定順序移動時,內部位於外殼邊緣的左側。如未指定,則預設為 true。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eDefines a MultiPolygon geometry in Earth Engine, accepting GeoJSON-like coordinates, \u003ccode\u003eee.Geometry.Polygon\u003c/code\u003e objects, or even numbers for a single polygon.\u003c/p\u003e\n"],["\u003cp\u003eOffers flexibility in specifying projection (\u003ccode\u003eproj\u003c/code\u003e), geodesic behavior (\u003ccode\u003egeodesic\u003c/code\u003e), error margin (\u003ccode\u003emaxError\u003c/code\u003e), and polygon interior calculation (\u003ccode\u003eevenOdd\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eSimplifies creating single, geodesic EPSG:4326 MultiPolygons using a series of number coordinates representing a single LinearRing within a single Polygon.\u003c/p\u003e\n"]]],[],null,["# ee.Geometry.MultiPolygon\n\n\u003cbr /\u003e\n\nConstructs an ee.Geometry describing a MultiPolygon.\n\n\u003cbr /\u003e\n\nFor convenience, varargs may be used when all arguments are numbers. This allows creating geodesic EPSG:4326 MultiPolygons with a single Polygon with a single LinearRing given an even number of arguments, e.g. ee.Geometry.MultiPolygon(aLng, aLat, bLng, bLat, ..., aLng, aLat).\n\n| Usage | Returns |\n|------------------------------------------------------------------------------------------|-----------------------|\n| `ee.Geometry.MultiPolygon(coords, `*proj* `, `*geodesic* `, `*maxError* `, `*evenOdd*`)` | Geometry.MultiPolygon |\n\n| Argument | Type | Details |\n|------------|--------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `coords` | List\\\u003cGeometry\\\u003e\\|List\\\u003cList\\\u003cList\\\u003cList\\\u003cNumber\\\u003e\\\u003e\\\u003e\\\u003e\\|List\\\u003cNumber\\\u003e | A list of polygons. May be a list of coordinates in the GeoJSON 'MultiPolygon' format, a list of ee.Geometry objects describing a Polygon, or a list of numbers defining a single polygon boundary. |\n| `proj` | Projection, optional | The projection of this geometry. The default is the projection of the inputs, where Numbers are assumed to be EPSG:4326. |\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. |\n| `evenOdd` | Boolean, optional | If true, polygon interiors will be determined by the even/odd rule, where a point is inside if it crosses an odd number of edges to reach a point at infinity. Otherwise polygons use the left- inside rule, where interiors are on the left side of the shell's edges when walking the vertices in the given order. If unspecified, defaults to true. |"]]