Earth Engine 推出了
非商业配额层级,以保护共享计算资源并确保为所有人提供可靠的性能。非商业项目默认使用 Community
层级,但您可以随时更改项目的层级。
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
ee.List
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
构造一个新列表。
| 参数 | 类型 | 详细信息 |
|---|
list | List[Object]|Object | 列表或计算对象。 |
示例
代码编辑器 (JavaScript)
print(ee.List([])); // []
print(ee.List([null])); // [null]
print(ee.List([true])); // [true]
print(ee.List([1])); // [1]
print(ee.List([ee.Number(1)])); // [1]
print(ee.List(['a'])); // ["a"]
print(ee.List([[]])); // [[]]
print(ee.List([ee.List([])])); // [[]]
print(ee.List([[], [[]], [1, [], 'a']])); // [[],[[]],[1,[],"a"]]
Python 设置
如需了解 Python API 和如何使用
geemap 进行交互式开发,请访问
Python 环境页面。
import ee
import geemap.core as geemap
Colab (Python)
display(ee.List([])) # []
display(ee.List([None])) # [None]
display(ee.List([True])) # [True]
display(ee.List([1])) # [1]
display(ee.List([ee.Number(1)])) # [1]
display(ee.List(['a'])) # ['a']
display(ee.List([[]])) # [[]]
display(ee.List([ee.List([])])) # [[]]
display(ee.List([[], [[]], [1, [], 'a']])) # [[], [[]], [1, [], 'a']]
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2026-01-08。
[null,null,["最后更新时间 (UTC):2026-01-08。"],[],["The `ee.List()` function creates a new list object. It accepts a list or computed object as input and returns a `List`. The function can handle various data types within the list, including null, boolean, numbers, strings, and nested lists. Examples demonstrate creating lists with different contents in both JavaScript and Python, showing the structure and content of the newly created lists. The `getInfo()` is needed to retrieve the data in the python examples.\n"]]