ee.Algorithms.GeometryConstructors.Polygon
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 Đa giác từ các toạ độ đã cho.
Cách sử dụng | Giá trị trả về |
---|
ee.Algorithms.GeometryConstructors.Polygon(coordinates, crs, geodesic, maxError, evenOdd) | Hình học |
Đối số | Loại | Thông tin chi tiết |
---|
coordinates | Danh sách | Một danh sách LinearRing, trong đó danh sách đầu tiên là phần vỏ và phần còn lại là các lỗ, hoặc đối với một đa giác đơn giản, một danh sách các Điểm hoặc cặp Số theo thứ tự x,y. |
crs | Phép chiếu, mặc định: null | Hệ thống tham chiếu toạ độ của các toạ độ. 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, mặc định: null | 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, mặc định: null | 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, mặc định: true | 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 đó phần bên trong nằm ở phía bên trái của các cạnh của đường viền khi đi qua các đỉnh theo thứ tự đã cho. |
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\u003eCreates a polygon geometry from a list of coordinates, representing its outer boundary (shell) and optionally inner boundaries (holes).\u003c/p\u003e\n"],["\u003cp\u003eAllows customization of the coordinate system (\u003ccode\u003ecrs\u003c/code\u003e), whether edges are straight or follow Earth's curvature (\u003ccode\u003egeodesic\u003c/code\u003e), and error tolerance during reprojection (\u003ccode\u003emaxError\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eDefines polygon interiors using either the even/odd rule (default) or the left-inside rule, affecting how points within the polygon are identified.\u003c/p\u003e\n"]]],[],null,["# ee.Algorithms.GeometryConstructors.Polygon\n\nConstructs a Polygon from the given coordinates.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|----------------------------------------------------------------------------------------------------------------|----------|\n| `ee.Algorithms.GeometryConstructors.Polygon(coordinates, `*crs* `, `*geodesic* `, `*maxError* `, `*evenOdd*`)` | Geometry |\n\n| Argument | Type | Details |\n|---------------|----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `coordinates` | List | A list of LinearRings where the first is the shell and the rest are holes, or for a simple polygon, a list of Points or pairs of Numbers in x,y order. |\n| `crs` | Projection, default: null | The coordinate reference system of the coordinates. The default is the projection of the inputs, where Numbers are assumed to be EPSG:4326. |\n| `geodesic` | Boolean, default: null | 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, default: null | Max error when input geometry must be reprojected to an explicitly requested result projection or geodesic state. |\n| `evenOdd` | Boolean, default: true | 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. |"]]