ee.Array.ceil
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ính toán số nguyên nhỏ nhất lớn hơn hoặc bằng giá trị đầu vào theo từng phần tử.
Cách sử dụng | Giá trị trả về |
---|
Array.ceil() | Mảng |
Đối số | Loại | Thông tin chi tiết |
---|
this: input | Mảng | Mảng đầu vào. |
Ví dụ
Trình soạn thảo mã (JavaScript)
// Requires an explicit PixelType if no data.
print(ee.Array([], ee.PixelType.int8()).ceil()); // []
print(ee.Array([-1.1]).ceil()); // [-1]
print(ee.Array([-0.1]).ceil()); // [0]
print(ee.Array([0]).ceil()); // [0]
print(ee.Array([0.1]).ceil()); // [1]
print(ee.Array([1.1]).ceil()); // [2]
Thiết lập Python
Hãy xem trang
Môi trường Python để biết thông tin về API Python và cách sử dụng geemap
cho quá trình phát triển tương tác.
import ee
import geemap.core as geemap
Colab (Python)
# Requires an explicit PixelType if no data.
display(ee.Array([], ee.PixelType.int8()).ceil()) # []
display(ee.Array([-1.1]).ceil()) # [-1]
display(ee.Array([-0.1]).ceil()) # [0]
display(ee.Array([0]).ceil()) # [0]
display(ee.Array([0.1]).ceil()) # [1]
display(ee.Array([1.1]).ceil()) # [2]
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\u003e\u003ccode\u003eArray.ceil()\u003c/code\u003e computes the smallest integer greater than or equal to each element in the input array.\u003c/p\u003e\n"],["\u003cp\u003eThe function returns a new array with the ceiling values of the original elements.\u003c/p\u003e\n"],["\u003cp\u003eIt operates on an element-wise basis, meaning it applies the ceiling operation to each individual element of the input array.\u003c/p\u003e\n"],["\u003cp\u003eIf the input is an empty array, it returns an empty array.\u003c/p\u003e\n"]]],["The `ceil()` method computes the ceiling of each element in an input array, returning a new array. The function determines the smallest integer greater than or equal to each input element. It operates element-wise. If the input array is empty, an explicit PixelType is required. The input array can contain positive and negative numbers, as shown with the provided examples. `Array.ceil()` method returns a new Array.\n"],null,["# ee.Array.ceil\n\nOn an element-wise basis, computes the smallest integer greater than or equal to the input.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|----------------|---------|\n| Array.ceil`()` | Array |\n\n| Argument | Type | Details |\n|---------------|-------|------------------|\n| this: `input` | Array | The input array. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// Requires an explicit PixelType if no data.\nprint(ee.Array([], ee.PixelType.int8()).ceil()); // []\n\nprint(ee.Array([-1.1]).ceil()); // [-1]\nprint(ee.Array([-0.1]).ceil()); // [0]\nprint(ee.Array([0]).ceil()); // [0]\nprint(ee.Array([0.1]).ceil()); // [1]\nprint(ee.Array([1.1]).ceil()); // [2]\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# Requires an explicit PixelType if no data.\ndisplay(ee.Array([], ee.PixelType.int8()).ceil()) # []\n\ndisplay(ee.Array([-1.1]).ceil()) # [-1]\ndisplay(ee.Array([-0.1]).ceil()) # [0]\ndisplay(ee.Array([0]).ceil()) # [0]\ndisplay(ee.Array([0.1]).ceil()) # [1]\ndisplay(ee.Array([1.1]).ceil()) # [2]\n```"]]