公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Geometry.MultiPolygon
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
构建一个描述 MultiPolygon 的 ee.Geometry。
为方便起见,如果所有实参都是数字,则可以使用可变数量实参。这样,您就可以使用单个 LinearRing 的单个 Polygon 创建测地线 EPSG:4326 MultiPolygon,前提是参数数量为偶数,例如 ee.Geometry.MultiPolygon(aLng, aLat, bLng, bLat, ..., aLng, aLat)。
用法 | 返回 |
---|
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。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):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. |"]]