ee.Geometry.MultiPolygon
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tạo một ee.Geometry mô tả MultiPolygon.
Để thuận tiện, bạn có thể dùng varargs khi tất cả đối số đều là số. Điều này cho phép tạo EPSG:4326 MultiPolygon trắc địa bằng một Đa giác duy nhất có một LinearRing duy nhất với số lượng đối số chẵn, ví dụ: ee.Geometry.MultiPolygon(aLng, aLat, bLng, bLat, ..., aLng, aLat).
Cách sử dụng | Giá trị trả về |
---|
ee.Geometry.MultiPolygon(coords, proj, geodesic, maxError, evenOdd) | Geometry.MultiPolygon |
Đối số | Loại | Thông tin chi tiết |
---|
coords | List<Geometry>|List<List<List<List<Number>>>>|List<Number> | Danh sách các đa giác. Có thể là danh sách các toạ độ ở định dạng GeoJSON "MultiPolygon", danh sách các đối tượng ee.Geometry mô tả một Đa giác hoặc danh sách các số xác định một ranh giới đa giác duy nhất. |
proj | Dự kiến (không bắt buộc) | Phép chiếu của hình học này. Giá trị mặc định là phép chiếu của các đầu vào, trong đó các Số được giả định là EPSG:4326. |
geodesic | Boolean, không bắt buộc | Nếu là false, các cạnh sẽ thẳng trong phép chiếu. Nếu là true, các cạnh sẽ được uốn cong để đi theo đường ngắn nhất trên bề mặt Trái Đất. Giá trị mặc định là trạng thái trắc địa của các giá trị đầu vào hoặc true nếu các giá trị đầu vào là số. |
maxError | ErrorMargin (không bắt buộc) | Lỗi tối đa khi hình học đầu vào phải được chiếu lại thành một phép chiếu kết quả hoặc trạng thái trắc địa được yêu cầu rõ ràng. |
evenOdd | Boolean, không bắt buộc | Nếu đúng, phần bên trong đa giác sẽ được xác định theo quy tắc chẵn/lẻ, trong đó một điểm nằm bên trong nếu điểm đó cắt một số cạnh lẻ để đến một điểm ở vô cực. Nếu không, các đa giác sẽ sử dụng quy tắc bên trái, trong đó nội thất nằm ở phía bên trái của các cạnh của lớp vỏ khi đi qua các đỉnh theo thứ tự đã cho. Nếu bạn không chỉ định, giá trị mặc định sẽ là true. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\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. |"]]