Duyuru:
15 Nisan 2025'ten önce Earth Engine'i kullanmak için kaydedilen tüm ticari olmayan projelerin Earth Engine erişimini sürdürmek için
ticari olmayan uygunluğu doğrulaması gerekir.
ee.List.add
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Öğeyi listenin sonuna ekler.
Kullanım | İadeler |
---|
List.add(element) | Liste |
Bağımsız Değişken | Tür | Ayrıntılar |
---|
bu: list | Liste | |
element | Nesne | |
Örnekler
Kod Düzenleyici (JavaScript)
print(ee.List([]).add('b')); // ["b"]
print(ee.List(['a']).add('b')); // ["a","b"]
print(ee.List(['a']).add(ee.String('b'))); // ["a","b"]
print(ee.List(['a']).add(1)); // ["a",1]
print(ee.List(['a']).add(ee.Number(1))); // ["a",1]
print(ee.List(['a']).add(true)); // ["a",true]
print(ee.List(['a']).add([])); // ["a",[]]
print(ee.List(['a']).add(ee.List([]))); // ["a",[]]
print(ee.List(['a']).add(['b'])); // ["a",["b"]]
print(ee.List(['a']).add(ee.List(['b']))); // ["a",["b"]]
print(ee.List(['a']).add(ee.Dictionary())); // ["a",{}]
print(ee.List(['a']).add(ee.Dictionary({b: 'c'}))); // ["a",{"b":"c"}]
// 0: a
// 1: Image (1 band)
print(ee.List(['a']).add(ee.Image.constant(1)));
// ["a",{"type":"ImageCollection","bands":[]}]
print(ee.List(['a']).add(ee.ImageCollection([])));
Python kurulumu
Python API'si ve etkileşimli geliştirme için geemap
kullanımı hakkında bilgi edinmek üzere
Python Ortamı sayfasına bakın.
import ee
import geemap.core as geemap
Colab (Python)
print(ee.List([]).add('b').getInfo()) # ['b']
print(ee.List(['a']).add('b').getInfo()) # ['a', 'b']
print(ee.List(['a']).add(ee.String('b')).getInfo()) # ['a', 'b']
print(ee.List(['a']).add(1).getInfo()) # ['a', 1]
print(ee.List(['a']).add(ee.Number(1)).getInfo()) # ['a', 1]
print(ee.List(['a']).add(True).getInfo()) # ['a', True]
print(ee.List(['a']).add([]).getInfo()) # ['a', []]
print(ee.List(['a']).add(ee.List([])).getInfo()) # ['a', []]
print(ee.List(['a']).add(['b']).getInfo()) # ['a', ['b']]
print(ee.List(['a']).add(ee.List(['b'])).getInfo()) # ['a', ['b']]
print(ee.List(['a']).add(ee.Dictionary()).getInfo()) # ['a', {}]
# ['a', {'b': 'c'}]
print(ee.List(['a']).add(ee.Dictionary({'b': 'c'})).getInfo())
# 0: a
# 1: Image (1 band)
print(ee.List(['a']).add(ee.Image.constant(1)).getInfo())
# ["a", {"type":"ImageCollection", "bands":[]}]
print(ee.List(['a']).add(ee.ImageCollection([])).getInfo())
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-26 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eList.add()\u003c/code\u003e appends an element to the end of a list and returns the modified list.\u003c/p\u003e\n"],["\u003cp\u003eThe method accepts any object as the element to be added.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eList.add()\u003c/code\u003e can be chained with other list methods for more complex operations.\u003c/p\u003e\n"],["\u003cp\u003eThe original list is not modified; a new list with the added element is returned.\u003c/p\u003e\n"]]],["The `List.add(element)` function appends an element to the end of a list. It takes an object as an argument (`element`), which can be any data type. The function modifies the list by adding the provided element at the end. It returns the modified list. The examples show different elements added to a list, including strings, numbers, booleans, empty lists, and even more complex data structures like dictionaries, images, and image collections.\n"],null,["# ee.List.add\n\nAppends the element to the end of list.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------|---------|\n| List.add`(element)` | List |\n\n| Argument | Type | Details |\n|--------------|--------|---------|\n| this: `list` | List | |\n| `element` | Object | |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\nprint(ee.List([]).add('b')); // [\"b\"]\nprint(ee.List(['a']).add('b')); // [\"a\",\"b\"]\nprint(ee.List(['a']).add(ee.String('b'))); // [\"a\",\"b\"]\n\nprint(ee.List(['a']).add(1)); // [\"a\",1]\nprint(ee.List(['a']).add(ee.Number(1))); // [\"a\",1]\n\nprint(ee.List(['a']).add(true)); // [\"a\",true]\n\nprint(ee.List(['a']).add([])); // [\"a\",[]]\nprint(ee.List(['a']).add(ee.List([]))); // [\"a\",[]]\nprint(ee.List(['a']).add(['b'])); // [\"a\",[\"b\"]]\nprint(ee.List(['a']).add(ee.List(['b']))); // [\"a\",[\"b\"]]\n\nprint(ee.List(['a']).add(ee.Dictionary())); // [\"a\",{}]\nprint(ee.List(['a']).add(ee.Dictionary({b: 'c'}))); // [\"a\",{\"b\":\"c\"}]\n\n// 0: a\n// 1: Image (1 band)\nprint(ee.List(['a']).add(ee.Image.constant(1)));\n\n// [\"a\",{\"type\":\"ImageCollection\",\"bands\":[]}]\nprint(ee.List(['a']).add(ee.ImageCollection([])));\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\nprint(ee.List([]).add('b').getInfo()) # ['b']\nprint(ee.List(['a']).add('b').getInfo()) # ['a', 'b']\nprint(ee.List(['a']).add(ee.String('b')).getInfo()) # ['a', 'b']\n\nprint(ee.List(['a']).add(1).getInfo()) # ['a', 1]\nprint(ee.List(['a']).add(ee.Number(1)).getInfo()) # ['a', 1]\n\nprint(ee.List(['a']).add(True).getInfo()) # ['a', True]\n\nprint(ee.List(['a']).add([]).getInfo()) # ['a', []]\nprint(ee.List(['a']).add(ee.List([])).getInfo()) # ['a', []]\nprint(ee.List(['a']).add(['b']).getInfo()) # ['a', ['b']]\nprint(ee.List(['a']).add(ee.List(['b'])).getInfo()) # ['a', ['b']]\n\nprint(ee.List(['a']).add(ee.Dictionary()).getInfo()) # ['a', {}]\n\n# ['a', {'b': 'c'}]\nprint(ee.List(['a']).add(ee.Dictionary({'b': 'c'})).getInfo())\n\n# 0: a\n# 1: Image (1 band)\nprint(ee.List(['a']).add(ee.Image.constant(1)).getInfo())\n\n# [\"a\", {\"type\":\"ImageCollection\", \"bands\":[]}]\nprint(ee.List(['a']).add(ee.ImageCollection([])).getInfo())\n```"]]