ee.Algorithms.GeometryConstructors.Rectangle
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.
Dựng một đa giác hình chữ nhật từ các điểm góc đã cho.
Cách sử dụng | Giá trị trả về |
---|
ee.Algorithms.GeometryConstructors.Rectangle(coordinates, crs, geodesic, evenOdd) | Hình học |
Đối số | Loại | Thông tin chi tiết |
---|
coordinates | Danh sách | Các góc thấp và cao của Hình chữ nhật, dưới dạng 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ố. |
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 rectangular polygon using specified corner points.\u003c/p\u003e\n"],["\u003cp\u003eAllows customization of coordinate system, edge curvature (straight or geodesic), and polygon interior calculation (even/odd or left-inside rule).\u003c/p\u003e\n"],["\u003cp\u003eAccepts corner points as a list of Points or coordinate pairs (x,y).\u003c/p\u003e\n"],["\u003cp\u003eDefaults to EPSG:4326 coordinate system if not specified and geodesic edges if input is numerical.\u003c/p\u003e\n"]]],[],null,["# ee.Algorithms.GeometryConstructors.Rectangle\n\nConstructs a rectangular polygon from the given corner points.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------------------------------------------------------------------------------------|----------|\n| `ee.Algorithms.GeometryConstructors.Rectangle(coordinates, `*crs* `, `*geodesic* `, `*evenOdd*`)` | Geometry |\n\n| Argument | Type | Details |\n|---------------|---------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `coordinates` | List | The low and then high corners of the Rectangle, as 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| `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. |"]]